![]() ![]() In addition, in modern filesystems we can have snapshots, sparse files (files with holes in them) that further complicate the situation. ls -ls dirĪlso du will give you real disk usage, in 1KiB units, or dutree with the -u flag.Įxample: usage of a 1 byte file $ echo "" > file.c If you want a more compact view for a directory, you can use ls -ls, which will give you usage in 1KiB units. ![]() If you use the command stat you can see both figures side by side. This is also helpful in knowing which files take the most space on your system. You can use the -S option of the ls command to sort files by size. You should combine with -h to show the file size in human readable form. Modern block size is 4KiB, so files will use disk space multiple of 4KiB, regardless of how small they are. The ls command also has -s option to display size. The main difference between the two comes from the fact that files are "cut into pieces" and stored in blocks. You have to differenciate between file size and disk usage. add line described above and save file by pressing Ctrl+X and Y. You can easily set it yourself by executing alias ll="ls -la" on the command line, or by adding this entry in your. UPDATE: what I didn't know was that on Ubuntu it's a pre-configured alias. ![]() The biggest advantage for me is that it's quick and really intuitive to use. I've noticed that not all Linux distributions support this command, but there's probably a workaround/install for each distro out there.ĭrwxr-xr-x 27 root root 4096 Jan 26 09:13. I'm a Ubuntu 16.04 user myself and I find that the ll command is by far the easiest way to see a directory's contents. 0,0 B 0,0 B 0,0 B 0,0 B 0,0 B vmlinuzĭelete the currently highlighted element with d, exit with CTRL + c After a few seconds for analyzing the path, you will see something like this: $ ncdu 1.11 ~ Use the arrow keys to navigate, press ? for help There is also a great ncdu utility - it can show directory size with detailed info about subfolders and files. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |