Answer by Lei Zhao for Using --exclude with the du command
If you have to be on macOS, you install GNU Coreutils with the following command. brew install coreutils Most of the commands installed by Coreutils are prefixed by g, since they have a BSD namesake...
View ArticleAnswer by Ben Lutgens for Using --exclude with the du command
awesome to skip the virtual file systems like so du -hsx --exclude=/{proc,sys,dev} /*
View ArticleAnswer by Dave Neeley for Using --exclude with the du command
To exclude multiple directories, just pass the --exclude flag again. du -ch --exclude=relative/path/to/uploads --exclude other/path/to/exclude
View ArticleAnswer by rozcietrzewiacz for Using --exclude with the du command
You've almost found it :) du -ch --exclude=./relative/path/to/uploads Note no asterisk at the end. The asterisk means all subdirectories under "upload" should be omitted - but not the files directly in...
View ArticleUsing --exclude with the du command
This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads...
View ArticleAnswer by jedi for Using --exclude with the du command
To exclude multiple foldersdu -ch --exclude={path/to/folder1,path/to_folder2/,...,}
View ArticleAnswer by Rob Morton for Using --exclude with the du command
Just adding a Mac exampledu -skI "Downloads" -I "Caches" -I "Logs" -I "OneDrive" .I do not see a way to use the -I with a path, so for example, I haven't gottendu -skI "Downloads" -I "Caches" -I "Logs"...
View ArticleAnswer by michfuer for Using --exclude with the du command
To get the total size of files in files/ excluding all sub-directoriesdu -ch path/to/files --exclude=path/to/files/*/*
View Article
More Pages to Explore .....