Questions tagged [mv]

Tag for questions about the terminal command "mv" to move and rename files.

Filter by
Sorted by
Tagged with
0
votes
1answer
69 views

I tried this command now I cannot find my file after running sudo mv K8s.odt /Desktop [duplicate]

I used this command from home to move the file to my desktop and now I cannot find it sudo mv K8s.odt /Desktop
5
votes
1answer
100 views

How to move found files to another directory?

Hello to everyone I have the following script that works fine except the mv argument. The script basically searching for the files that were created at a specific time and the I need to move all of ...
2
votes
0answers
40 views

zip command throwing error Ubuntu (14.04.5 LTS), Please suggest [closed]

when I am running(zip t3.zip t1.txt) in Ubuntu CLI, its showing error, but generating a random binary file (eg: zin6e9Tx, you can see in 3rd line). # zip t3.zip t1.txt adding: t1.txt (stored 0%)...
0
votes
0answers
51 views

Accidentally ran the command mv lib/* /usr/lib/* and now many commands like “sudo” and “java” don't work anymore

mv lib/* /usr/lib/* I ran this to move all my files in lib into /usr/lib directory it did move them but up with the above mentioned errors. I was in /home/appu/ directory when I ran the command. ...
3
votes
2answers
71 views

How do you rename files from one incrementing pattern to another?

I have a group of files that are named as follows: 048. banana.mkv 049. apple.mkv 050. mango.mkv 051. pear.mkv 052. grape.mkv I need to rename those files with the following naming convention 01. ...
0
votes
0answers
27 views

mv: missing destination file operand when special characters are involved [duplicate]

This one's silly. I saved my vim session with :Obsess -S Session.vim instead of :Obsess Session.vim, so now I have a -S/ Session.vim file in my project and can't open it with vim as the following is ...
1
vote
3answers
49 views

Use “find” to select a zip file and deplace them with mv

First Im beginning on Linux, I try to select zip files only and move them in an other folder, but it's not working :/ Please help Im completely loosed. The code: find . -type f -name "*.zip" | xargs ...
0
votes
0answers
11 views

Getting back a moved file from tmp

I used the following command to move my driver file from Downloads to tmp folder, however, after I ran this command the file disappeared: mv ~/Downloads/amdgpu-pro-17.40-492261.tar.xz ~/tmp Now ...
0
votes
1answer
48 views

Moving files into sorted folder based on the filename

So I have this folder of movies that looks like Current movie1 (1962).mkv movie 2b (1993) movie 2b (1993) cd1.mp4 movie 2b (1993) cd1.srt movie 3 (2019).avi movie 1942 (2012).mkv And ...
1
vote
1answer
75 views

How do I rename files in a directory one-by-one in a loop following a specific pattern set by me?

#!/bin/bash ls > ls_file.txt #item="Variation of gm with constant Vgs and constant drain current bias-mod03lec05.mp4" ############## Above line is just a comment for testing purposes for item ...
1
vote
2answers
134 views

Find files and rename and move to another directory

When I run the command find dir_1 -type f -name 'f*' I found 2 files there "file_11" and "file_22". Now I want to move those files to another directory "dir_2" using -exec with the "find" command. ...
0
votes
1answer
104 views

Bash script automatitation name change using date

I'm new to the shell/bash area. I've created this little script to change a name using the date command. The idea is to get something like this 1.txt=>2020-02.txt And it works, but I get the ...
0
votes
1answer
75 views

Moving files inside multiple directories to the root directroy of the folder structure

In this directory listing below I'm trying to move all 'example*.file' into the 'test' directory. I've tried doing something like mv * ./test/ but that only moves the folders and not just the files,...
0
votes
0answers
42 views

Accidentally moved whole server into “/var/www/” directory

I was working on a project in the "/var/www/" directory... I wanted to move all the files from "/tmp/project/" to "/var/www/html/" using command: mv ./* /var/www/html while I was in the "/tmp/...
0
votes
1answer
218 views

Moving files to a different folder, ignore the existing files

I want to move all the files from parent folder to child folder... and ignore the existing files in the child folder, i.e. if img1.jpg exists in both parent and child folder, it should not be replaced ...
1
vote
2answers
124 views

Files missing after using mv command

I ran /$ sudo mv -f -i FileSystem/* After using the command all my files are missing. Where my files have gone to?
0
votes
2answers
75 views

zero padding of file names

I want to do zero-padding for names of files. what should I do if not all images exist like 1.JPEG doesn't exist or 99.JPEG or 110.JPEG ? $ for n in $(seq 9); do mv $n.JPEG 0$n.JPEG; done; mv: ...
1
vote
1answer
75 views

Rename all empty folders with `$ empty`

I have many folders that I have ended up with too many empties in the folder names and I need to remove all the empty and leave the folders with $1.empty Of course my logic is flawed here as I am not ...
0
votes
2answers
161 views

How to remove end of file names?

I want to rename a lot of files like 1_16_video1.mp4?1578683110081 & 54_127_video7.mp4?168302 to 1_16_video1.mp4 & 54_127_video7.mp4. How can I rename them?
0
votes
1answer
67 views

Are my files lost after I executed mv /parentdir/otherparentdir/somedir/* /parentdir/destdir/?

I was trying to move all the files in a dir to another dir. I got errors at the first 2 attempts but at 3rd attempt it appeared the command did succeed. However the source dir is now empty but the ...
0
votes
1answer
98 views

Files disappearing after mv command

I trying to learn how to move files around. I made some test files and directories to practice with. When I try to move a file from one directory to the other, the file just completely disappears. I ...
4
votes
2answers
301 views

How to update timestamp when moving files

In source directory, I have multiple files which all has dot (.) to it. So, when I move I can give like below mv *.* /destination/ But my issue is I want to give timestamp to all the files in ...
8
votes
2answers
3k views

Moving files accidentally to an not existing directory erases files?

I moved all files from one directory using mv and accidentally made a typo in the target location path. The system returned a message that the directory does not exists, but my files from source ...
2
votes
1answer
83 views

When moving a directory to another file system, and it runs out of space, are files removed?

Given /mnt/source/ and /mnt/target/ which are two different places / filesystems. mv /mnt/source/dir /mnt/target/ It runs out of space part-way (and stops) Imagining that /mnt/source/dir is full ...
0
votes
1answer
93 views

How to mv files one by one?

When mv is used between different storages, it first copies all files and then unlinks the source. How to mv files one by one, so that each file is unlinked after being copied, and the folder ...
0
votes
1answer
126 views

stop ignore message N: Ignoring file '20auto-upgrades.merge-error' in directory '/etc/apt/apt.conf.d/

When attempting to mv the file I get a permission denied. I am trying to fix the message I get when trying to update N: Ignoring file '20auto-upgrades.merge-error' in directory '/etc/apt/apt.conf.d/'...
0
votes
1answer
7k views

mv: missing destination file operand

I am trying to install poweriso, but facing this error. I had successfully extracted the poweriso on the desktop,and found the following code as instruction for further installation- sudo mv -v /home/...
1
vote
1answer
865 views

Why do I get 'X' and 'Y' are the same file when using mv, even though they are clearly NOT the same file?

I am attempting to move a file from one directory to another on a CIFS mounted file system using the command: mv /mnt/development/Backup/NagiosServer/latest/* /mnt/development/Backup/NagiosServer/...
0
votes
1answer
95 views

mv error in destination file in Ubuntu 18.04 LTS and my system does not use apt-get or yum,

I'm trying to install FDR on Ubuntu. whenever I want to install FDR4 in /usr/local with this: mv ~/Downloads/fdr4 /usr/local/fdr4 but error occurs with message mv: mising destination file operand
0
votes
0answers
143 views

Missing file after mv

Hope you can help me with this issue. I did the following: mv filename .foldername after that the file is gone and a hidden folder foldername was created .foldername when cd .foldername I got a ...
1
vote
0answers
61 views

move folder from mounted cifs to ntfs take ages

I'm running on Ubuntu 18.04 and have a network drive mounted via cifs. When I try to copy a dir from that network drive the copying took ages (ubuntu says 596.523 hours). Neither mv (shell) nor copy (...
10
votes
5answers
5k views

Why doesn’t `mv file /dir` move the file to a subdirectory of the current working directory?

I was in my /etc directory and typed the command me@mylaptop:/etc$ sudo mv MyFile.conf /openvpn I thought that would move the file into the directory openvpn which is a subdirectory of the /etc ...
0
votes
1answer
870 views

Copy file from Pi to USB

So I am trying to copy a file from my home pi directory to USB on my Pi zero as root using sudo mv command and it still says permission denied. I am a root user. How do I copy this file if I don't ...
1
vote
1answer
194 views

Install MV without installation [duplicate]

I have the problem that whenever I want to Install something, there is this lovely error: /usr/sbin/update-initramfs: 158: /usr/sbin/update-initramfs: mv: not found I could trace this error back, ...
0
votes
1answer
44 views

Can I use a list of file names that I saved to file to have each file on the list copied/moved/deleted?

How can I use cp rm or mv commands to manipulate files saved to a list, for example one made like so: ls Downloads/ | grep example > example.tmp The point is to be able to view/edit the file list ...
0
votes
1answer
154 views

Use find to find a directory and move it to a different path

I have hundreds of thousands of files in hundreds of directories. An example directory structure is ./main/foo1/bar/* ./main/foo2/bar/* ./main/foo3/bar/* ./main/foo1/ran/* ./main/foo2/ran/* For ...
0
votes
1answer
87 views

Rename multiple files of different name and extensions with parent directory name

I'm trying to figure out how to rename multiple files (100s) that have different extensions to their respective sub directory name. Here is the structure: Parentdir |--subdir1 |---name1.txt ...
0
votes
2answers
2k views

No such file or directory?

Im installing SquirrelMail in Ubuntu Server 18.04. I got it from here: wget https://sourceforge.net/projects/squirrelmail/files/stable/1.4.22/squirrelmail-webmail-1.4.22.zip Then I unzipped using ...
1
vote
2answers
6k views

How to move multiple folders to another directory? [duplicate]

How can I move multiple folders into another directory ? For example, I would like to move the folder 000/ 001/ 002/ to train/000/ train/002 train/003. Is there a simple command that I can use like ...
0
votes
1answer
206 views

How do you bulk move files into folders corresponding to the name of each file?

I have several movies in a folder. For example: ~/Downloads/Movies/Movie A (1998).mkv ~/Downloads/Movies/Movie B (1999).mkv ~/Downloads/Movies/Movie C (2000).mkv I would like to put each file ...
1
vote
0answers
91 views

Moving files that meet extension and size criteria to a different folder via terminal [duplicate]

Due to a series of unfortunate incidents, I lost all my data during a botched system update (noob here). I managed to use photorec to recover files to a specific folder "temp" on my desktop. I want to ...
1
vote
1answer
54 views

Moving 1M of files on 5M

Is there a command line to move 1M of files from a directory with 5M of files? I tried: sudo mv `ls | head -1000000` <destination> But I get this message: -bash: /usr/bin/sudo: Argument list ...
1
vote
2answers
80 views

How do I move one directory to another in Ubuntu

For example, how would I move a directory called "menu" into the "data" directory? Also, I am using Ubuntu and I am new to all of this so I am unsure.
-1
votes
2answers
2k views

Can't rename file using mv

Am trying a published solution to remove systemd-shim error after upgrade from 16.04 to 18.04 but get a bash syntax error as follows (you can see I tried different permutations of the same command in ...
0
votes
0answers
50 views

mv command - lost files - directory turned into a file

I am starting to learn about linux commands, and today i did something, that I can't find the solution nowhere ! I tried to move a file "test.txt" to the "Subfolder2", to do so, I entered the ...
0
votes
0answers
232 views

Error accessing a file no such file or directory (I want to rename it)

I am struggling to rename a file, I had a similar issue sometime ago but in that case I wanted to delete, this time I simply want to access it. I have cleared the directory, so only this single file ...
2
votes
1answer
33 views

Running a mv command on large amount of data caused disappearance of other folders [closed]

I messed up by running a mv command on the entire contents of an old external drive to my Desktop without making a destination folder first. I ran sudo mv /my/external/path/* /home/myself/Desktop/ ...
4
votes
3answers
7k views

How to move multiple files with rsync while showing progress?

I can move files with this command: mv -t /mnt/hdd /home/me/movies/movie1.avi /home/me/movies/movie2.avi The problem is, that it shows no progress at all, so I don't know if the operation is 1% done ...
1
vote
0answers
367 views

ls without parameters - No such File or Directory

while creating a backup of a Windows PC I encountered an odd File. I first discovered it while copying the parent backup where exactly the same error came up. Note that I masked all [A-Za-z0-9] with ...
-1
votes
1answer
718 views

mv command problem

I try to use the mv command, but it throws an error like this: adi@LMToshi2 ~ $ mv ~/compass-icon-theme /usr/share/icons mv: cannot move '/home/adi/compass-icon-theme' to '/usr/share/icons/compass-...