mv is a UNIX command to move a file to another directory or rename it.

learn more… | top users | synonyms

1
vote
3answers
266 views

mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy*

I simply try to move file to another path and I'm getting mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy* I've tried using lsof, but it's not showing any openfiles. lsof +D ...
2
votes
1answer
175 views

Move all files in sub-directories to current directory while renaming duplicates

I have a number of subdirectories and I would like to move any files contained therein to the current directory using a one line Terminal command on the Mac. I know that my file names are not all ...
2
votes
1answer
104 views

I lost a folder that I mv'ed from one partition to another (NTFS, windows) partition - Can I retrieve it using Windows?

I have used the mv command to move a folder from my Linux partition onto my Windows partition (mv /home/FOLDER /media/WINPARTITION/User/Me/Music/FOLDER). I have read a lot now and understand (I ...
1
vote
1answer
52 views

Instead of “mv filename.sql newfolder” I did “mv filename.sql /newfolder” and wiped out a bunch of files?

Like I said, I moved a bunch of sql files but instead of moving them to a directory I seem to have renamed them and put them all in the root directory as one file named "newfolder" Can I undo this or ...
1
vote
1answer
127 views

Move group of files into subdirectory

I want to move some ssh keys into a backup file. Specifically, I want to move id_rsa* into key_backups/, a subdirectory of .ssh. mv id_rsa* key_backup/ gives me back usage: mv [-f | -i | -n] [-v] ...
0
votes
1answer
33 views

I accidentally put a space in my path then moved lots of files - where are they?

I used the following code to move a lot of files: sourceDIR=/Volumes/MCOOPER/data destDIR=/Volumes/MCOOPER2 /data for i in {1..6000} do mv $sourceDIR/run$i.mat $destDIR/ done Now all my files are ...
0
votes
1answer
101 views

How do I create numbered backups?

Some GNU utils (e.g., mv and cp) can create numbered backups (foo.~1~). Others (e.g., wget) cannot. I would like to create numbered backups before running tools which overwrite files by default. Here ...
0
votes
1answer
394 views

Creating a tar with a absolute path

tar -cf /Users/Files/myfile.tar /Users/Files/ I am basically trying to create a tar containing the contents of User/Files and create it in the folder of the contents. I can only execute this ...
0
votes
1answer
58 views

Want to move file over network (not copy)

I would like to move file on network [Linux]. This is not working: mv {file} user@machine:/ How can I do this? And I prefer not using scp command to first copy and delete.
0
votes
1answer
881 views

Moving files between home directories

Good morning, I am attempting to setup a cron job on my CentOS machine that will transfer a file from one users home directory to a directory in anothers. btiseis@mymachine [~]# mv ./myfile.csv ...
1
vote
0answers
76 views

How to rename a folder in Linux?

I want to remove folder aaa and rename folder bbb to aaa. Both have subfolders in them. Seems simple enough using: rm -r aaa; mv bbb aaa However, any subfolders in bbb disappear where I would ...
0
votes
0answers
25 views

mv backup but instead of creating tilde directories, create tilde files in subdirectories?

I have 2 deep directory structures that are (probably) identical and I want to end up with a single one, but not auto-resolve existing conflicts (I'm guessing rsync would clobber something). I just ...