![]() NOTE: This can take a long time with a lot of files. ![]() type f -exec du -h which will use the first command line argument if provided, or use the current directory if called without arguments. If you do need the full path of the files, use something like this: find. Down side of this command is that it does not show the full path of the files. rn means Reverse and numeric to get the biggest files at the top. To add recursion, I would leave the sorting of the lines to the sort command and tell it to use the 5th column to sort on. On my system this only shows regular files. This should only leave regular files: ls -lS | grep '^-' ![]() Symbolic links always start with a letter l, as in link.Ĭhange the command to filter for a. I see now how it still shows symbolic links, which could be folders. ![]() To exclude directories (and provided none of the file names or symlink targets contain newline characters): ls -lS | grep -v '^d' If you want to sort in reverse order, just add -r switch. Simply use something like: ls -lS /path/to/folder/ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |