Questions tagged [files]

For questions concerning specifics about the files on Ubuntu. If your question is about the file manager called "Files" in Ubuntu, use the [nautilus] tag instead.

In Linux "everything is a file" (unless it's a process) but files come in different types, most commonly "regular" files, directories (lists of files) and links (to other files). Executable binaries and scripts, text and media files are all regular files.

Types of files with symbols as in the output of ls -l:

Symbol Meaning
- Regular file
d Directory
l Symbolic link
b Block device
c Character device
s Socket
p Named pipe

Each file is linked to a numbered inode that stores metadata about it:

  • File type
  • Owner id and group id
  • Mode: permissions for owner, group and others
  • Timestamps of when the file was last accessed and when the inode and file were last changed
  • The number of links to the inode
  • The file's size
  • An address pointing to the blocks where data in the file is located
2908 questions
935
votes
10 answers

How can I recursively delete all files of a specific extension in the current directory?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.
user216038
  • 9,353
279
votes
9 answers

No such file or directory? But the file exists!

I've downloaded a game (Shank) but the bin file doesn't run. The error that is shown when I try to launch the executable is: bash: ./shank-linux-120720110-1-bin: No such file or directory
Francesco
  • 3,021
273
votes
2 answers

How to rename a file in Terminal?

I have: /home/user/my_static /home/user/static/ How do I rename my_static to static and remove static(2)?
user2054574
  • 2,841
  • 2
  • 15
  • 4
241
votes
5 answers

How to find owner and group of a directory?

How can I find out owner and group of a directory in Ubuntu?
227
votes
7 answers

Copying multiple specific files from one folder to another

I have a large folder of pictures (thousands), and I have a long list of files, by exact file name, that I need to copy to another folder. I want to know if there is a way I can select several specific files from this folder, by name, and copy them…
221
votes
7 answers

How to split larger files into smaller parts?

I have a large file (8GB for Example). How can I split it into multiple parts, let's say 3 equal parts, and after that how do I integrate them later?
karthick87
  • 84,513
213
votes
16 answers

How do I open a text file in my terminal?

There is a file named RESULTS.txt and I want to open this file in my terminal. (I mean I want to see the file contents be displayed in the terminal and not in some text editor) How do I do that ?
204
votes
2 answers

"Parsing filters unsupported" error during extraction of RAR file

I have received an .rar which I wish to unpack as it contains something rather important to me that I need to really have now. However even though I can view the contents of the .rar archive in the Archive Manager, I am unable to extract it due to…
user364819
196
votes
6 answers

How do I increase the size of swapfile without removing it in the terminal?

Is there a way to increase my existing "swapfile" without having to destroy and re-create it? I would like to up my swap space from 1GB to 2GB. Currently it is set up as such: $ sudo swapon -s Filename Type Size Used …
Dave
  • 2,315
185
votes
4 answers

How do you view file permissions?

I want to know how to see the permissions a particular file has. Which command should I type in the terminal? However, I don't want to change it.
CENTAUR
  • 3,409
182
votes
8 answers

How to find a text file which contains a specific word inside (not in its name)

I want to find a text file in my hard disk which contains a specific word. Prior to Ubuntu 12.4 I used to start in the dash an application, I think it was called "Search for file...", whose icon was a magnifying glass.I can't find that simple…
SomeoneMe
  • 1,821
180
votes
9 answers

How to search entire hard drive for a file?

Trying to locate a file, how can I search the entire hard drive for a file?
Blankman
  • 8,605
171
votes
10 answers

Command to move a file to Trash via Terminal

I would like to know if there is a command I can issue in a terminal so I do not classically remove (rm) the file, but instead move it to trash (i.e. Nautilus Move to Trash behavior). In case there is such a command, I would also be interested in…
Rasmus
  • 8,655
167
votes
15 answers

Create a single pdf from multiple text, images or pdf files

I have a bunch of text files, images and pdf files which I want to convert into a single pdf file. How do I do it?
AJha
  • 2,973
  • 4
  • 19
  • 12
161
votes
8 answers

How to show hidden folders in File Manager (Nautilus) on Ubuntu?

How do you show a hidden folder (whose name starts with .) in File Manager a.k.a. Nautilus on Ubuntu? I am somewhat new to Ubuntu and can't seem to find the "view" menu.
Strato1
  • 2,190
1
2 3
99 100