I have a directory of many files, something like 50,000 pdf's and other files on a server. I need to move specific ones to another directory. I can generate a list of the files that need to be moved either in csv or any other text format.
What I…
I need to assemble a lot of images into one directory. Many of those images have the same file names.
Is there some safe version of mv that will automatically rename files if the target filename already exists so that pic1.jpeg becomes something…
In Linux I sometimes rename files like this:
mv dir1/dir2/dir3/file.txt dir1/dir2/dir3/file.txt.old
Note that I want to just rename the file, not move it to another directory.
Is there a command that would allow me to do a shorthand version of…
I'm currently 'reorganizing' file structure within a RAIDZ1 volume. Moving directories from one dataset to another, which are both contained on the same volume.
SSH'ed into the machine and did a good old fashioned:
mv * destination
Shouldn't this…
This is a bit of an embarrassing question, but I have to admit that this late in my career I still have questions about the mv command.
I frequently have this problem: I need to move all files recursively up one level. Let's say I have folder foo,…
My understanding is that mv dir1/file1 dir2/ is atomic,
Is mv dir1/* dir2/ also atomic?
As an example, assume there are 10 files in dir1 that are 10GB each.
I am trying to move a file from a local directory to an nfs mounted directory on a CentOS 7 server. The export is provided by FreeNAS.
Both directories are owned by the current user with at least 755 (nfs shows as 777 but I'm not sure I believe…
I am working on AIX 6.1 and inadvertently renamed /usr/lib/libc.a to usr/lib/libc.a_ Just as I renamed I realized my stupid mistake. Almost all of the commands mv, cp, ftp etc ( except cd ) have stopped working.
How shall I rename by libc.a back.…
Running linux. I have two identical drives mounted on the same machine. What is faster CP, MV, or RSYNC? Why is one faster than the other? Are there any faster alternatives?
I have about 200 directories in /home/. The problem is that they all exist in this way:
/home/{user}/homedir/
While it should just be:
/home/{user}/
With what command can I mass move all content of homedir one directory up for each user?
Thanks for…
I tried to move all files inside a directory to another directory like this:
$ mv /directory_one/* /directory
However, the hidden files (such as .htaccess) in /directory_one won't be moved.
What is the right command to do so?
I may be going bonkers here, but I'm trying to move a directory to a new location, overwriting the contents (on Linux, using bash).
Everytime I try it, it responds with "mv: cannot move `./src' to a subdirectory of itself"
eg. I…
I have compiled C code running as a binary on an ARM. The ARM boots Linux from an SD Card using an old Image that was generated using buildroot. Within the C code I call a shell script that moves the new Image I want to boot with from a…
Using the below directory tree as an example, what is the best way to move the contents of directory/folderA to directory.
How to overwrite a file if a file with the same name exists in the destination, for example:…
Suppose one process does this: mv a large file to a destination directory
And another process is watching for that file in the destination directory because it wants to read its contents as soon as possible. Does the file system ensure that the…