I know it's been asked a million times, but I can't find the answer to what I'm trying to do specifically.
Here's the directory structure:
Main Folder1
|
|-Subfolder 1
|-Subfolder 2 HasAReallyLongName
|---files
|-Subfolder 3-1000
Main Folder2
|
|-Subfolder 2 HasAReallyLongName
|---files
- I want to try to achieve moving Subfolder2 with its files to a different directory.
- I don't want to copy and then remove anything because I don't have enough space.
- I don't want to
mv /Main/Sub2/* /Main2/
because that puts everything in the/Main2
folder and not in a subdirectory. - I don't want to
mkdir /Main2/...
because it's a really long name (timestamps mostly) and I don't want to manually type it (and probably mess it up) - As far as I know,
rsync
copies the files too, so I'm not sure that it would work.
Any suggestions or other tools would be much appreciated!
mv /Main/Sub2 /Main2/
. See if it helps. Note the subtle difference in our commands. – amanthethy Jul 25 '14 at 20:38-r
flag. Or even-rf
. – amanthethy Jul 25 '14 at 20:46-r
is an invalid option...cp
has a -r for recursive but notmv
– mktoaster Jul 25 '14 at 20:56