dcsimg
Linux Today: Linux News On Internet Time.




More on LinuxToday


How to exclude a set of files from disk space usage calculation using du

Mar 09, 2011, 13:02 (0 Talkback[s])

WEBINAR:
On-Demand

Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers


"We have already discussed the most common options used with du - a tool to check/calculate file space usage. In its most basic form, du tells you the size of all the files in a given directory. We have already discussed the most common options used with du - a tool to check/calculate file space usage. In its most basic form, du tells you the size of all the files in a given directory. Using -s option it sums up the total size of a directory, but what if we don't want to include a set of files while calculating the utilized space. Using the --exclude and --exclude-from option, we can easily mention the files to be excluded.

"Lets say we want to exclude all the *.png files while calculating the file space usage."

Complete Story

Related Stories: