Questions dealing with Ubuntu's layout of files, permissions, and files that reside in special locations on disk.

learn more… | top users | synonyms

186
votes
4answers
158k views

How do I determine the total size of a directory (folder) from the command line?

Is there a simple command to display the total aggregate size (disk usage) of all files in a directory (folder)? I have tried these, and they don't do what I want: ls -l, which only displays the ...
94
votes
6answers
27k views

How to understand the Ubuntu file system layout?

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely ...
94
votes
5answers
91k views

How is the /tmp directory cleaned up?

How is the /tmp directory cleaned up? Is it automatic? If so, how frequently is it cleaned up?
62
votes
3answers
32k views

What is the difference between /etc/init/ and /etc/init.d/?

What is the difference between /etc/init/ and /etc/init.d/? More generally, what meaning does the ".d" suffix convey to a directory?
60
votes
5answers
23k views

Why is defragmentation unnecessary?

Why is defragmenting unnecessary in Ubuntu?
58
votes
1answer
34k views

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin [duplicate]

I'm running an Ubuntu Server 13.04, but I see the same on a 12.04: I have six directories with command files. These are: /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin What are the ...
55
votes
5answers
15k views

Why has /var/run been migrated to /run?

From the technical overview of Ubuntu 11.10 Oneiric: Ubuntu 11.10 has migrated away from /var/run, /var/lock and /dev/shm and now uses /run, /run/lock and /run/shm instead (respectively). I ...
51
votes
10answers
66k views

How can I securely erase a hard drive?

I'm planning on selling a USB external hard drive that currently contains an old Ubuntu installation with stored passwords and banking information. How can I securely erase the drive before selling ...
50
votes
9answers
78k views

What is the equivalent to the Windows “Program Files” folder? (Where do things go when I install them?)

What is the Ubuntu equivalent to the Windows C:\Program Files folder? This is where Windows stores the system wide data for applications.
48
votes
7answers
139k views

How do I view all available HDD's/partitions?

I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS. I can't find it in Ubuntu to view files, and Ubuntu is the only OS ...
48
votes
2answers
40k views

Is it worth to tune Ext4 with noatime?

With previous versions of Ubuntu (using Ext3 filesystem) I used to tune it for better performance with noticeable results by setting the noatime parameter in /etc/fstab. Is it still worth it to do ...
42
votes
8answers
27k views

How to find (and delete) duplicate files

I have a largish music collection and there are some duplicates in there. Is there any way to find duplicate files. At a minimum by doing a hash and seeing if two files have the same hash. Bonus ...
41
votes
4answers
13k views

Why have both /mnt and /media?

It seems to me that having both /mnt and /media is a little redundant. Is there any tangible difference between the two that I'm not aware of? Is there a standard that most people follow for where to ...
40
votes
2answers
20k views

Whats the .local folder for in my Home Directory

What is the ~/.local folder good for and is it safe to remove the content within this folder?
33
votes
4answers
78k views

How to get a drive formatted with exfat working?

In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried ...
32
votes
5answers
3k views

How can I flip a single bit in a file?

I want to intentionally damage a file in order to test the claims that btrfs can heal itself. The article talks about taking the filesystem off, damaging a photo by "flipping" a single bit and then ...
30
votes
4answers
34k views

How do I avoid the “S to Skip” message on boot?

After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message: The disk drive for /osshare is not ready yet or not present Continue to wait; or Press ...
29
votes
2answers
45k views

How do I change file system in recovery mode to read-write mode?

I have messed up my sudoers file and I want to change the permission on it. When I login in recovery mode, I cannot run the command chmod as it is read-only option. I tried mount -o remount,rw / in ...
29
votes
2answers
45k views

How do I install and mount an exFAT partition? [duplicate]

I have searched around here and with Google, and none of the instructions I have found work with Oneric. How do install exFAT and mount an exFAT partition in the latest release of Kubuntu?
29
votes
3answers
214k views

How do I remount a filesystem as read/write?

I'm trying to mount an hfsplus filesystem in a Xubuntu 12.04 VM (kernel version 3.2.0-23-generic) but when I type mount -o remount, rw /dev/sdb3 in command line it returns not mounted or bad option. ...
28
votes
3answers
17k views

How to move Ubuntu to an SSD

My current situation is: One hard disk Dual boot Ubuntu 11.04 and Windows 7. Partitions: 100MB Windows System thingy 144GB Main Windows 160GB Ubuntu 4GB Swap 12GB System Restore stuff Now I want ...
27
votes
4answers
24k views

Why are hard links not allowed for directories?

I am using Ubuntu 12.04 and I am pretty new Linux world. I am really amazed when I try to create hard link for any directory and fail. I can create hard links for files inside file system boundary. I ...
27
votes
4answers
4k views

Importance of Swap Partition

What is the purpose of a swap partition? How do I know I have just enough swap partition? Not too much/little. My Ubuntu PC is used for typical stuff: Web (email, facebook, etc.) Some movies ...
27
votes
1answer
13k views

What's lost+found and where did it come from?

I reformatted a hard drive to ext4, planning to use it as a backup drive. After mounting the freshly-formatted drive, I discovered a single empty directory inside it: lost+found. What's the purpose of ...
26
votes
1answer
26k views

Ubuntu 13.04 to 13.10: Filesystem check or mount failed

I attempted to upgrade from Ubuntu 13.04 to 13.10 today, and mid upgrade the system started flaking out, and eventually locked up entirely. I was forced to restart the computer, and am now unable to ...
26
votes
1answer
34k views

How can I use RAM storage for the /tmp directory and how to set a maximum amount of RAM usage for it?

After seeing the comment by Anonymous on the question How is the /tmp directory cleaned up?, I found that it would be a great idea to implement on my system, since I have 16GB of RAM and I never used ...
25
votes
8answers
8k views

Good filesystem for /tmp?

I'm thinking of having /tmp on its own partition... what would be a good filesystem to format it with? The reason I ask is because the data being stored in /tmp is not permanent, so I don't need ...
25
votes
4answers
28k views

How do I use OverlayFS?

This answer and email message indicate that something called "OverlayFS" is available in Ubuntu 11.10 and will forcefully replace aufs in Ubuntu 12.04. How do I use it? Where is its documentation?
24
votes
4answers
213k views

How to make read-only file system writable?

I am not sure since when the filesystem on my digital audio player has been changed to be read-only. I cannot copy files into it or remove files on it. Are there some possible reasons for the ...
24
votes
3answers
21k views

Use of /opt and /usr/local directories in the context of a PC

What is the difference between /opt and /usr/local directories and what kind of programs should be installed to them? I referred to Linux File-system Hierarchy but the explanation is not that clear. ...
23
votes
1answer
8k views

What is the rationale for the `/usr` directory?

What is the rationale for the "unix system resources", or /usr directory, as described here, which duplicates many of the directory names under the root directory /? My purpose: I'm installing Oracle ...
23
votes
2answers
4k views

What does `~/ ` mean?

I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean?
23
votes
4answers
3k views

Where in the filesystem should I store shared data?

Where in the unix filesystem is the conventional location to save non-user specific data, for example data shared via nfs or ftp, or backups? I could obviously create and use any arbitrary folder ...
23
votes
3answers
2k views

Can I modify a bash script (.sh) file while it is running?

Suppose I have a script script.sh, which takes some time to execute. I execute it, ./script.sh. While it is running in a terminal window, I modify the file script.sh. Will this have any effect on the ...
23
votes
3answers
15k views

Is there a simple way to add exFAT support? [duplicate]

When I insert a USB stick or camera flash card I get the following error: unknown filesystem type 'exfat' Is there a simple way to add exFAT support to Ubuntu without kernel patching?
22
votes
2answers
13k views

How to open Nautilus at current command line directory?

I was wondering if anybody knew a command that would allow me to open a Nautilus (if that's the right name for the Ubuntu 12.04 graphic/window explorer) window from the command line at the current ...
20
votes
2answers
668 views

Is there a difference between a symbolic link via terminal or right-click make link?

I'm wondering if there is a difference between going to a terminal and typing ln -s path 'path or just right clicking on something and selecting make link.
20
votes
1answer
10k views

Can I disable updatedb.mlocate?

On ubuntu server here and I'm trying to unpack 300M image files from a compressed file format using Java. My unpack rate is 0.5Mbytes/sec, abysmal (34 days to unpack 1.5TB at this rate). I'm trying ...
19
votes
8answers
198k views

“No root file system defined” error while installing ubuntu

I am new to linux/ ubuntu and just downloaded the v11 of ubuntu to learn linux. I faced this "No root file system is defined" error while trying to install it. This is how I was proceeding - ...
19
votes
4answers
31k views

Why does deleting a file on a USB stick not free up space?

I have an HP pen-drive that has 16GB space. If I add a file to it, and then I delete that file, the free space of that deleted file doesn't get applied. The only way I've found to see that space as ...
19
votes
6answers
114k views

How to fix “sudo: unable to open … Read-only file system”?

The title might not be as descriptive as I would like it to be but couldn't come up with a better one. My server's file system went into Read-only. And I don't understand why it does so and how to ...
18
votes
3answers
10k views

Where is the user's profile picture stored in Gnome 3?

In Ubuntu 11.10, I can set my profile picture through the User Accounts settings panel. I can select an existing picture and it will help me crop that picture to look nice. The final product is not ...
17
votes
2answers
2k views

How to find the creation time of a file?

I need to find the creation time of a file, when I read some article about this issue, all mentioned that there is no solution like Site1, Site2. When I tried stat command it state Birth: - So how ...
17
votes
8answers
30k views

Why do my gvfs mounts not show up under ~/.gvfs or /run/user/<login>/gvfs?

From what I read, when mounting a network share via nautilus or gvfs-mount the mount point should be in ~/.gvfs. This seems not to be the case for me: I tried mounting both an FTP and SMB share via ...
17
votes
2answers
19k views

Find duplicate files and folders and move these to a different folder [duplicate]

Possible Duplicate: How to find (and delete) duplicate files Is there a reliable duplicate file/folders utility, (with GUI) for Linux that can find duplicate files or folders and move them ...
17
votes
1answer
23k views

Mount unknown filesystem exfat [closed]

When trying to mount an exfat filesystem, I get the following error: Error mounting /dev/sda6 at /media/gkp/Backup: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" ...
17
votes
4answers
3k views

Find directories with lots of files in

So a client of mine got an email from Linode today saying their server was causing Linode's backup service to blow up. Why? Too many files. I laughed and then ran: # df -ih Filesystem Inodes ...
17
votes
3answers
885 views

Is there a way I can rename Trash to Crap?

I was trying to Rename the folder Trash to Crap. I did this I first ran cd /home/username/.local/share/ Now my present working directory is /home/username/.local/share then when I typed ls I ...
16
votes
4answers
5k views

Why is moving directories to /dev/null dangerous?

When trying to move a test_dir directory to /dev/null, I get the message mv: cannot overwrite non-directory ‘/dev/null’ with directory ‘test_dir/’ Then why do people say "Don't run the command sudo ...
16
votes
4answers
12k views

Where can I find the application executables in the filesystem?

Where are executables for programs stored in Ubuntu? An application (Komodo Edit) is asking me to identify an application to be used as a web browser. I've become used to just entering the ...