Questions tagged [mv]
Tag for questions about the terminal command "mv" to move and rename files.
229
questions
0
votes
1
answer
39
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 ...
0
votes
1
answer
35
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/...
0
votes
1
answer
27
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
0
votes
1
answer
45
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
...
0
votes
1
answer
248
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 ...
0
votes
1
answer
27
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 ...
0
votes
0
answers
105
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 "...
0
votes
2
answers
81
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?
1
vote
2
answers
64
views
Does moving a file/folder makes disk fragmented? [duplicate]
Does moving a file/folder causes fragmentation in Disk on Ubuntu 20.04?
0
votes
0
answers
27
views
File disappeared after mv command [duplicate]
I used mv file.txt /folder/folder1 to move a file. folder1 already existed but empty. But now I cannot find the file in the destination or source. I have used sidadm for the transfer.
0
votes
1
answer
24
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 ...
1
vote
1
answer
69
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.
1
vote
1
answer
35
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
0
votes
0
answers
25
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
...
0
votes
1
answer
123
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 (...
2
votes
1
answer
66
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 ...
0
votes
0
answers
42
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....
3
votes
1
answer
151
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")&...
-1
votes
2
answers
261
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 ...
0
votes
0
answers
187
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 ...
0
votes
1
answer
40
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 ...
1
vote
1
answer
308
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
1
vote
1
answer
79
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
│...
0
votes
1
answer
185
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,...
0
votes
1
answer
505
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 ...
0
votes
1
answer
185
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 '...
0
votes
2
answers
134
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{...
1
vote
1
answer
154
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 ...
0
votes
1
answer
62
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 ...
2
votes
2
answers
79
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 ...
0
votes
1
answer
411
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 ...
2
votes
1
answer
135
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 ...
13
votes
1
answer
4k
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 ...
0
votes
2
answers
282
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 './*....
0
votes
1
answer
157
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
...
0
votes
1
answer
46
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
...
0
votes
1
answer
179
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
...
0
votes
1
answer
123
views
Interrupt `mv` command by ctrl+c, and disk space is lost
To transfer large amount of data, I used mv from the first HDD called /KRX to other HDD called /data_tmp.
But I interrupted the mv process using Ctrl+C, and I fill /KRX with other data.
Then when I ...
0
votes
1
answer
333
views
When moving all files but-one using mv, how do you escape filenames with dashes?
In How to move all files in current folder to subfolder?, the solution to moving all files from a folder but one is:
mv (!dontmovethis) /new/path/
When trying to move a file that includes a dash, a ...
0
votes
0
answers
57
views
How to find and move files between certain dates? [duplicate]
I have two repertories named 'test1' and 'test2' with multiples files with .jpg or .mp3 extensions.
I want to find and move all files between 22-juin-2016 and 21-September-2018 to a new folder called '...
4
votes
1
answer
176
views
Use the '*' in shell script
I am trying to run a command example:
sudo mv /home/vaishnavi/Downloads/*.ttc /home/vaishnavi/Downloads/*.ttf /usr/local/share/fonts/ms_fonts/
It works fine in the terminal, but when I try to add ...
0
votes
3
answers
2k
views
How can i move multiple files to folder with same name
I have multiple files like this:
round3-bcF_01_bcR_01.R1.fastq
round3-bcF_01_bcR_01.R2.fastq
round4-bcF_01_bcR_01.R1.fastq
round4-bcF_01_bcR_01.R2.fastq
round3-bcF_01_bcR_02.R1.fastq
round3-...
0
votes
1
answer
107
views
I need help simultaneously moving the same file type in multiple folder from one subdirectory to another
Example:
I have 3 folders A, B, C
in each folder(A, B, C) there is a subdirectory called T1.
In this subdirectory called T1, there is a file name called T1.nii.gz.
I want to simultaneously move with ...
1
vote
1
answer
1k
views
mv: missing destination file operand after with grep
Kia ora,
I have a build script where I do a bunch of file operations and if they succeed, I print stuff to stdout as part of a report generated for the build. However I am getting the error "mv: ...
0
votes
1
answer
2k
views
Device or Resource busy when trying to use mv
I am attempting to recover from finger problems where some data was moved to the wrong place when using Ubuntu 20.04. Below are my attempted command and the result.
jgossage@JFGPER:/media/jgossage$ mv ...
1
vote
1
answer
712
views
Command to move a file to a directory even if the directory is not present
Is there a way to move file to a new directory without explicitly creating the directory using mkdir command and then move the file using mv
1
vote
2
answers
516
views
How do I move all files from one folder to a subfolder except .html file using the command line?
I would like to know how can I move all files from folder-A to folder-A's sub-folder except .html file with a command line.
Suppose I am in dist folder and there are 50 files and 5 folders. Now I ...
5
votes
1
answer
405
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
0
answers
441
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
0
answers
379
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.
...