Questions tagged [mv]

mv is a move/rename file in Linux

mv is a tool to move/rename files/folders under *nix.

Command manual.

56 questions
1
vote
2 answers

used mv command and my whole filesystem is missing

Alright, so I was in /var/www/forum/newrelease What I wanted to do was copy all of the files in newrelease to the directory forum, so I was thinking the command mv /* ../* would work, but now everything is gone. Any ideas how to get the files…
Kelly Elton
  • 240
  • 2
  • 13
1
vote
2 answers

File move in Perl that stops the current script?

how can I do this mv ($file $new_file/$1) or die("Errors 2"); so it would stop the script in terminal if the file is not found? otherwise it keeps repeating and repeating and I need to restart putty session so i would be able to type something
Treat
  • 25
  • 3
1
vote
3 answers

mass mv using find?

there are a bunch of filename.gif scattered in /home/ directories. I want all the filename.gif replaced by a /home/shared/filename_default.gif. I tried something like find /home/ -name "filename.gif" | xargs but I have no idea to reference…
Brian
0
votes
1 answer

Why nginx give different results with files whose same file-system Permission?

Every time if I put a file into the doc dir of nginx by using the mv command, it always results in a 403 Forbidden error, but if I do that by using the cp command, no error occurs. I tried very large and very small files, and tried putting files…
Leon
  • 159
  • 7
0
votes
3 answers

How can I recursively change the case of files and folders under bash

I have some files and folders that are all in uppercase that I want to rename to their lowercase equivalent. What would be the best way to go about doing this in bash on a Linux system? As an example I might have: . |-- FOLDER0 | |-- SUBFOLDERA | …
David Dean
  • 441
  • 6
  • 11
0
votes
1 answer

Bash Script To Move Files While Creating Directories

I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the…
Jeff C
  • 1
  • 1
0
votes
0 answers

How to "stage" file movements before performing them on Windows?

I have a disk with terabytes of data. I would like to reorganize the disk. The problem on Windows is that if I move one of the directories to the new place, I have to wait hours for that relocation to finish. Is there some way for me to "stage"…
0
votes
2 answers

used mv file.sql /folder instead of mv file.sql folder/

Hello I made the mistake of using mv file.sql /destinationfolder instead of mv file.sql destinationfolder/- using su root. Now I can't find my sql file. is there a way to find it/recover it?
nodejsj
  • 103
  • 1
0
votes
1 answer

SSH find directories with uppercase letters

Using SSH how can I find sub-directories that begin with uppercase letters within a directory and then rename them, including merging if the lowercase named directory already exists? e.g. if there is a directory called "Small" and a directory called…
John Mellor
  • 300
  • 1
  • 3
  • 9
0
votes
1 answer

Script to move Maildir contents to its parent dir but for multiple folders

I totally suck at Bash/Python/Ruby/Perl Scripting (need to practice/learn some more) so I'm asking for a little help :-) I need to move about the contents of about 60 Maildirs to their parent folder and rename that parent folder too all on a Linux…
Samuel Jones
  • 228
  • 4
  • 13
0
votes
1 answer

Root cannot move files

I'm on Debian 5, I want to move files, but I'm getting a permission denied error, even if I'm root. Do you have any solutions? -rw-rw-rw- 1 scusr scusr 49901 Jun 17 09:04 flux_outfacture_130617090229UN_Test_888880617014310001.pdf $ mv…
user178990
  • 11
  • 3
0
votes
1 answer

Permission denied with mv under apache

I have a bash cgi script called by apache which should move one file in /var/www/html to another in the same directory. I've set up the relevant permissions with selinux (e.g. chcon to httpd_sys_content_t) and I've changed the read/write permissions…
David Wadge
  • 149
  • 1
  • 7
0
votes
1 answer

Linux directory moved

a directory was moved with mv command in a Linux box, what logs should be looked at for such action? in root bash_history i can see the command was used, unfortunatly bash_history was not recording time & date, therefore making it difficult to…
Vlad
  • 45
  • 6
0
votes
3 answers

copy and rename files

Here are my access logs those I want to backup. /var/log/httpd/access_log /var/log/httpd/access_log.1 /var/log/httpd/access_log.2 /var/log/httpd/access_log.3 ... I want to copy all these files but with different name: The following does work as…
shantanuo
  • 3,459
  • 8
  • 47
  • 64
0
votes
2 answers

cannot move to a subdirectory of itself

I have 2 folders: /home/sphinx/articlesdb/ and: /home/sphinx/tmp/articlesdb/ I want to move and overwrite all of the files from tmp into the main folder. I am currently using: mv -f /home/sphinx/tmp/articlesdb/ /home/sphinx/ But I get this…
fire
  • 113
  • 1
  • 2
  • 5