I copied some files from a folder to another folder using the command cp -R ~/foo/* /
Now I want to undo this. I know this is possible, 开发者_如何学Cbut what would be the easiest way to achieve this?
Something like this might work:
for f in `ls src`
do
rm "dst/$f"
done
Watch out for icky filenames with whitespace in them though.
精彩评论