Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-22-2011, 08:15 PM   #1
Just Alex
Liv Benson to You, Bitch
 
Just Alex's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Maryland and WV
Posts: 6,060
Any unix gurus around? Need some help.

So I have a list of file names in txt format that should be in directory A. Turns out that some files are missing and I need to find out which ones. Is there way to run thru the list of required files from files.txt and spool list of missing files to missing.txt ?

so I have ---> xargs -a files.txt ......

Help brother out.
__________________
Just Alex is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 08:18 PM   #2
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
ls -1 a/ >have.txt
diff -Bb have.txt want.txt
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 08:20 PM   #3
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Ps you may need to sort your list first:
sort want.txt > sorted.txt

diff sorted.txt have.txt


diff is also great for figuring out what changed between two versions of a file:
diff -Bb file.bak file.html

Last edited by raymor; 12-22-2011 at 08:21 PM..
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 08:23 PM   #4
Just Alex
Liv Benson to You, Bitch
 
Just Alex's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Maryland and WV
Posts: 6,060
Quote:
Originally Posted by raymor View Post
ls -1 a/ >have.txt
diff -Bb have.txt want.txt
Thank you man. I didn't even think that way.
Thinking more of a programer with loops and ifs.
Happy holidays to you !!!
__________________
Just Alex is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.