A filesystem is a method of storing and organizing computer files and their data.

learn more… | top users | synonyms (2)

40
votes
1answer
1k views

Why are there so many different ways to measure disk usage?

When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many ...
4
votes
2answers
4k views

ext4: How to account for the filesystem space?

I've recently formated a 1.5 TB drive with the intention of replacing ntfs with ext4. Then I noticed that the files I saved don't fit on the new partition. df: ext4 (ext3 & ext2 show the same ...
22
votes
2answers
5k views

What mount points exist on a typical Linux system?

I have 2 questions. During Linux installation we specify memory space for 2 mount points - root and swap. Are there any other mount points created without the users notice? Is this statement ...
32
votes
4answers
21k views

Reserved space for root on a filesystem - why?

I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with: tune2fs -m 1 /dev/sdXY What I'm ...
38
votes
5answers
26k views

What is a Superblock, Inode, Dentry and a File?

From the article Anatomy of Linux File Systems by Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, ...
6
votes
2answers
2k views

Find filesystem of an unmounted partition from a script

I'm writing a custom automated install using AIF (Arch Installation Framework), and I need to find the filesystem on a partition given a partition. So far I have this: grok_partitions () { local ...
11
votes
4answers
3k views

The merits of a partitionless filesystem

I ran into something a couple of weeks ago that I'd never seen before: A filesystem (ext3 I believe) installed to a storage device without a partition. In essence /dev/sdb was the entire filesystem. I ...
109
votes
4answers
15k views

/usr/bin vs /usr/local/bin on Linux

Why are there so many places to put a binary in Linux? There are atleast these five: /bin/ /sbin/ /usr/bin/ /usr/local/bin/ /usr/local/sbin/ And on my office box, I do not have write permissions ...
55
votes
3answers
15k views

Why hard links not allowed to directories in UNIX/Linux

I read in text books that UNIX/Linux doesn't allows hard links to directories but soft links do. Is it because, when we have cycles and if we create hardlinks, and after some time we delete the ...
24
votes
5answers
4k views

Why do hard links exist?

I know what hard links are, but why would I use them? What is the utility of a hard link?
16
votes
8answers
718 views

How to tell what type of filesystem you're on?

Is there a command to tell what type of filesystem you're using?
4
votes
4answers
2k views

How to recover a file just deleted [duplicate]

I just deleted a file in Nautilus with Shift+Delete, which warned me that "If you delete an item, it will be permanently lost." I wonder if there is no way to recover the file? My OS is Ubuntu 10.10. ...
3
votes
2answers
6k views

How to show the filesystem type via the terminal? [duplicate]

Possible Duplicate: How to tell what type of filesystem you’re on? Find filesystem of an unmounted partition from a script How can I quickly check the filesystem of the partition? Can I ...
228
votes
3answers
59k views

What is the purpose of the lost+found folder in Linux and Unix?

There is a folder at the root of Linux and Unix operating systems called /lost+found/ What is it for? Under what circumstances would I interact with it? How would I interact with it?
48
votes
3answers
2k views

Why does '/' have an '..' entry?

This just baffles me. Why does the root directory contain a reference to a parent directory? bob@bob:/$ ls -a . build home lib32 mnt .rpmdb sys vmlinuz .. cdrom ...
20
votes
1answer
17k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
5
votes
2answers
357 views

mount options shown in /proc/mounts

IIRC then the mount options shown in /proc/mounts have changed. Some time ago acl and user_xattr were shown, now it seems that only noacl and nouser_xattr are shown if these features are turned off. ...
11
votes
3answers
2k views

What file systems on Linux store the creation time?

Are there any (good known, reliable) file systems on Linux that store the creation time of files and directories in the i-node table? If there are, is the "changed" time replaced by the creation ...
3
votes
2answers
4k views

How to repair a corrupted HFS+ partition from a damaged hard-disk?

I have a friend's Mac OS X disk that comes with an HFS+ partition. I am supposed to recover the personal data from this disk, and I'm not yet sure if the filesystem is corrupted or the disk is dying). ...
40
votes
5answers
20k views

Can I configure my Linux system for more aggressive file system caching?

