10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Friends, i have a requirement where i need to rename my files residing in multiple sub directories and move them to one different directory along with some kind of directory indicator.
For eg:
test--is my parent directory and it has many files such as
a1.txt
a2.txt
a3.txt
... (5 Replies)
Discussion started by: gnnsprapa
5 Replies
2. Shell Programming and Scripting
I'm using cygwin32 on Windows.
DN is an environment variable pointed at my download directory.
This command works to move the single most recent file in my download directory to my current directory:
mv "`perl -e '$p = $ARGV; opendir $h, $p or die "cannot opendir $p: $!"; @f = sort { -M $a... (2 Replies)
Discussion started by: siegfried
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a directory with a lot of files like this:
a.bam
b.bam
c.bam
I like to rename these files based on a list where the name of the files in the first column will be replasced by the names in the second column. Here is my list which is a tab-delimited text file:
a x
b y
c ... (4 Replies)
Discussion started by: a_bahreini
4 Replies
4. Shell Programming and Scripting
Hi All,
I am creating a script which will connect to remote server with ssh and perfom below.
- Search in a directory
- Search for a pattern
- Check the size if greater than the size_limit rename the file.
Below is the code i have written.
ssh user@host <<EOF
find /tmp... (5 Replies)
Discussion started by: Girish19
5 Replies
5. UNIX for Dummies Questions & Answers
I have a directory e2e_ms_xfer/cent01
this contains the multiple files some of which will be named below with unique date time stamps
e2e_ms_edd_nom_CCYYMMDD_HHMM.csv
What I want to do is in a loop
1) Get the oldest file
2) Rename
3) Move it up one level from e2e_ms_xfer/cent01 to... (1 Reply)
Discussion started by: andymay
1 Replies
6. Shell Programming and Scripting
Hello,
I have a list of files like
-rw-rw-r-- 1 rails rails 8463005 Jul 27 04:02 find_or.log.3.gz
-rw-rw-r-- 1 rails rails 33786339 Jul 27 04:02 pro.log.10.gz
-rw-rw-r-- 1 rails rails 44815467 Aug 3 04:02 pro.log.9.gz
-rw-rw-r-- 1 rails rails 81562896 Aug 4 04:02 pro.log.8.gz... (7 Replies)
Discussion started by: ashokvpp
7 Replies
7. UNIX for Dummies Questions & Answers
Dear friends,
I have created a script to rename all files in a directory by appending the file name with username (who created the file), the date it was created. For example, "apple.doc" should be renamed to "johnFeb23apple.doc" where "john" is the owner and "Feb23" is file created date. It... (4 Replies)
Discussion started by: djsnifer
4 Replies
8. UNIX for Dummies Questions & Answers
I have a number of files in directories labeled like this:
/Data/tr_gray/tr_DTI/dti_FA.nii.gz
(the brackets here represent a range of number that the files are labeled with)
I need to rename each dti_FA.nii.gz file according to the name of the folder it resides in. For example, the file ... (3 Replies)
Discussion started by: tk0034
3 Replies
9. Shell Programming and Scripting
Hi,
I have around 100 xml file in a directory. I need to rename the files from .xml to .xml1. So i tried using the following command:
mv *.xml *.xml1
but i am getting the following error
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more... (8 Replies)
Discussion started by: ananthi_ku
8 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I am a newbie in writng unix..I am using ksh shell..Does anyone know how to copy a list o files from directory A to directory B with differnt names? i.e
in Dir A, I have
RPT101.555.TXT
RPT102.666.TXT
and I want to copy those files to dir B with new naming convention..
in Dir B,... (7 Replies)
Discussion started by: kinmak
7 Replies