# rm -rf *
i get this message:
bash: /bin/rm: Argument list too long
how to delete them? here are two ways i usually take, which ever i remember first LOL
a. you can write a file containing the list of files you want to delete
# ls > del_list
append a delete command at the start of each line
:%s/^/rm -rf /g
then execute
# sh del_list
b. you can use the find command with action
# find . -maxdepth 1 -type f -exec rm {} \;
use whichever suits your mood ;D
additional note: use this to delete directories 10 days and older, with spaces in filename...
# find . -type d -mtime +10 -exec rm -r "{}" \;
No comments:
Post a Comment