Questions tagged [move]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
54 views

Move files in subfolders based on the specific rules from a file

I have 1 x big folder that has lots of .txt files I am trying to group these .txt files in separate subfolders based on specific rules from a rules.csv file (on what subfolder they belong to): LARGE ...
user avatar
0 votes
0 answers
49 views

How to move files and maintain directory structure

I need to move files from one place to another and keep the structure that the original directory has. The parameter for this file to be moved would be to have more than 365 days without access and ...
user avatar
0 votes
0 answers
7 views

warning when moving file/folder in File manager

Currently I use Caja and sometimes, actually rarely but, it happens that by unintentional finger movement on the touchpad I accidentally move a file/folder into an adjacent folder or whatever where. ...
user avatar
  • 235
0 votes
3 answers
917 views

mv: cannot move "File exists"

When trying to move some folder I am getting error: "cannot move File exists" export BACKUP_DIR=/backup mv -f $BACKUP_DIR/scripts $BACKUP_DIR/scripts_old Getting error: mv: cannot move '/...
user avatar
  • 178
0 votes
0 answers
21 views

Move Files and Change Extension

I have a script I've been using for a couple years perfectly to find file names within a directory and adding a CR to each line as well as renaming the extension via mv. I've always had to execute ...
user avatar
1 vote
1 answer
56 views

Organizing files by dates contained within them

I am currently trying to write a script that organizes a list of files into subdirectories by their dates. The dates are contained on the first line of every file in the format YYYY-MM-DD. I have ...
user avatar
2 votes
1 answer
220 views

Moving /var onto different disk/partition

I moved the /var directory to a new disk/partition, this part worked well, but I forgot to delete/move the old /var path and it is still using space on / (root) partition. How could I delete the old /...
user avatar
0 votes
0 answers
30 views

Lost files while moving. Best strategy for recovery. (yes, I was unwary)

I had moved some files (each between 20 and 200 MiB in sum approx 1 GiB) from an internal HD (ext3) to an external HD (ext3). Usually I do a copy-compare-delete scheme for moving files, but this time ...
user avatar
  • 193
-1 votes
2 answers
57 views

How can I move a file to another folder, but only if it hasn't been modified since 10 minutes?

Replace the "10 minutes" with whatever value. Basically I only want to move the file if it's not growing any more. How can I do this on the command-line or a bash script? A solution that is ...
user avatar
  • 131
3 votes
2 answers
335 views

Parent child directory same name , move files to parent directory

I need a way to search directories for child directories with the same name and then move all files in the child directory to the parent. Thus from /recup-dir1/recup-dir1/files to /recup-dir1/files. ...
user avatar
0 votes
1 answer
61 views

FreeBSD move folders from a list

I have a .txt file that has a list of folders I would like to move from one directory to another. I have seen many posts on this, but none have worked. Mostly because those are using GNU versions of ...
user avatar
  • 121
0 votes
1 answer
42 views

Restructure a folder hierarchy

Excuse me if this question has been asked/answered before, but my search has not provided the answer I needed. I have my teaching materials structured as follows: Year/semester/Course/.... Instead of ...
user avatar
1 vote
1 answer
386 views

Deleted files with WinSCP

I selected some files and wanted to move them to another folder. All I did was this, using WinSCP: Right click, Move to... and all files were deleted. So the last folder had additional *. * in it. I ...
user avatar
  • 21
0 votes
1 answer
109 views

Scanning subfolders with BASH Script ${ROOTPATH}/${subdir}

Doing my best to make this work but have little knowledge of scripting. This script should be scanning my specified directory and all subdirs scanning video assets moving any corrupted/errored files ...
user avatar
0 votes
5 answers
145 views

Move multiple files to subdirectories in linux

I have a directory structure like this; dir ├── dirA │ └── file1 │ └── subdir └── dirB └── file2 └── subdir I need to move file1 to dirA/subdir and file2 to dirB/subdir. How can I do it ...
user avatar
  • 3
0 votes
1 answer
45 views

How to search subdirectories that has only 1 file inside and move the file up one step to the parent directory

So I have multiple subdirectories in which many of them have only 1 file and the name of the filename is the same as the subdirectory name. DIR A --DIR B ----B.zip --DIR C ----C2.zip ----C3.zip --DIR ...
user avatar
0 votes
2 answers
79 views

Move files up one directory

How can I move the entire folder up one level in the directory structure ? Using rsync or mv does not quite work. rsync /var/www/html/wordpress/ /var/www/html/ skipping directory . mv /var/www/html/...
user avatar
  • 19
