First of all thanks for the replies, the set of commands dont exactly do what i want though unfornutely
@radoulov
Is it possible to modify this slightly to ask the user first before deleting, I have been trying to play around with but cant figure out correct syntax
Code:
find $dir -name "*.txt" -exec echo "delete y/n" {} \; read x {} \;
@cfjohnson
this doesnt seem to search the correct directory, I found an example which will search the correct dir e.g.
Code:
for file in `find $dir -name "*.txt"`; do
The only problem is that some files have spaces in their names for example "/etc/space inFilename"
and then it prints the file out twice ie
/etc/space
inFilename
is there anyway to print it out as one?
Thanks again
Calypso