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

learn more… | top users | synonyms

3
votes
1answer
3k views

mv: inter-device move makes moving a directory to a directory with same name a different operation?

Given: # mv /mnt/hard/git-src/ /usr/portage/distfiles/ mv: inter-device move failed: /mnt/hard/git-src/' to /usr/portage/distfiles/git-src'; unable to remove target: Is a directory ...
2
votes
1answer
351 views

XCopy on server?

Normally, on my website, files are either handled by WordPress or by me doing FTP. I'd like to copy my entire site to a new folder. I don't want to copy it down to my local drive (with wget) and then ...
2
votes
2answers
673 views

Literate way of moving all files to a new subdirectory

$ mkdir backup && mv * backup/ mv: cannot move `backup' to a subdirectory of itself, `backup/backup' Works, but issues a warning. Also exit code is 1. How to do it properly (but not [much] ...
2
votes
1answer
140 views

Don't move a directory/file if src and dest are on different partitions

In order to protect myself if I make a mistake in typing a directory/filename path, I am searching for a way to prevent mv from doing anything if the source and destination files exist on separate ...
2
votes
1answer
141 views

Bizarre mv operation

The use of a renaming program severely screwed up some of my files. I'm trying to get them back in order. I have file structure like this: ./Hello World/some-filename.ext ./Kitty Parade/another.ext ...
0
votes
3answers
3k views

Recursive move files of specific type to a specific path

In ~/my/path, I want to move all files that contain string "(J)" and have file type of ".foo" to ~/my/path/j I'm trying: [me ~/my/path]$ find -type f -name "*(J)*.foo" -print0 | xargs mv -0 j/ No ...
0
votes
2answers
959 views

How to move all files in a subdir to another dir

I have untar wordpress. It creates a wordpress dir. I want to move the files under this dir to mydomain.com dir but this doesn't work mv wordpress/* mydomain.com What's the syntax then ? Thanks.
3
votes
3answers
12k views

Unix Bash rename files using a regex

I would like to rename all files from a folder using a regex(add a name to the end of name) and move to another folder. It my opinion, it should be looking like this: mv -v ./images/*.png ...
4
votes
4answers
7k views

How to move only files in Unix

How can I move only the plain files (not the directories) from one folder in Linux to another folder using the mv command? I have tried mv * ~/, but it copied everything including the directories.
54
votes
10answers
74k views

Linux: How to move all files from current directory to upper directory?

I tried something like mv . .. but it doesn't work.