How to remove directories from source after copying them?
Posted
by
user55542
on Super User
See other posts from Super User
or by user55542
Published on 2012-07-01T19:53:36Z
Indexed on
2012/07/01
21:19 UTC
Read the original article
Hit count: 249
file-management
|gnu
I just want to move dirs. I looked successively at mv, cp and rsync, since each tool in turn didn't seem to have the option to remove directories from source after copying them. For instance, mv needs files, not dirs, when src and dst are on different devices:
"inter-device move failed: src to dst; unable to remove target: Is a directory"
Perhaps the simplest way to do this is by using an additional deletion cmd, although I'd prefer not to use it, since that increases risk of data loss.
© Super User or respective owner