Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th October 2009, 02:20
overkill overkill is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Echo Missing Files From Partition

I'm trying to clean up my samba share and need to echo out the files which are missing from the directory recursively. If it finds the file from the list it simply echo's the path. If it doesn't find it from the path then it echo's out the missing file. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?

for FILE in `cat list`; do

if [ ! -z `find /opt -name $FILE` ];
then
echo "File $FILE does not exists"
else
echo "$FILE exists"
fi

done
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
ERROR: Could not append message to INBOX.Sent maykel535 Server Operation 12 27th August 2009 16:50
The system is currently updating the configuration files. warlock General 8 21st February 2009 18:15
CentOS 4.4 (64-bit) Installation Script Bailx Tips/Tricks/Mods 10 22nd February 2008 01:20
I'm bored linuxfast Smalltalk 8 23rd September 2005 13:41


All times are GMT +2. The time now is 20:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.