what do you want to do with these files
Do you want to rename them to something else in the same directory
or do you want to move them to some other folder
Below is the code to move such files to other directory /move/to/this/path/
Last edited by SriniShoo; 08-06-2014 at 12:17 AM..
Reason: change tags from ICODE to CODE
Hi,
I have a sun sparc system. I don't have a sun keyboard, hence i connected a pc keyboard.
I would like to know the "STOP A" equivalent command to be used on pc keyboard.
Regards,
Raja (4 Replies)
Hi all,
We have CVS server running for few years with absolutely no problems.
Because of conditions not depending on me, I'm forced to move some part of our repository to another server (SVN). I need to move ONLY one branch from CVS server to SVN server. The branch must be moved with all... (7 Replies)
Hi all,
I have a requirement where the variable name starts with $, like
$Amd=/home/student/test/
How to work wit it? can some one help me, am in gr8 confusion:confused: (5 Replies)
Hi there,
I am lil confused with the following issue.
I have a File, which has the following header: IMSHRATE_043008_101016
a sample detailed record is :9820101 A982005000CAVG030108000000000000010169000MAR 2008
9820102 MAR 2008 D030108
... (1 Reply)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
If I run rm -rf * command under one parent directory.
/data > rm -rf *
Is there anyway to know which files will be deleted first ?
Start using code tags please, ty. (2 Replies)
I am on linux red hat, want to use the logic within bash shell script file.
I have the following type, named files in folder /staging, want to move with new filename just the firstpart upto underscore, example 20180904105056.dat, how can i get upto first part of filename and validate to chk if... (2 Replies)
Hi All,
We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
LEARN ABOUT OPENDARWIN
mv
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.
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.
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