0 votes
1 answer
934 views

Move Files From Root Directory to another users Home Directory

I have downloaded files from another server to root directory called public_html, Now I am looking for move all files and folders from public_html to /home/userb/public_html so I am trying to move it ...
user avatar
0 votes
1 answer
85 views

Move specific file types in subfolder to destination folder but without loosing subfolder structure

first of all I have very limited knowledge in Linux but I am always trying my best. I also have already automated a lot of things in my Unraid Server and RPi by using Cronjobs and scripts, but now I ...
user avatar
  • 1
0 votes
2 answers
57 views

Rename files in any deep subfolder like the parent folder and move after to a central folder

I have a problem where I need to rename just certain files after the parent folder and afterwards move these to a central folder. Is there a way to do this? I would like to run this on a Synology NAS. ...
user avatar
-2 votes
1 answer
124 views

Move every 500 files in new directory [closed]

I have a directory that contains 10,665 jpeg files. I want to move 500 files to a new directory, and 500 to the next directory, etc. The largest files must be moved first: 500-1 contains the 500 ...
user avatar
2 votes
1 answer
297 views

Efficiently turn a directory tree into a new filesystem on zfs

I "inherited" management of a system, whose "/opt" (and some other large directory trees) are stored in the root file system. My wish now is to create a new filesystem in the rpool ...
user avatar
  • 31
0 votes
0 answers
20 views

Move a specific number of files from a folder to another one (by oldest) [duplicate]

I am currently using this shell to move 25 files to another folder automatically. But It moves files by alphabetical order, that's my main concern. I would like the oldest files to be moved first ...
user avatar
  • 1
0 votes
2 answers
89 views

Move files from one folder to another but only if filename and size are exact match

I would like to move files from one folder to another but only if the destination file already exists and the sizes match. If it's not an exact filename and size match, I want to skip the move. ...
user avatar
-8 votes
1 answer
802 views

UNIX - Move the file dog from MAMMALS to SHAPE specify using relative path

As I am new to unix, can somebody tell me how to move a file please. I got an error message as missing destination file operand. mv dog/mammals/shape
user avatar
1 vote
1 answer
111 views

Moving files with " and * caused error

I'm having trouble with moving files in a bash script. I've been trying different solutions that I've found here, on the same problem, but can't find anything that works.. my last attempt was adding ...
user avatar
  • 327
0 votes
1 answer
865 views

Move files with wildcard?

Ohhhh, I've read a few pages and questions, but I just can't comprehend/fully understand it... jdir0="$@" # /home/tor/subbackup/teest2/jjj mv "$jdir0/subs/*.srt" /home/tor/...
user avatar
  • 327
1 vote
2 answers
689 views

Why ubuntu uses "move to trash" instead of delete?

Does anyone know why in the GUI of Ubuntu(and perhaps the other Linux distributions as well) use the term "move to trash" instead of delete? I want to know what was the historic event that leads to ...
user avatar
  • 151
0 votes
0 answers
24 views

How does my shell know when the current working directory has been moved?

If I am in a directory /foo, and I move (from a different session) /foo to /bar. If I then go back to the session in /foo and run ls, the files are still there, and I can see new files if they are ...
user avatar
  • 329
1 vote
1 answer
19 views

file disappears while moving because I typed the wrong directory

While moving a file, I typed $ mv aaa.txt directory instead of $ mv aaa.txt ../directory and now I don't know where aaa.txt has gone. How can I find it?
user avatar
0 votes
1 answer
91 views

Move daily backup directories (made by rsync) to another directory in the same partition

I have a daily rsync script backing up my data on an external hard drive at /mnt/X (root of hard drive). I am using --link-dest to use hard links and avoid duplicating data. I need to move all my ...
user avatar
  • 103
0 votes
2 answers
55 views

How to verify that files in A folder are also in B folder

I use my synology DS1515+ and DSM 6.2.2. First of all, please refer to the picture as below; First, I download some video files. Examples of filenames are as above. And second step is that copying ...
user avatar
  • 23
0 votes
2 answers
458 views

Copy a file containing date in the file name to a folder for that date

I looked for similar questions, but it was hard to get a clear answer in my case. I use my synology DS1515+ and DSM 6.2.2. First of all, I have been made daily folder containing a date using script ...
user avatar
  • 23
2 votes
3 answers
90 views

Copy a file containing a date in the file name to a folder for that date

I'm newbie in stack overflow. I need your help. Thank you for your reply in advance. I looked for similar questions, but it was hard to get a clear answer in my case. I use my synology DS1515+ and ...
user avatar
  • 23
1 vote
2 answers
117 views

Organize directory b and its subdirectories files equal as directory a without copying or moving from directory a

I'm looking for some way to organize the files contained in directory b to make its structure equal to that of directory a (which contains the same files as b, just arranged in a different way), ...
user avatar
  • 192
2 votes
4 answers
592 views

How to move all files with names starting with a string from a list?

I have a file strings.txt with a list of strings: GCA_001677475.1 GCA_003410275.1 GCA_002310615.1 GCA_000007405.1 GCA_000219515.3 And I have many files in a directory with names like: GCA_000005845....
user avatar
0 votes
1 answer
114 views

Sort files based on similarity of file names

I have a directory structure which contains many files. I want to find similar files recursively and sort them based on their names. The easy part: find all files named f*.ext and move them to a ...
user avatar
0 votes
1 answer
43 views

Ask what to do when dragging & dropping a file in file managers other than Dolphin

Dolphin file manager is showing a list of options when dragging & dropping a file (copy/move/create link). Can the same options be made available in other file managers?
user avatar
  • 968
0 votes
1 answer
907 views

Flattening directory and renaming files incrementally (MacOS)

Looking to flatten the directory (with duplicate child file names) while renaming all files, keeping duplicates OR appending all file names with an incrementing number (incrementing # + name would be ...
user avatar
  • 43
0 votes
0 answers
65 views

How do I --move-- the contents of 1 folder (with subfolders) to another folder (with the same subfolder names as the source)?

I think this is best explained with an example. Example: /mnt/mystorage/source => folder1 => file11.txt => folder2 => file21.txt /mnt/mystorage/destination =&...
user avatar
  • 1,689
0 votes
1 answer
36 views

Placing File Families into Folders

A large number of font files (2728 files) are flattened in to a single folder. I want to move all files belonging to the same font family into a folder where the folder name is the complete name of ...
user avatar
  • 1
1 vote
0 answers
256 views

Where can I find the .desktop files for the "Copy To" and "Move To" service menus for Dolphin file browser

I am using KDE Neon. I want to create modified versions of the "Move To" and "Copy To" services in the Dolphin file browser. I want to find the built-in services, copy their .desktop files, and edit ...
user avatar
  • 121
0 votes
1 answer
347 views

Move files in folders by list in file

I have a .txt file that has a list of folders: old_folder_path1,new_folder_path1 old_folder_path2,new_folder_path2 old_folder_path3,new_folder_path3 I would like to run a shell command that moves ...
user avatar
0 votes
2 answers
87 views

How to move all files with extension to a subdirectory?

I have a directories in /media/home/Seagate Expansion Drive/Downloads/Java Spring Gurus/folder1 .../folder2 .../foldern Inside every directory I have a *.mp4 file and different types of additional ...
user avatar
0 votes
0 answers
36 views

How to copy every N file when serialization is not consistent

I have a directory containing 101695 files ranging from img001.jpg to img101693.jpg and I want to move every 100th image to another directory. I have found some similar posts such as How to copy every ...
user avatar
  • 163
2 votes
1 answer
68 views

Had an extra > character when moving a file, now the folder is missing

I tried moving a file in Linux from one directory to another and accidentally had an extra > character. mv /u01/app/oracle/product/12.1.0.2/db_1/dbs/>test2.dbf /u01/shared_data/oradata/TEST/test....
user avatar
  • 105
1 vote
0 answers
18 views

Move (mv) file that starts with a hyphen (-) [duplicate]

I have a file called -my-file-name.txt. I'm trying to move it using the mv command, however it fails because the hyphen in the name is acting like an option. mv -my-file-name.txt /some/new/folder ...
user avatar
  • 111
3 votes
1 answer
77 views

Find files then move them and rename them at the same time?

Currently I use three steps to gzip some static assets and then use s3cmd to an S3 bucket (technically it's a Digital Ocean Spaces bucket). Here's what I do: $ find . -type f -name '*.css' | xargs -I{...
user avatar
  • 133
0 votes
1 answer
111 views

Move Files Recursively but only if they are not open by another process

I want to modify the script text below, to change the file permissions, owner and move it, only if the file is not open by another process. cd /mnt/usbdrive/DVR sudo chown 777 -R /mnt/usbdrive sudo ...
user avatar
0 votes
4 answers
2k views

Recursively moving contents of directory

I wanted to recursively move files from a folder (Pictures) to another (Picturesnew). The "Pictures" Folder had many subfolders and and hence I used this command after following up the posts here. ...
user avatar