New answers tagged


ls -s lists the amount of storage space used by the file's content (excluding space used for metadata). This can differ from the file size in two ways: In most cases, the file size is rounded up to a whole number of blocks. The size of a block is typically 512B to 4kB but it depends on the filesystem (and some filesystems don't have this concept). If the ...


You're using the -s option to ls. A file's size and the amount of disk space it takes up may differ. Consider for example, if you open new file, seek 1G into it, and write something, the OS doesn't allocate 1G (plus the space for something) on disk, it allocates only the same for something -- this is called a "sparse file". I wrote a small C program to ...


echo "`blockdev --getbsz /dev/sdc`/1024"|bc will show output in KB [root@veritas datadg2]# echo "`blockdev --getbsz /dev/sdc`/1024"|bc 4 [root@veritas datadg2]#


With 3.2 million inodes, you can have 3.2 million files and directories, total (but multiple hardlinks to a file only use one inode). Yes, it can be set when creating a filesystem on the partition. The options -T usage-type, -N number-of-inodes, or -i bytes-per-inode can all set the number of inodes. I generally use -i, after comparing the output of du -s ...

Top 50 recent answers are included