12-11-2009
using mv command for moving multiple files in a folder
Hi,
I have a requirement where
I need to move Bunch of folders containing multiple files to another archive location.
i want to use mv command .I am thinking when we use mv command to move directory does it create directory 1st and then move all the files ?
e.g
source location =/source/tmp1
/tmp2
/tmp3
destination location =/dest/Archive/
mv /source/* /dest/Archive/
tmp1 .tmp2 and tmp3 has multiple files
so my question is while executing move cmd will it create directory 1st and then move file ?
Also if i want to check if move command error out before completing the complete file.
How to do this ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a folder which contain the log files. The folder may contain sub folders as well. I want to move the contents of the log folder to tmp folder periodically. I have used the command.
LOG_DIR=/logs
DESTINATION_DIR=/tmp/logs
find ${LOG_DIR} -mtime +1 -exec mv {}... (10 Replies)
Discussion started by: farooqpervaiz
10 Replies
2. Shell Programming and Scripting
Hi All
I need a shell script for move the 1 year old files from one folder to another folder with date and time.
How to write a shell script for the same pls hepl me out.
thanx in advance
Thanx
Lalit (2 Replies)
Discussion started by: lalitkumar
2 Replies
3. Shell Programming and Scripting
Hi
I need to move last 1 year old files from one folder to another location on same server.How to write a shell script for the same?
thanx
Lalit (8 Replies)
Discussion started by: lalitkumar
8 Replies
4. UNIX for Advanced & Expert Users
Hi,
I need to move 1000s of files from one folder to another.
Actually there are 100K+ files.
Source dir : source1
Target dir : target1
Now if try cp or mv commands I am getting an error message : Argument List too long.
I tried to do it by the time the files are created in the... (1 Reply)
Discussion started by: unx100
1 Replies
5. Shell Programming and Scripting
Hi,
I need to move 1000s of files from one folder to another.
Actually there are 100K+ files.
Source dir : source1
Target dir : target1
Now if try cp or mv commands I am getting an error message : Argument List too long.
I tried to do it by the time the files are created in the source... (6 Replies)
Discussion started by: unx100
6 Replies
6. Shell Programming and Scripting
I have a more than 10 K files in a folder. They are accumulated in a period of more than an year (Say from 13th July 2010 to 4th June 2011). I need to perform housekeeping on this. The requirement is to create a folder like 13Jul2010,14July2010,......3June2011,4June2010 and then from the main... (2 Replies)
Discussion started by: realspirituals
2 Replies
7. UNIX for Dummies Questions & Answers
hello there- first post here- maybe someone can help-
Basically I am trying to copy the contents of a folder to a different folder that has a variable name.
the content I want to copy would be in a folder on my desktop called: myfolder
the variable folder would look something like: ... (3 Replies)
Discussion started by: infothelonghaul
3 Replies
8. Shell Programming and Scripting
Dear folks
I have two data set which there names are "final.map" and "1.geno" and look like this structures:
final.map:
gi|358485511|ref|NC_006088.3| 2044
gi|358485511|ref|NC_006088.3| 2048
gi|358485511|ref|NC_006088.3| 2187
gi|358485511|ref|NC_006088.3| 17654
... (2 Replies)
Discussion started by: sajmar
2 Replies
9. Shell Programming and Scripting
I recently bought Synology server and realised it can run scripts. I would need fairly simple script which moves all files and folders from ARCHIVE folder to WORKING folder. I would also need to maintain folder structure as each of the folders may contain subfolders. How would I go about it as I am... (1 Reply)
Discussion started by: ###
1 Replies
10. Shell Programming and Scripting
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies
LEARN ABOUT OPENSOLARIS
file-roller
file-roller(1) User Commands file-roller(1)
NAME
file-roller - create, view, modify, or unpack an archive
SYNOPSIS
file-roller [--add] [--add-to=archive] [--default-dir=folder] [--extract] [--extract-here] [--extract-to=folder] [--force] [gnome-std-
options]
DESCRIPTION
The File Roller application enables you to create, view, modify, or unpack an archive. An archive is a file that acts as a container for
other files. An archive can contain many files, folders, and subfolders, usually in compressed form.
OPTIONS
The following options are supported:
-d, --add Ask for the name of the archive, then add the files, then quit the application.
-a, --add-to=archive Add files to the specified archive, then quit the application.
--default-dir=folder Specify the default folder for the --add and --extract options.
-f, --extract Ask for the name of the destination folder, then extract the files, then quit the application.
-h, --extract-here Extract archives using the archive name as destination folder and quit the program.
-e, --extract-to=folder Extract archives to the specified folder, then quit the application.
--force Create the destination folder without asking for confirmation.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more infor-
mation.
EXAMPLES
Example 1: Unpacking an Archive
example% file-roller --extract archive
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
>0 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/file-roller Executable for File Roller application.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNW |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
File Roller Manual
ar(1), tar(1), unzip(1), zip(1), attributes(5), gnome-std-options(5)
NOTES
Written by Laszlo Kovacs, Sun Microsystems Inc., 2003, 2004, 2007.
SunOS 5.11 08 Nov 2007 file-roller(1)