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.

learn more… | top users | synonyms (2)

82
votes
6answers
94k views

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 ...
59
votes
8answers
12k views

How can I open a file in my terminal, like nautilus does it?

I want to be able to open files like my operating system does from console. e.g. a .pdf file should be opened with evince or whatever the default application to open pdfs is. All the other things ...
55
votes
6answers
89k views

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?
46
votes
15answers
23k views

How can I easily encrypt a file?

Is there any simple (IE: right click in Nautilus) way to password protect a particular folder/file in Ubuntu? I've got a few files containing sensitive info and I'd much prefer that if/when I leave my ...
44
votes
16answers
162k views

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 ?
42
votes
4answers
320k views

How to run .sh file [duplicate]

Possible Duplicate: How do I run .sh files in Terminal? I want to download JDownloader from the internet for Linux. But the file is .sh and when I tell ubuntu to open the file it uses some ...
40
votes
4answers
146k views

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
35
votes
8answers
28k views

Is there a tool to encrypt a file or directory?

What's the most popular way to encrypt individual files or folders?
35
votes
5answers
30k views

Where are file associations stored?

How does Ubuntu or any other Linux systems store file associations? Is there some /etc/asscociations file or something? I know that I can right click on file and change it via "open with", but I'm ...
34
votes
8answers
58k views

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?
31
votes
6answers
46k views

How can I open a .dmg file?

I've got a .dmg file, and I can't figure out how to open it. How can I open it?
30
votes
1answer
82k views

How to transfer files from/to an Android device with ADB via GUI?

Do you know if there is an Ubuntu program (possibly a Nautilus plugin) to transfer files from/to an Android device? What is my mind is a program which does adb push, adb pull, and adb shell ls in the ...
28
votes
12answers
25k views

What mass file renaming tools are available?

I need to rename a bunch of files in order to fix their sort order, therefore I need to be able to do a sort of "find and replace" so I can replace chunks of the filenames at a time. What tools ...
27
votes
5answers
12k views

Is there a file explorer/manager for the command line?

I would like to know if there is something like DOS interface for Ubuntu. I mean a "GUI" that can run from the console (for example if you are using Ubuntu Server). Some file explorer like Nautilus ...
26
votes
5answers
34k views

How to customize (add/remove folders/directories) the “Places” menu of Ubuntu 13.04 “Files” application?

I can't seem to find a way to customize (add/remove folders/directories) the "Places" menu in the most recent "Files" application of Ubuntu 13.04. The procedures used with "Nautilus" in the previous ...
25
votes
2answers
70k views

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. I want to use a graphic application. I'm on 12.4 "Precise Pangolin". Prior to Ubuntu 12.4 I used to start in the dash an ...
25
votes
1answer
179k views

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)?
25
votes
7answers
24k views

Text editor to edit 4.3 GB plain text file

Is there any text editor, which can edit such file? I've tried: gedit kate nano vim mcedit without success.
22
votes
2answers
1k views

Does the /dev/null file actually have a fixed size?

I have just found out that /dev/null is a file and not a directory. I'm just wondering if it has an actual file size.
22
votes
2answers
1k views

What's wrong with my cat command? [closed]

I lent a friend a computer with Ubuntu 12.04 LTS on it, and he messed up the cat command. $ cat testfile.txt cat: meow! $ Can someone tell me how to fix this? please? Output of which cat: ...
21
votes
4answers
74k views

What's the easiest way to mount Windows share as a local folder in home directory?

Via Gnome Nautilus I can easily mount Samba shares from my Ubuntu Server. However, these "mounts" are kinda of fake. Many applications I run do not recognize that Gnome has mounted these server ...
21
votes
5answers
6k views

How can I add an application to the list of Open With applications?

