Sponsored Content
Top Forums Shell Programming and Scripting Parallel move keeping folder structure along with files in it Post 302999316 by cmccabe on Friday 16th of June 2017 05:33:40 PM
Old 06-16-2017
Thank you very much Smilie.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

move files and retain subdir structure

hi: I have some files like this folder1/recording1.mp3 folder1/docs/budget.doc folder2/others/misc.mp3 folder3/others/notes.doc all this folders and files are under the mp3 folder. I would like to move just the mp3s to another folder but retain the subdir structure i have. So if... (4 Replies)
Discussion started by: jason7
4 Replies

2. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

3. Shell Programming and Scripting

Move files & folder structure

Hey, this might be a really basic question, but I'm new to Unix scripting. I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure - home/temp/test/dir1/ ... (3 Replies)
Discussion started by: SOCLA_CELT
3 Replies

4. Shell Programming and Scripting

Need to Zip files three years old or longer but leave folder structure intact

Hi all, Hello everyone, my first post here :). I tried to search the forum but I didn't find exactly what I was looking for... I need to zip/tar files across entire filesystem which are more 3+ years old but leave folder structure intact. If the script locates tar/zip files they are more... (1 Reply)
Discussion started by: sashruby
1 Replies

5. Shell Programming and Scripting

Archiving files keeping the same structure directory

Hello Team, We would like to backup a lot of files inside of a structure of directories, four, five or more levels in some Ubuntu, Mac and Solaris systems. For instance: /home/chuck/sales/virgin/rent-quote.pdf /home/chuck/sales/marriott/vacation-quote.pdf... (2 Replies)
Discussion started by: csierra
2 Replies

6. Shell Programming and Scripting

Copying files from various folders to similar folder structure in another location

Hi, I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location. Ex: mainfolder1 file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure. rsync is not... (7 Replies)
Discussion started by: Raji Perumal
7 Replies

7. Shell Programming and Scripting

Move files from Space Folder to other folder

I want to move a folder with spaces from one folder to another. I have two folders like this, 1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/ I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch... (2 Replies)
Discussion started by: kannansoft1985
2 Replies

8. Shell Programming and Scripting

How to move the files older than x days with similar directory structure?

Hello, I need to move all the files inside /XYZ (has multi-depth sub directories) that are older than 14 days to/ABC directory but with retaining the SAME directory structure. for example: /XYZ/1/2/3/A/b.txt should be moved as /ABC/1/2/3/A/b.txt I know about find /XYZ -type f -mtime +14... (3 Replies)
Discussion started by: prvnrk
3 Replies

9. Shell Programming and Scripting

Script to move files and Creation of folder structure

We are receiving few zipped files in one location say : apple/oranges/incoming All .zip files are placed here in incoming folder. So few of the files are password encrypted. There are only 10 zipped files, so we are planning to create a script which will pick that zip file from incoming... (1 Reply)
Discussion started by: Sidhant
1 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
MV(1)							    BSD General Commands Manual 						     MV(1)

NAME
mv -- move files SYNOPSIS
mv [-f | -i | -n] [-v] source target mv [-f | -i | -n] [-v] source ... directory DESCRIPTION
In its first form, the mv utility renames the file named by the source operand to the destination path named by the target operand. This form is assumed when the last operand does not name an already existing directory. In its second form, mv moves each file named by a source operand to a destination file in the existing directory named by the directory oper- and. The destination path for each operand is the pathname produced by the concatenation of the last operand, a slash, and the final path- name component of the named file. The following options are available: -f Do not prompt for confirmation before overwriting the destination path. (The -f option overrides any previous -i or -n options.) -i Cause mv to write a prompt to standard error before moving a file that would overwrite an existing file. If the response from the standard input begins with the character 'y' or 'Y', the move is attempted. (The -i option overrides any previous -f or -n options.) -n Do not overwrite an existing file. (The -n option overrides any previous -f or -i options.) -v Cause mv to be verbose, showing files after they are moved. It is an error for either the source operand or the destination path to specify a directory unless both do. If the destination path does not have a mode which permits writing, mv prompts the user for confirmation as specified for the -i option. As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move. The effect is equivalent to: rm -f destination_path && cp -pRP source_file destination && rm -rf source_file DIAGNOSTICS
The mv utility exits 0 on success, and >0 if an error occurs. The command "mv dir/afile dir" will abort with an error message. LEGACY DIAGNOSTICS
In legacy mode, the command "mv dir/afile dir" will fail silently, returning an exit code of 0. For more information about legacy mode, see compat(5). SEE ALSO
cp(1), rm(1), symlink(7) COMPATIBILITY
The -n and -v options are non-standard and their use in scripts is not recommended. The mv utility now supports HFS+ Finder and Extended Attributes and resource forks. The mv utility will no longer strip resource forks off of HFS files. For an alternative method, refer to cp(1). STANDARDS
The mv utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
A mv command appeared in Version 1 AT&T UNIX. BSD
July 9, 2002 BSD
All times are GMT -4. The time now is 10:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy