Hi
I trying to delete 10000 files in a directory, for this I am using a script - but I can't get it to work.
1) I do a "ls > del" - this gives me a file contaning the file names of all the files that I want to delete.
2) This is my script that I use to run though the file and deleting all the files - CAN'T CET IT TO WORK
#!/bin/ksh
for item in 'cat del'
do
rm $item
echo $item
done
It tells me that cat is not a file - I tryede removing cat from the script - but them it just deletes the file "del"
Thanks
I trying to delete 10000 files in a directory, for this I am using a script - but I can't get it to work.
1) I do a "ls > del" - this gives me a file contaning the file names of all the files that I want to delete.
2) This is my script that I use to run though the file and deleting all the files - CAN'T CET IT TO WORK
#!/bin/ksh
for item in 'cat del'
do
rm $item
echo $item
done
It tells me that cat is not a file - I tryede removing cat from the script - but them it just deletes the file "del"
Thanks