I am neither concerned about RAM usage (as I've got enough) nor about losing data in case of an accidental shut-down (as my power is backed, the system is reliable and the data are not critical). But ...
22
votes
2answers
19k views

timestamp, modification time, and created time of a file

I just know that ls -t, -f give different sorting of files and subdirectories under a directory. Now I wonder what are the differences between timestamp, modification time, and created time of a ...
14
votes
1answer
1k views

What is Linux doing differently that allows me to remove/replace files where Windows would complain the file is currently in use?

The example I have is Minecraft. When running Bukkit on Linux I can remove or update the .jar files in the /plugins folder and simply run the 'reload' command. In Windows, I have to take the whole ...
14
votes
2answers
47k views

How to get the complete and exact list of mounted filesystems in Linux?

I usually use mount to check which filesystems are mounted. I also know there is some connection between mount and /etc/mtab but I'm not sure about the details. After reading How to check if /proc/ is ...
14
votes
5answers
19k views

Script to monitor folder for new files?

How do I detect new files in a folder with a bash script? I would like to process the files as soon as they are created in the folder. Is this possible to do so or do I have to schedule a script with ...
12
votes
3answers
2k views

How does the sticky bit work?

SUID The sticky bit applied to executable programs flagging the system to keep an image of the program in memory after the program finished running. But I don't know that what it's stored in ...
34
votes
7answers
2k views

ZFS under Linux, does it work?

Could I get ZFS to work properly in Linux? Are there any caveats / limitations?
32
votes
2answers
1k views

Why is '.' a hard link in Unix?

I've seen many explanations for why the link count for an empty directory in Unix based OSes is 2 instead of 1. They all say that it's because of the '.' directory, which every directory has pointing ...
14
votes
4answers
9k views

Clear unused space with zeros (ext3,ext4)

How to clear unused space with zeros ? (ext3,ext4) I'm looking for something smarter than cat /dev/zero > /mnt/X/big_zero ; sync; rm /mnt/X/big_zero Like FSArchiver is looking for "used space" ...
11
votes
3answers
3k views

(How) can I create a tmpfs as a regular (non-root) user?

The distribution is an Ubuntu server running the 2.6.35-30 Linux kernel. I would like to have a directory that sits completely in memory. Is this possible without root privileges?
7
votes
1answer
1k views

When was `relatime` made the default?

What is the first Linux kernel release to set relatime as the default mount option?
29
votes
9answers
30k views

Mount Google Drive in Linux?

Now that Google Drive is available, how do we mount it to a Linux filesystem? Similar solutions exist for Amazon S3 and Rackspace Cloud Files.
17
votes
1answer
19k views

How to determine the filesystem of an unmounted device? [duplicate]

Possible Duplicate: Find filesystem of a partition from a script How to show the filesystem type via the terminal? I'm looking for a command that yields the filesystem type as mount would ...
14
votes
2answers
4k views

Birth is empty on ext4

I was just reading up on the Birth section of stat and it appears ext4 should support it, but even a file I just created leaves it empty. ~ % touch test ...
17
votes
7answers
5k views

Linux equivalent to ReadyBoost?

Is there a kernel module or some other patch or something similar to Windows' ReadyBoost? Basically I'm looking for something that allows disk reads to be cached on a Flash drive.
13
votes
2answers
399 views

How can I be sure that a directory or file is actually deleted?

I know that most files, when deleted, aren't actually removed from the disk, and can be recovered later. How can I ensure that a directory I had deleted will actually be removed from the disk? Are ...
12
votes
1answer
5k views

Number of files per directory

I have a directory with about 100000 small files (each file is from 1-3 lines, each file is a text file). In size the directory isn't very big (< 2GB). This data lives in a professionally ...
11
votes
5answers
1k views

How can I copy a file and create the target directories at the same time?

I want to cp aaa/deep/sea/blob.psd to bbb/deep/sea/blob.psd How do I do the copy if the deep and sea directories don't exist under bbb so that the copy both creates the directories that are needed ...
20
votes
2answers
2k views

Where do the files go if you mount a drive to a folder that already contains files?

I just accidentally mounted a new drive to a folder that already contained files. I don't care about them and have them somewhere else, but that folder appears empty now. I'm curious what happened ...
18
votes
4answers
30k views

Recovering ext4 superblocks

Recently, my external hard drive enclosure failed (the hard drive itself powers up in another enclosure). However, as a result, it appears its EXT4 file system is corrupt. The drive has a single ...
16
votes
2answers
2k views

understanding “mount” as a concept in the OS

I want to understand what mounting is. It is used in different contexts and situations and I can't find resources which: Describe the mount concept Explain the actions taken by the ...
11
votes
5answers
406 views

Which application should I blame for compulsively creating a directory again and again?

There's an application on my system which keeps creating an empty ~/Desktop directory again and again. I can't stand capital letters in my home, nor I can stand this “desktop” thingy. So, as picky as ...
7
votes
2answers
3k views

Several questions about file-system character encoding on linux

Due to a lot of file exchange works between Windows (GBK encoding) and Linux (UTF-8 encoding), it will encounter character encoding issues easily, such as: zip/tar files whose name contains chinese ...
6
votes
4answers
2k views

How to setup a “data” partition shared by multiple Linux OS'es?

Currently I have a NTFS partition that contains shared data. My rationale is, NTFS doesn't have any idea about file permissions, so I won't have any trouble using them in a multi-boot system ...
3
votes
1answer
4k views

What is an inode? [duplicate]

Possible Duplicate: What is a Superblock, Inode, Dentry and a File? Documentation of Unix-file-systems contains often the term 'inode'. What is that and what does that? Why have ...
8
votes
4answers
3k views

How are directories implemented in Unix filesystems?

My question is how directories are implemented? I can believe a data structure like a variable e.g. table, array or similar. Since UNIX is Open Source I can look in the source what the program does ...
5
votes
3answers
831 views

What are the advantages of the Unix file system structure

If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system. Some scripts goes into /usr/share .. ...
5
votes
2answers
2k views

ISO file readonly?

I have an ISO file and I mount it under /mnt/isofile. Then I copied this file to another folder. But the contents are read-only and belonged to root. I tried to use chmod and chown. But it prompts ...
4
votes
3answers
577 views

Most unix-like filesystem that can be mounted under windows and Mac OS X

I've recently purchased a usb stick which I will be using to share data between me and my colleagues. I'd like to format it as ext3, but I know this will cause trouble because for instance Mac OS X ...
3
votes
1answer
285 views

How does the Linux file structure work?

I see the different folders bin, dev, mnt, proc, srv, sys, etc. What are the properties of all these different folders? What are there purposes? Are there files in some of them that I should not ...
2
votes
2answers
324 views

Can I recover from a system disk error on Ubuntu Linux?

I got a strange looking warning message in Windows Vista about a potential hard disk failure. I say strange because I have never in my life seen that type of warning in Windows. It suggested that I ...