Tag Info

New answers tagged


From zany's comment to slm's answer (Move files and delete directories with rsync?) I would recommend these 2 commands as an answer: rsync -av --ignore-existing --remove-source-files source/ destination/ && \ find source/ -depth -type d -empty -exec rmdir "{}" \; The advantage is, like zany said, there is still some danger involved in using rm ...


Had a similar problem with a file named "\033" (the actual "Escape" character). for x in $( ls | awk '!/^[A-Z]/ && !/^[a-z]/ && !/^[0-9]/');do rm -i -- $x ; done The above will prompt you to remove files in the current directory that do not start with a letter or number.

Top 50 recent answers are included