0

I am new to GNU/Linux, but I'm trying to learn it and already deleted my Windows OS (yeeeaahhhhh).

Now I've already done the operation dragging the files in Nautilus, but i wanna know how to do it in terminal.

I've tried a lot of different commands and methods but I couldn't do it in terminal.

I had a partition (sda4) named Backup with a Folder named Videos inside and I wanted to move all the files(not the folder) in it to my /home/Videos Folder.

opening the terminal in Backup in Nautilus I've tried (also tried without "~") :

mv -v ~/Videos/* ~/home/wagner/Videos
mv -v ~media/wagner/Backup/Videos/* ~/home/wagner/Videos
mv -v ~/media/wagner/Backup/Videos/* ~/home/wagner/Videos
mv -v ~/media/wagner/Backup/Videos/* ~/home/wagner/Videos
mv -v ~/Videos/* ~/home/wagner/Videos

then I opened as root:

sudo -H gnome-terminal

and tried:

mv -v ~/media/wagner/Backup/Videos/* ~/home/wagner/Videos
lsblk
../
cd ../
cd /media
cd wagner
cd Backup
ls -l
mv -v ~/Videos/* ~/home/wagner/Videos
cd videos
cd Videos
ls -l
cd/
cd /
cd /media
cd wagner
cd Backup
mv -v /Videos/* /home/wagner/Videos
mv -v /Videos/*.* /home/wagner/Videos

Couldn't do it any way. So I'm posting everything I've done to you to help me find out why I couldn't do it. What I've did wrong ?

  • ~ is actually your home directory, i.e. /home/wagner. Don't put it in front of every path. – Byte Commander Oct 2 '16 at 21:50
  • Whats the output of df --output=target /dev/sda4? – heemayl Oct 2 '16 at 21:52
1

Your external disk is mounted at the location /media/wagner/Backup.
The directory where the files you want to copy are located is /media/wagner/Backup/Videos. The destination directory is /home/wagner/Videos or ~/Videos, which is the same.

Note that ~ is a synonym for /home/YOUR_USERNAME, i.e. /home/wagner in your case.

The command you want to run is this:

mv -v /media/wagner/Backup/Videos/* ~/Videos

Alternatively, if your current working directory is already /media/wagner/Backup, this is enough:

mv -v Videos/* ~/Videos
0

The ~ is the same thing as /home/wagner (your HOME directory)

You said you mounted sda4 as Backup, so go inside Backup and try: mv Videos/* ~/Videos

  • As you are talking to a new user it might be helpful to replace "go inside Backup" with the actual command to accomplish this, ie cd /media/wagner/Backup. – WinEunuuchs2Unix Oct 2 '16 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.