I need to move my folder with many subfolders to another path.
I'm using putty and this is what I tried:
MV -r fromflderpath tofolderpath
What am I doing wrong?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
mv command doesn't have an
-R flag, it moves folders recursively:
sudo mv fromPath/ toPath/
If you want a file not to be replaced, use the
-i for being prompted in case a file with the same name exists.
For those trying to move folder, on Ubuntu using Putty, just use the following command:
sudo mv /fromPath/ /toPath/
sudo mv /root/folder1 /home/folder2/
"/" in the end means you are going to move folder1 inside folder2
If you don't, you will get "no such file or directory"
This worked for me:
mv src_folder target_folder/src_folder
mv src_folder target_folder/
If it's hard to use pure shell commands - you may want to install console application Midnight Commander, that makes it easier..
$ sudo apt-get install mc
In Midnight Commander move folder or file from one panel to another is [F6], copy [F5]
If you need root access
$ sudo mc
If you want to have a mouse support
$ sudo apt-get install gpm