I installed Komodo Edit from a download (wasn't available in Software Center.) I want to be able to open .php files in Komodo, but when I right-click and choose Open With Other Application, Komodo ...
21
votes
4answers
10k views

Use path bar and address bar in Nautilus

By default, Nautilus use/show the path bar: Using Ubuntu Tweak I managed to set by default the address bar: Is it possible to set both of them as default (show both: the buttons and the text ...
20
votes
3answers
6k views

How can I quickly make a large file?

What is a quick and easy way to make a file that is, say, 2 GB in size?
20
votes
7answers
20k views

How to list all the files in a tree (a directory and its subdirs)?

For a task of mine I need to list all the files in a tree (a directory, all its subdirs, all subdirs of those, etc.). I'd prefer to see them in Nautilus or Krusader, but a command-line solution is ...
18
votes
1answer
5k views

How many files I can have on a single directory?

This question is related to this one. I work with animation, which generates a LOT of files (+/- 1,000,000) typically stored on a single directory. On Mac Os X, some bugs came up with more than ...
18
votes
3answers
9k views

Use “locate” under some specific directory?

I was wondering how to restrict the search range of "locate" to some directory? For example, how to find files/directories with string "math" in their names under some directory "/home/tim/science/"? ...
17
votes
1answer
2k views

How does Ubuntu know what file type a file without extension is?

As the question goes, how does Ubuntu know what file type a file without extension is? When I save a file as "Untitled Document" without any extension, how does it know? Same thing for video and ...
16
votes
4answers
58k views

How to find owner and group of a directory?

How can I find out owner and group of a directory in Ubuntu?
16
votes
1answer
20k views

How to unmount after using mount --bind option?

I have mounted a hard disk /dev/sda1 on /media/backup. Further, I have issued the following command: mkdir /home/users/Desktop/backup sudo mount --bind /media/backup /home/users/Desktop/backup This ...
15
votes
6answers
36k views

How to list recursive file sizes of files and directories in a directory?

How do I list all the files in a directory and their recursive file sizes? ---edit I want to see the sizes 'rolled up' to the parent directories in the directory listed. I don't want to see the ...
15
votes
2answers
77k views

Bash: ./filename : Cannot execute binary file

I couldn't execute a fortran compiled code in ubuntu 11.10 32 bit. Error message is bash: ./filename : Cannot execute binary file. I've installed the gcc and gfortran libraries too. Could anyone ...
15
votes
2answers
12k views

How can I tell if I am out of inotify watches?

I use an application that consumes inotify watches. I've already set fs.inotify.max_user_watches=32768 in /etc/sysctl.conf but last night the application stopped indexing unless I ran it manually, ...
15
votes
4answers
55k views

How can I change permissions on external drives?

I wanted to change permissions on my external drives that are automounted however I have tried by sudo nautilus and then going to gui and permissions and changing it however it does not let me. I ran ...
14
votes
5answers
14k views

What are dot-files?

I am having a hard time grasping what dot-files are or what they are for. Are they directories? How do I navigate to them? Thank you!
14
votes
2answers
10k views

Split a large file into smaller files and then integrate them to get the original file

How do I split a 7GB (movie) file into smaller files of (say) 1GB, and then (in another Ubuntu computer) integrate them to get the original file (using just bash commands)?
14
votes
6answers
1k views

How can I protect a file from user changes?

I am using Ubuntu 12.04 and I want to protect some pictures of another user using the su command (I have admin privileges). How can I protect a file using the terminal while still allowing the rest of ...
14
votes
1answer
13k views

How to get the mime type of a file from the command line?

I'm trying to get the mime type of a file from the command line as a printed string (eg. application/vnd.oasis.opendocument.spreadsheet). I looked up how to do this and found the xdg-mime command. ...
14
votes
6answers
5k views

Show current folder size in Nautilus

I would like to know if it's possible to display the current folder size (in MB or GB) in Nautilus at the status bar. Here's a screenshot: as you can see, (in this case) I have 7 items, and I have ...
14
votes
2answers
618 views

How to see the contents of a file with blank filename?

drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 19 07:30 xxxxx -rw-rw-r-- 1 ubuntu ubuntu 580 Mar 20 07:24 -rw-rw-r-- 1 ubuntu ubuntu 27137 Mar 20 09:10 xxx.js Here there is a file on the second line but ...
14
votes
6answers
20k views

How can I email an attachment from the command line

Is it possible to email attachments from the command line? If possible, I'd like something as simple as: mail -a myfile.txt -t me@example.com -s "Here's my file"
14
votes
3answers
659 views

how do I make nautilus to automatically suggest the folder 'Documents' for pdf files?

In Ubuntu 11.10, how can I set up nautilus so that when I select "Save as..." on Evince or some other PDF viewer, for a PDF I downloaded with the browser, it automatically suggests the folder ...
14
votes
3answers
34k views

How can i open SDM.pkg and .sdx files on Ubuntu?

I would like to download Windows 8 disk images, but the files I have for the download are SDM.pkg and 100189659562.sdx. How can I open these files on my computer running Ubuntu?
13
votes
2answers
29k views

Where are bluetooth received files saved

I have used Blueman and the default Bluetooth manager an every time I accept the file transfer from the Phone to the PC, it shows that it is transferring and even notifies me that the transfer was ...
13
votes
4answers
2k views

Tailing two log files

I have a web application that outputs to a number of log files with performance information. One log file outputs code execution times and another outputs SQL timings. I have no control over the ...
13
votes
2answers
10k views

What does examples.desktop do?

What's the point of the examples.desktop file?
13
votes
1answer
4k views

Is there a Ubuntu sanity check

Is there a standard procedure to 'unit test' an Ubuntu system against the deb packages? Assume, a system has ubuntu-desktop installed according to the package manager. Can I find out, whether the ...
12
votes
4answers
17k views

Opening a file from terminal

When we want to open an application or file from the terminal, we type, say, okular file.dvi This opens the application, but also shows the status of the application. We cannot close the terminal, ...
12
votes
7answers
854 views

How to delete files listed in a text file

I have a text file that has a list of paths to various files. Is there a command I can use that will iterate thorough each line and delete the file at the stated path?
12
votes
3answers
1k views

Where do files ending with a ~ come from?

Sometimes duplicate filenames occur while working on Ubuntu which differ only by a ~ from the original filenames. I know kate generates backup files and calls them your_file.py.swp. Is this ...