Search Results

Search: Posts Made By: ravi2082
4,906
Posted By ravi2082
FILES=`find /somedir -type f -mtime +$DAYS` ...
FILES=`find /somedir -type f -mtime +$DAYS`

for f in $FILES
do
rm $f

done


Some filenames have spaces and this is causing an error while deleting.
Any way to rectify this ?

Thanks...
4,906
Posted By ravi2082
Traversing thru dirs and deleting files based on date
Hi Folks

I am pretty new to unix and shellscripting.
I need help on writing logic on traversing recursively through a set of directories under a top-level folder and delete files(mostly text)...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy