Script – Avoid argument too long error
When removing 10,000’s of files with rm -f * you get an argument too long error.
#### Remove too man files.
#### First find -name ‘*’ > filelist
#!/bin/bash
for i in $( cat filelist );
do
echo $i
rm -f $i
done
#####
##### Easier way to remove too many files right from command line
#####
ls|xargs rm -f