The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Coping files from server to local jhofilena Shell Programming and Scripting 3 09-19-2007 02:50 PM
For loop - coping with an asterisk item PaulUrwin Shell Programming and Scripting 1 09-07-2007 03:01 AM
MV files from one directory structure(multiple level) to other directory structure srmadab UNIX for Advanced & Expert Users 4 09-13-2006 05:01 PM
copy files from one directory to another directory zip_zip UNIX for Dummies Questions & Answers 5 09-14-2003 07:16 PM
moving files from a unix directory to a windows directory gleads UNIX for Dummies Questions & Answers 2 08-29-2002 09:42 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-21-2006
pavan_test pavan_test is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 53
coping all files from a directory

Hello,

i have a directory;say /home/pavi

i has some files and every day files keep adding to it.

i am writing a shell script which copies all the files from this
directory to another.say /home/tom/tmp

how do i copy all the files from /home/pavi to /home/tom/tmp

all the files in the directory /home/tom/tmp gets automatically
deleted every 10 days.

can anyone help me plz..


thanks
pavi
  #2 (permalink)  
Old 07-23-2006
dsbeerf's Avatar
dsbeerf dsbeerf is offline
Registered User
  
 

Join Date: Dec 2005
Location: Chicago, IL USA
Posts: 58
Assuming that you have the permissions set so you can write to "/home/tom/tmp":

$ cd /home/pavi
$ tar cf - . | (cd /home/tom/tmp;tar xfBp - )
$
===
If you have LONG filenames (over 100 characters), use GNU tar.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0