Tuesday, March 25, 2008

Couple of linux commands/scripts that came in handy ...

Here is on to get a listing of the all the files stored in one or more tar files.

for i in *.tgz; do tar -xvzf $i; done > a.txt

Here is one to count the number of files in a folder:

ls -al wc -l

e.g. ls -al a* wc -l