working with tar archives...
August 13, 2008 10:10 PM
Subscribe
How can get the sum of the files sizes of all php and css files within specific folders of a tar archive?
Ultimately, I want to create a graph showing how code grew over the duration of a project. To do that, I would like to build a script that sums the sizes specific files of specific types within specific directories of the archive file.
I have a folder containing a couple hundred backup files of a web development server. The backup files were archived using the "tar czf" command line.
In each archive file, I want to search within the following directories for php and css files:
var/www/dev/
var/www/dev/includes
var/www/dev/css
Subdirectories of these directories should not be searched.
Can you guys get me on my way?
So far I'm stuck trying to list files I need in the tar file. I have:
tar -ztvf archive_name.tgz var/www/dev/
which is listing all subdirectories and all file types.
The OS is Ubuntu 8.04 Server Edition
Thanks in advance!
posted by timebomb to computers & internet (18 comments total)
2 users marked this as a favorite
posted by hattifattener at 10:33 PM on August 13, 2008