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

learn more… | top users | synonyms (2)

3
votes
2answers
2k views

file block size - difference between stat and ls

I've noticed that when I do a: ls -ls file It provides block count, say 8 blocks. When I do: stat file I notice that the block count is 16, twice the number given by ls. The block size on my ...
15
votes
3answers
11k views

What is the most high-performance Linux filesystem for storing a lot of small files (HDD, not SSD)?

I have a directory tree that contains many small files, and a small number of larger files. The average size of a file is about 1 kilobyte. There are 210158 files and directories in the tree (this ...
4
votes
1answer
880 views

Sparse files/file holes and unexpected block size

For my own learning, I've been playing around with creating files with file holes. I created a util that simply reads from stdin and writes to a file, but before writing to the file, it uses lseek to ...
2
votes
2answers
646 views

How to detect and stop user from deleting particular file on Linux?

Is it possible to monitor user actions on the file system and prevent him from performing particular actions? Can inotify only monitor actions on the file system? What about fanotify? There's very ...
9
votes
4answers
853 views

Is there a way to sync only one partition?

Is there a way to sync only one partition instead of all partitions? Something like "sync /dev/sdc1".
1
vote
0answers
1k views

/etc/fstab is mounting rw filesystem as read-only

A partition of my internal hard drive (not the root partition) I want to mount automatically on boot. I've been using /etc/fstab to mount my external backup drive automatically read-only, so this is ...
3
votes
5answers
2k views

How to make a variable symlink ? (or something similar)

How can I make a variable symlink that would point to a different location according to the current user? Is it possible? Should I use something else instead? A mount point? How? Here is the problem ...
3
votes
5answers
2k views

how to mount this disk?

I'm trying to mount a disc created some time ago in Amazon EC2. This is what I see (line breaks added for the sake of readability): $ sudo file -s /dev/xvda4 /dev/xvda4: x86 boot sector; partition 1: ...
5
votes
2answers
645 views

Immutable bit on AIX?

Under Linux I can: chattr +i SOMEFILE so that even root can't modify the SOMEFILE. Are there any similar solutions for AIX?
3
votes
1answer
103 views

Copying a file that is written at the same time

This related question can't solve my exact problem, so I'm writing a similar question. My scenario is the following: a program (run by wine) writes to a file sized about 10-500 KB. About 1 KB ...
0
votes
1answer
472 views

trouble with irssi and cifs

I'm having trouble getting irssi, the irc client, to write to a mounted cifs share. I have the uid, and gid set to my user as well as setting the permissions on the share to being very permissive. ...
0
votes
1answer
139 views

System crashes during boot while mounting /lib/init/rw

After a nasty crash, my system keeps crashing during boot. After a little bit of investigation I have discovered that it crashes executing the following function (in /lib/inin/mount_functions): ...
3
votes
3answers
1k views

ReFS but for Linux

Microsoft is going to bring a "Resilient FileSystem" with Windows 8, but only for servers. I'd like that on a Linux desktop, but my search reveals no contender. There are so many filesystems for ...
8
votes
3answers
4k views

Mount a filesystem read-only, and redirect writes to RAM?

Is it possible to mount a loopback file as read-only, and redirect all writes to RAM?
2
votes
2answers
112 views

What file system is my file on?

How do I figure out which file system a given file/directory is located on? (For example, I would like to know if the file/directory is a temporary file in RAM, or if it's stored on disk. And what ...
13
votes
3answers
1k views

Where do open file handles go when they die?

What happens to the files that are deleted while they have a file handle open to them? I have been wondering this ever since I figured out I could delete a video file while it was playing in MPlayer ...
4
votes
2answers
2k views

How does linux work with symbolic links?

I mean what's going on when some process wants to read a symlink? What's going on when something changes a symlink during a read or even write process? For example: I have 2 huge, similar 100G files ...
4
votes
2answers
762 views

Salvaging a “broken” hard drive

My girlfriend's macbook's hard drive failed, so I gave her a new one and reinstalled OSX on it. Works fine. However, I wanted to see if I could use her old hard drive for backups/fun. I was able to ...
18
votes
1answer
15k 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% ...
6
votes
3answers
2k views

Safely use SD cards when power can go out at any time

We're working on a small embedded Linux system (2.6.35-ish) with a smallish internal NAND device for the OS and applications (250-500Meg) and an SD card with 8Gb SDHC SD cards for data. The unit's ...
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?
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 ...
0
votes
0answers
95 views

At the root level (/) directory, why is that .. refers to itself? [duplicate]

Possible Duplicate: Why does '/' have an '..' entry? I understand that in the filesystem hierarchy starting with / as top-level directory, under which all the other sub ...
6
votes
3answers
1k views

Make changes to /sys persistent between boots

I want to make "echo 1 > /sys/kernel/mm/ksm/run" persistent between boots. I know that I can edit /etc/sysctl.conf to make /proc filesystem changes persist, but this doesn't seem to work for /sys. ...
-1
votes
1answer
226 views

How can I tell when a file was modified?

I am running some simulation on a high performance computing cluster (HPC). When I check when the file was changed with ls -t I get the wrong result. I know this becouse I have run a small job that ...
1
vote
0answers
119 views

Can't mount remote file system with sshfs [duplicate]

Possible Duplicate: How to apply changes of newly added user groups without needing to reboot? I have posted this question in linux mint users forum about some hours ago. I'm trying to ...
13
votes
5answers
15k 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 ...
1
vote
2answers
1k views

Choosing a filesystem for a shared disk (not a cluster filesystem like GFS)

I have a bunch of servers connected to a SAN. One server hosts the production database server, performing full database backups to a filesystem on a LUN that is exported to all servers. Only the ...
2
votes
3answers
1k views

What filesystems can be shrunk online in 2011?

I'm asking because, for example, https://en.wikipedia.org/wiki/Comparison_of_file_systems#Features states that EXT3 can be shrunk online. But when I click on the reference: "Offline ...
2
votes
1answer
5k views

Mounting ufs partition with read/write permissions on ubuntu 10.04

According to this writeup ufs kernel module is compiled with only read permissions. I could mount a ufs partition with this command: sudo mount -t ufs -r -o ufstype=ufs2 /dev/mapper/loop0p1 ...
16
votes
2answers
315 views

How does “rm” on a NTFS filesystem differs from Windows' own implementation?

I have an external USB disk with an NTFS filesystem on it. If I remove a file from Windows and I run one of the several "undelete" utilities (say, TestDisk) I can easily recover the file (because ...
4
votes
3answers
2k views

What do first column in /proc/mounts really mean in Linux?

Run cat /proc/mounts and I get this (simplified): rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/sda1 / ext3 rw,relatime,errors=continue,barrier=1,data=ordered 0 0 io /etc/blkio cgroup ...
3
votes
2answers
452 views

How does Linux keep track of filesystems?

As I know, Linux has an abstract layer of all filesystems and this layer is VFS. If I create a new filesystem, I should follow rules made by VFS (see "Anatomy of the Linux virtual file system switch" ...
11
votes
2answers
38k 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 ...
1
vote
1answer
267 views

Do memory-backed filesystems (like sysfs and procfs) have superblock and inode table?

From "Design and Implementation of the Second Extended Filesystem" I know that ext2 has superblock and inode table stored in disk and superblock will be accessed when mounting the filesystem. Do ...
-1
votes
1answer
881 views

List mount points owner and group [closed]

I'm running HPUX 11.x and I was wondering if there's a command that would list all the mount point owner and group. I want a listing like df or bdf but with ownership information.
2
votes
0answers
93 views

“cd //” and “cd /” what is the difference? [duplicate]

Possible Duplicate: unix, difference between path starting with '/' and '//' If I make a cd // followed by a pwd I see: # cd // # pwd // why is that? what's the differece ...
1
vote
1answer
4k views

How to decrease the size of a logical volume/fs aix?

oslevel -s 6100-03-03-0943 IF I have a Logical Volume that I need to shrink, then how can I do it? [there could be several FileSystems on it...]. What is the process?
13
votes
3answers
425 views

When does `ls -s` print “0”

Of course, the standard way of testing if a file is empty is with test -s FILE, but one of our clients have received a script containing tests like this: RETVAL=`ls -s ./log/cr_trig.log | awk '{print ...
4
votes
1answer
365 views

What filesystem has best support for shrinking?

Most mainstream filesystems can be grown fairly reliably, but what if I think I would like to shrink in future? XFS is a non runner. Reiser seems to have good support but gives scary BETA warnings , ...
2
votes
1answer
6k views

Changing user and group ID system wide (including file system attributes)?

(this question possibly related to Linux: simulating/masking user ownership upon mount of 'external' partitions? - Stack Overflow) I typically use Ubuntu (currently 11.04) as my desktop OS; let's say ...
2
votes
2answers
1k views

How to create a new partition in Ubuntu

I want to build my own Linux as "Linux From Scratch". I need to get a new partition from my hard disk. I checked and saw I have sda1. (I have about 20G empty) When I use the fdisk command n, I can ...
1
vote
1answer
972 views

Mount a Rackspace drive in Linux

Is there any software that will allow me to mount a Rackspace drive in linux? I want to copy SQL files from my database onto my Rackspace. I have web min running a backup nightly and copying those ...
6
votes
1answer
2k views

How does the Unix “fsck” differ from the Windows “chkdsk”?

What are the differences between Unix's fsck and Windows' chkdsk?
6
votes
2answers
3k views

mount freebsd slice partition under linux

I have under linux: Device Boot Start End Blocks Id System /filename.img * 63 1007999 503968+ a5 FreeBsd Under above partition i have two ...
3
votes
3answers
4k views

What is metadata, and how does it aid in the “fsck” process?

If I understand it correctly, "fsck" is used in UNIX systems to check for internal consistency within disks after there has been a crash. I was wondering, then, how it uses "metadata" to make sure ...
1
vote
1answer
705 views

Switching runlevel when moving /var to another partition

I'm running Ubuntu 10.04 and I would like to move /var to another partition using a python script. I found some directions that I thought were pretty good, but they call for switching to runlevel 1 ...
1
vote
2answers
236 views

Is there file format for checksums?

I want to store SHA512 checksum of the file for my application. How to do it in common (popular) way? So this checksum can be used but by third party application too.
8
votes
3answers
363 views

Symlink to part of the file?

Is there possible to create file that is just a sub-sequence of bytes from another file, like a symlink, but referencing only part of the file?
4
votes
4answers
2k views

mount ramfs as user

My fstab entry: none /home/jreinhart/ramdisk ramfs defaults,user 0 0 The directory before mounting: drwxrwxr-x 2 jreinhart jreinhart 4096 Oct 17 11:31 ramdisk The directory after ...