开发者

"Substract" folder from another one (reverse copy)

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