![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Liv Benson to You, Bitch
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. ![]()
__________________
![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Liv Benson to You, Bitch
Industry Role:
Join Date: Aug 2007
Location: Maryland and WV
Posts: 6,060
|
Thank you man. I didn't even think that way.
Thinking more of a programer with loops and ifs. Happy holidays to you !!!
__________________
![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |