Posts Tagged ‘shell’

excluding files from tar

Wednesday, June 2nd, 2010

For the website I work on for my company I have a very large number of files in a single folder that is strictly data for the clients and not data I have to regularly modify.  So when I’m doing a tarball/gzip of my files on the server I need to exclude that folder and all it’s subfolders from the process, here it is:

~# tar -czf /home/test/download.tgz ./ --exclude="*/events/auto/*" --exclude="*/images/waveforms/*"

Till Next Time

size of linux folder

Thursday, December 10th, 2009

Another quick post here.  I can never remember the command for getting the size of a folder in linux.  A quick search brought me here.  Patched together a few commands and it goes like this:

~ du -sh /path/to/dir

Till Next Time

PS- isn’t it interesting that all my quick posts are about linux commands…