Questions tagged [mv]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

I have renamed "/usr" folder in Ubuntu, now trying to rename to "/usr", but I have problems I think because "/usr" folder does not exist [duplicate]

I have tryed to restoresome data and moved "usr" folder in Ubuntu. For any command I tr, for example "mv", "cp", the system writing "/usr-new/bin/mv: cannot execute: ...
Владимир Бычков's user avatar
0 votes
1 answer
34 views

Moved a file with mv but now I can't find it

It seems I made a mistake in the command. It still executed a move, but now I can't find the file. My command was this: mv /tank/incoming/myfile.mov \(2017\)/ /tank/myfiles/ The command was executed, ...
Warner's user avatar
  • 434
0 votes
0 answers
30 views

moving multiple files

i have a downloadsfolder that contains 9 items backup.sh ,bestanden.sh, tara.tar.gz, nmap.tar.bz2, demo11.zip, contract.pdf, cleaning.pdf, GNU-linux.jpg and video.mp4. these have to get sorted in the ...
unknownname's user avatar
1 vote
2 answers
172 views

Performant sort files into subdirectories by content of metafile

-edit: more details, correct code- I want to move files from a directory into sub directories by data out of a metadata file. There are groups of files like <name>.<extension>. Each group ...
Andy A.'s user avatar
  • 123
8 votes
2 answers
734 views

Move duplicated folder name up one level

I have a folder structure: /mnt/data/mydata/mydata/several-files-and-folders-here I would like it to instead be: /mnt/data/mydata/several-files-and-folders-here I tried mv but it complains the folder ...
Jack Avante's user avatar
1 vote
1 answer
299 views

Anyway to undo overwriting file by mv or recover replaced file?

I accidentally mv a new file to an existing file and overwrote it. Is there anyway to undo mv or recover the replaced file?
user42's user avatar
  • 11
0 votes
1 answer
40 views

lost file after do "mv" file in filename.sh

I try to run filename.sh which contains: mv /home/newdir/test1.jpg /home/backupdir mv /home/newdir/test2.jpg /home/backupdir mv /home/newdir/test3.jpg /home/backupdir mv /home/newdir/test4.jpg /home/...
always-learn's user avatar
0 votes
1 answer
29 views

Remove parent folder but keep subfolder intact?

Hullo all, i've seen this question asked before but I am hoping for a different solution. I have this folder structure; /home/radamand/folder1/folder2 folder1 ONLY contains folder2, however folder2 ...
user88710's user avatar
0 votes
2 answers
31 views

Copying a downloaded file into my current terminal folder

I am compiling WRF on my HP Desktop. I'm in Ubuntu terminal and trying to use the cp command to copy from my D Drive, but it just won't work. Using cp D:\MyWRF/file.tar . All I get is cannot stat, ...
John Hurley's user avatar
-4 votes
2 answers
121 views

mv renaming files deleted it [closed]

if i had a playlist filled with music, i would want it to shuffle and play because i wouldn't want to hear the same song order over and over again as it gets old real fast.. same thing here but with ...
bruh's user avatar
  • 1
0 votes
0 answers
33 views

How do I reverse usermod -l newusername oldusername in root?

Upon trying to change my username, I pressed Ctrl+Alt+F4, and used the command: usermod -l newusername oldusername. I then used mv /home/oldusername* /home/newusername* then I used usermod -d /home/...
Alysia's user avatar
  • 1
0 votes
0 answers
32 views

Move 700 mb of files to another directory

I have a directory with a lot of mp3 files. I want to be able to move up to 700 mb of those files to another directory. (700 mb is the limit of my blank CD size) I want to create an audio CD. How can ...
fixit7's user avatar
  • 2,734
27 votes
2 answers
8k views

mv fails with "No space left on device" when the destination has 31 GB of space remaining

