Re: du, find/xargs/sort, and MP3.tar
# [EMAIL PROTECTED] / 2002-10-23 17:05:48 -0400: > On 22 Oct 2002, Gary W. Swearingen wrote: > > Peter Leftwich <[EMAIL PROTECTED]> writes: > > > Then I thought I'd get crafty and > > > `tar tvf MP3.DONE0415021909MPT.tar > the-tarfile.out` thinking I > > > could later run things through `sort` but I am hung up on how to > > > get similar output that shows the contents of MP3/. > > tar cf - MP3/ | tar tvf - >the-mp3dir.out > > Could someone step through what this is doing? I thought you could use "-" > (stdin?) only once on a command line. the first tar sends the tarball to stdout, the second reads it from stdin. your shell connect those two together. > My question was more about using less CPU time with something simiar > to "find" or `ls -alR | sort` the output of `ls -alR` is not suitable for what you want. `tar tvf` with find(1) is your best bet. -- If you cc me or take the list(s) out completely I'll most likely ignore your message. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: du, find/xargs/sort, and MP3.tar
On 22 Oct 2002, Gary W. Swearingen wrote: > Peter Leftwich <[EMAIL PROTECTED]> writes: > > Then I thought I'd get crafty and `tar tvf MP3.DONE0415021909MPT.tar > > > the-tarfile.out` thinking I could later run things through `sort` but I am > > hung up on how to get similar output that shows the contents of MP3/. > tar cf - MP3/ | tar tvf - >the-mp3dir.out Could someone step through what this is doing? I thought you could use "-" (stdin?) only once on a command line. My question was more about using less CPU time with something simiar to "find" or `ls -alR | sort` -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: du, find/xargs/sort, and MP3.tar
Peter Leftwich <[EMAIL PROTECTED]> writes: > Then I thought I'd get crafty and `tar tvf MP3.DONE0415021909MPT.tar > > the-tarfile.out` thinking I could later run things through `sort` but I am > hung up on how to get similar output that shows the contents of MP3/. tar cf - MP3/ | tar tvf - >the-mp3dir.out To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
du, find/xargs/sort, and MP3.tar
Here's a doozy for you. I'm trying to compare a directory called MP3/ with a huge file called MP3.DONE0415021909MPT.tar -- the idea being to make sure the contents are similar (I've touched new files in the MP3/ directory since untarring, so they won't be exactly the same...) I tried some commands along the lines of these: # du -hs MP3/ 1.6GMP3/ # du -hs MP3.DONE0415021909MPT.tar 1.2GMP3.DONE0415021909MPT.tar Erg, wait this proves nothing; I'd have to untar and THEN du -hs :( Then I thought I'd get crafty and `tar tvf MP3.DONE0415021909MPT.tar > the-tarfile.out` thinking I could later run things through `sort` but I am hung up on how to get similar output that shows the contents of MP3/. # find MP3/ -type f | wc -l OR? # find MP3/ -type f -exec ls -al {}\; | more OR? # find MP3/ -type f -print | xargs or something like that | sort... Could one of you /\/\aster$ work some unixiacal magic on my task? =^) It soothes my soul to know you care. -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message