I cannot find an example of what I want to do and, from what I'm reading, the default behavior of du on my system is not the proper default behavior.If I ls my /data folder, I see (removing the stuff that isn't important):ghsghsb -> ghshoperssf -> roperroperInside each folder is a set of folders with numbers as names. I want to get the total size of all folders named 14, so I use:du -s /data/*/14And I see...161176 /data/ghs/14161176 /data/ghsb/148 /data/hope/14681564 /data/rssf/14681564 /data/roper/14What I want is only:161176 /data/ghs/148 /data/hope/14681564 /data/roper/14I do not want to see the symbolic links. I've tried -L, -D, -S, etc... I always get the symbolic links. Is there a way to remove them?
du skip symbolic links
shell;symlink;wildcards
This isn't du resolving the symbolic links; it's your shell.* is a shell glob; it is expanded by the shell before running any command. Thus in effect, the command you're running is:du -s /data/ghs/14 /data/ghsb/14 /data/hope/14 /data/rssf/14 /data/roper/14If your shell is bash, you don't have a way to tell it not to expand symlinks. However you can use find (GNU version) instead:find /data -mindepth 2 -maxdepth 2 -type d -name 14 -exec du -s {} +