LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-09-2009, 10:01 AM   #1
genogp
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
rsync and rename help pls


hi all

I have a number of files in different directories, these files all have the same file name. I need to rsync these files across to another sever and rename them. i dont really care much what they get renamed too.

Any ideas?
 
Old 09-09-2009, 10:10 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,450
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,

Quote:
Originally Posted by genogp View Post
hi all

I have a number of files in different directories, these files all have the same file name. I need to rsync these files across to another sever and rename them. i dont really care much what they get renamed too.

Any ideas?
Now that we are all aware of your 'needs'. What are your 'deeds'?
 
Old 09-09-2009, 10:13 AM   #3
genogp
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
They are log files that i need to copy over

heres an idea, im sure u can see my problem, if i copy them across they will override the exsisting file copied

Quote:
./RBGPRDWAS001/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS001/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS003/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS003/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS004/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS004/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS005/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS005/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS006/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS006/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS007/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS007/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS008/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./RBGPRDWAS008/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS001/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS001/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS003/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS003/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS004/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS004/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS005/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS005/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS006/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS006/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS007/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS007/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS008/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS008/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS009/FxCTeller1/SystemOut_09.09.03_23.00.00.log.bz2
./GRNPRDWAS009/FxCTeller2/SystemOut_09.09.03_23.00.00.log.bz2
im looking for an rsync command to do this for me

Last edited by genogp; 09-09-2009 at 10:17 AM.
 
Old 09-09-2009, 07:55 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Why do you need to rename them? Surely you want the updated versions of those files? The naming convention seems to include enough info to naturally avoid overwriting files that aren't the same. eg Id, sub-id, date, time.

You could just put them in a new dir, that'd prob be easiest.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't play .pls files in Rhythmbox, closes when I try to load .pls file lqv Linux - Software 2 01-07-2013 09:30 AM
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 04:23 AM
RHEL 3 with Windows XP - Help please pls pls ar_m_in Red Hat 7 10-01-2006 10:42 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 06:12 PM


All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration