- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar-compres directorys and send
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 04:35 PM
08-23-2002 04:35 PM
tar-compres directorys and send
Could anyone tall me how to do script or !!!!!!!! to do:
Tar all directories from 1000 to 3000 and to transfer them to computer name/folder
Thank you in advance
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 05:31 PM
08-23-2002 05:31 PM
Re: tar-compres directorys and send
Why not just copy them to another place??
rcp -rp directory host:destination_directory
If you are asking how to tar directories name 1000 through 3000 then do this:
tar -cvf /dev/dmt/0m [1-2][0-9][0-9][0-9] 3000
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 07:10 PM
08-23-2002 07:10 PM
Re: tar-compres directorys and send
You can type
tar cf - 1??? 2??? 3000 | remsh
Beware that the user executing this command has the remsh right on remote host
You can 'man tar' for more details.
Hope this help !!
Regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 04:50 AM
08-26-2002 04:50 AM
Re: tar-compres directorys and send
Assuming you have directories such as 1001, 1399, 2100, 2850, etc (i.e. not just directories 1000, 2000, and 3000), the following script should work:
tar cvf myTar.tar [1-3][0-9][0-9][0-9]
ftp -v -n hostname_or_IP_addr < /tmp/ftp.log
user user_name password
bin
cd directory_you_want
put myTar.tar
bye
!
This script will tar up all your directories numbered anywhere from 1000-3000 (inclusive), then ftp to a remote machine, send the file across and go away.
A file called "/tmp/ftp.log" will be created (you must use the -v flag) which you can look at to make sure the ftp was successful.
Good luck!
- Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 06:09 AM
08-26-2002 06:09 AM
Re: tar-compres directorys and send
Wouldn't this grab everything from 1000-3999 instead of 1000-3000?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 06:13 AM
08-26-2002 06:13 AM
Re: tar-compres directorys and send
You are right! Good catch. I guess you need to put:
tar cv [1-2][0-9][0-9][0-9] 3000
- Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 06:17 AM
08-26-2002 06:17 AM
Re: tar-compres directorys and send
That;s why I posted :
tar -cvf /dev/dmt/0m [1-2][0-9][0-9][0-9] 3000
1000-2999 + 3000
:-))
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 09:29 AM
08-26-2002 09:29 AM
Re: tar-compres directorys and send
This should work for the initial copy:
cd /path/to/folders
find [1-2][0-9][0-9]0-9] 3000 -xdev | cpio -o | remsh rhost 'cpio -idmux /path/to/folders'
Then for daily incrementals, you can do this:
cd /path/to/folders
find [1-2][0-9][0-9][0-9] 3000 -type f -mtime -1 -xdev | cpio -o | remsh rhost 'cpio -idmux /path/to/folders'