I've been trying to move 32.6 GB of files to a folder on an external flashdrive to free up space on my laptop's SSD. After opening up the source folder in Terminal (and running ulimit -S -s unlimited ...
Vikki's user avatar
  • 529
0 votes
0 answers
36 views

Having two different Downloads [duplicate]

I'm trying to move or copy a file Bs_T.txt from Downloads C:\Users\Laptop\Downloads to repository with path /home/p/pand. When I try to find a file called Bs_t.txt with command readlink -f Bs_t.txt I ...
Learningmachine's user avatar
0 votes
1 answer
83 views

Cannot locate file after moving

The thing is that I am starting after a few months of experience in linux to use the command line. I was trying to use a new "cursor theme". I found on reddit that I needed to move the file ...
milintime's user avatar
0 votes
1 answer
176 views

FSL error: fsl_vbm_1 -b problem imglob not found

I am trying to run the command fslvbm_1_bet -b but get the following errors: /usr/local/fsl/bin/fslvbm_1_bet: 1: /usr/local/fsl/bin/imglob: not found /usr/local/fsl/bin/fslvbm_1_bet: 1: /usr/local/fsl/...
Nadine's user avatar
  • 1
0 votes
1 answer
34 views

I move folder to * file type how to get file form it [closed]

I try mv Some.txt A* but there is not any folder name of A so it converts into 'A*'file ls screenshot
Shubham's user avatar
0 votes
1 answer
59 views

Moving contents of a directory to another

I want to move all the contents including files and sub directories from /home/storage_new/nidhal/foldertest/ to /home/storage_new/nidhal/foldertest1/. When I use the command ... while true; do ...
nidooooz's user avatar
1 vote
1 answer
3k views

Attempting to move folder from C drive to folder in WSL/Ubuntu

I am making a website for my online book/media business, and I have some photos on my C drive (cover photos) that I would like to copy into my project directory in VSCode via WSL. The file is stored ...
jumpman23's user avatar
0 votes
1 answer
105 views

Cannot find folders / files after mv on ubuntu

Having cd /poolf/sharef I have a folder named media. I issued the command sudo mv -T media Media The folder renamed media to Media as expected but the contents have disappeared. Can someone tell me ...
Fruglyish's user avatar
0 votes
0 answers
514 views

unable to copy files from ssd to hdd in ubuntu 20.04

I'm trying to copy media files like .mp3,.mp4, .mkv etc. from my ssd to hdd as to save time complexity of ssd but unable to do so. Everytime I try to copy or move files it shows me this error "...
Naeem Navjivan's user avatar
0 votes
2 answers
368 views

Is mv the only command that we can use to move files/folders?

Is mv the only command that we can use to move files/folders on Ubuntu 20.04?
repqc's user avatar
  • 103
1 vote
2 answers
162 views

Does moving a file/folder makes disk fragmented? [duplicate]

Does moving a file/folder causes fragmentation in Disk on Ubuntu 20.04?
repqc's user avatar
  • 103
0 votes
1 answer
71 views

Using Ubuntu on SSD with a Separate Data Drive

I have been researching this for quite some time coming from Windows that there is no “Path” that you can give to a program during installation, but instead the program downloads where it needs to. Is ...
Luke F's user avatar
  • 1
1 vote
1 answer
313 views

Move files with specific number of characters in the extension

How do I move all files that only have three characters in the extension to the parent directory? E.g. I want to move all the .mp3 and .zip but not all the .sh to the parent directory.
Nick's user avatar
  • 13
1 vote
1 answer
61 views

How to rename files: picture.jpg.~1~ to picture_~1~.jpg [duplicate]

I have say 30000 files of this type: picture.jpg.~12~ They are remnants of a backup (mv -v --backup=numbered ...). I needed to switch the extensions to: picture.~12~.jpg
xerostomus's user avatar
0 votes
0 answers
31 views

Recursively move certain folders to other folders of the same name

I have the following structure: dir1 - subdir0 - subfile00 - subfile01 - subdir1 - subfile10 - subfile11 - file0 - file1 dir2 - subdir0 - subfile00 - subfile01 - custom_file ...
jkang's user avatar
  • 121
0 votes
1 answer
130 views

moving multiple files in multiple directories

I have a directory, within are many directories (abc1 abc2 abc3 etc.) that contain a sub-directory - always the same name (MATCHING_STRING) - full of files. I want to remove that sub-directory (...
user209405's user avatar
2 votes
1 answer
102 views

Rename some files to their own name + something else

I have a directory like Photo and I want to change the names of the directories inside it -> to what they are, but without it [www.faraDa...] like the first one that I change by mv command. but I ...
Sir-Sorg's user avatar
0 votes
0 answers
157 views

Cannot mv file into a subdirectory of itself

I was trying to rename a file in /media/user/TOSHIBA EXT/Fotos/Chronologisch using mv, and I get the following error: /media/user/TOSHIBA EXT/Fotos/Chronologisch$ mv "DSC00001.JPG" "12....
TheEagle's user avatar
  • 143
3 votes
1 answer
221 views

all files in the folder disappeared because of a typo while using `mv`

I am new to bash and I was trying to rename all files in a directory to their md5 checksum in the following way. r@r:~g$ sh $ for F in *; do > mv "$F" "$(md5sum "$i")&...
Collins Smith's user avatar
-1 votes
2 answers
944 views

File is gone on mv command :

I was trying to move file.py to the existing directory Modules ... wm@my-laptop:~/Desktop/1linuxandpython$ mv Modules_and_packages.py /Modules_and_packages_Game it said permission denied , so i did ...
Marinos TBH's user avatar
1 vote
0 answers
443 views

Why is mv so slow - local disk to local disk?

I'm moving a single large file from /mnt/z to /mnt/y on a bare metal Ubuntu 20.04.3 install. Both disks are capable of sustaining 2 GB/s in writes, and do in other operations, but mv caps out at ~200 ...
Chris Han's user avatar
0 votes
1 answer
73 views

How to move a matched id of mat files in different folder

I have Matlab (.mat) files in a particular folder. In a text document, I have some IDs list marked as 0 and 1. First I need to match the IDs and separate the mat files that are marked as '1'. For your ...
Jammy's user avatar
  • 1
1 vote
1 answer
884 views

Accidentally moved directories and files under root and reboot the machine

I've accidentally run this command sudo mv /* /applications/minced/ instead of sudo mv ./* /applications/minced/ Unfortunately, I rebooted the machine And now I am getting this error please help me
Muaath Alhaddad's user avatar
1 vote
1 answer
114 views

Move files with extension in diffrent structure

I need move every file.tif to dir TIFF inside his parent dir.    ├── 1    │   ├── 240_01.tif    │   ├── 240_02.TIF    │   └── TEST    │   └── syg_240_test_1.tif    ├── 2-3     │   ├── 2   │...
mechmati's user avatar
0 votes
1 answer
246 views

Why is renaming files with sed and mv printing '$'\r'

I am using Ubuntu on a Windows 10 machine. I am trying to rename 5 files (file1.txt, file2.txt, file3.txt, file4.txt, file5.txt) so that each file is replaced by Sample#_VoucherID.fastq.gz. To do this,...
Justin's user avatar
  • 27
0 votes
1 answer
1k views

"Permission Denied" as root when moving files

Using sudo on the RPISEC-MBE virtual machine, I have mounted and copied my files that were on a USB flash drive to an admin folder (that I have access to). Unfortunately, even with sudo I can't seem ...
nanoman's user avatar
  • 103
0 votes
1 answer
604 views

Renaming the recent directory with spaces in its name

I am trying to rename the recent directory with spaces in its name. $ mkdir "foo bar" foo bar $ ls -c | head -1 $ mv $(ls -c | head -1) foobar Getting the following error: mv: target '...
Josef Klimuk's user avatar
  • 1,546
0 votes
2 answers
292 views

Problem with a mv script

I am having a problem with a mv script. I create a Test folder: mkdir Test In this folder I create subfolders: mkdir -p Pics20{18..23}/{01..12} In the Test folder I create many files: touch IMG20{...
Kanarise's user avatar
1 vote
1 answer
254 views

Rename file names with a parent directory name

I want to rename my files recursively, ending with *.fna.gz with the parent directory two-step-up i.e. "Aspergillus_neoniger". You can see the subdirectories details in this image tree ...
shahzad's user avatar
  • 43
0 votes
1 answer
222 views

Moving my folder from Desktop to Downloads (Folder)

I tried to move a folder from my Desktop into my Downloads folder several times, all my tries end up with renaming my folder name only. ex: tuxedo@cosmos:~/Desktop$ sudo mv myFolder Downloads I don't ...
0xy's user avatar
  • 15
2 votes
2 answers
148 views

Move all JPGs and rename them into one directory

.Hi. I have a bunch of jpgs in 100s of subfolders , I know I can move them all with this command find -type f -iname "*.jpg" -exec mv -av {} /home/root/private/pics/ \; But my all my jpgs ...
1014Noob's user avatar
0 votes
1 answer
908 views

Move and rename all files in dir to date and number

I would like to move and rename all files in dir with the date and a number on the end front as an indicator that the files are unique. I wrote a little bash script to do this but it places the number ...
troylatroy's user avatar
  • 1,267
2 votes
1 answer
138 views

cp .* /home/name erased all files in /home/name

A while ago, I got a new ssd for my laptop, so I dd'd everything onto the new drive, and used it for a while without issue. I decided to put the old drive back into my laptop, and put newer ssd into a ...
ruinedanothergoodinstall's user avatar
13 votes
1 answer
5k views

How do I get back files after "mv * .*"?

I hid some files using the command: mv * .* but now I am unable to find them. I tried using: mv .* * but nothing happened (an error was shown). If I run: ls -la it's showing: total 8 drwxrwxr-x 2 ...
code by Abhishek Bharti's user avatar
0 votes
2 answers
634 views

How to move several folders using double wildcard?

I am trying to move all the folders that have the digit 1 in between (glove.6B.60d.txt) and (model) mv "./*.txt)(1)(m*" "/home/e1" but I get the error message mv: cannot stat './*....
Kong's user avatar
  • 1,121
0 votes
1 answer
286 views

Writing a script to rename and move files

Current work server has images arranged in the following folder structure: . └── Plans ├── Area 1 │   ├── Location 12.jpg │   ├── Location 34.jpg │   └── Location 37.jpg └── Area 2 ...
cworner1's user avatar
  • 123
0 votes
1 answer
60 views

Files and folders disappearing after using mv

Hi firstly I have looked through other questions similar to mine and I couldn't find relevant answers to me. Running Ubuntu 16.04.7 LTS Command Line In my home directory I have 2 folders 11100 world ...
user avatar
0 votes
1 answer
290 views

Cannot move Linux Wifi Driver into the specific directory

I am currently trying to put the driver's folder into the WiFi directory but it is giving me a error every time I execute it. The instructions on the website are super vague on what to do step by step ...
Marrth 64's user avatar

1
2 3 4 5