- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: need syntax of tar command
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
05-11-2005 04:49 AM
05-11-2005 04:49 AM
tar -cvp . -X /usr/bin/backuproot.exclude --label="Root Backup created on `date
'+%d-%B-%Y'`" -f /dev/st0
What is the syntax of the tar command that will restore a list of 4 filenames that I will put in a /tmp/filelist file?
Do the full pathnames of the files I put in my /tmp/filelist file need a "/" in front?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 07:38 AM
05-11-2005 07:38 AM
Re: need syntax of tar command
P option will preserve absolute paths
F --file will let you retore one file from an archive and wildcards are accepted.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 07:42 AM
05-11-2005 07:42 AM
Re: need syntax of tar command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 08:26 AM
05-11-2005 08:26 AM
Re: need syntax of tar command
Try the command with a smaller tar archive against the /tmp filesystem. That way the experimentation won't harm anything important.
Good Luck,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 06:12 PM
05-11-2005 06:12 PM
Solutionif you want to extract only one particular from a tar archive then this is the syntax
tar -xvf tar-file.tar file-to-extract
file-to-extract is the filename with full path in the same exact manner how it is stored in archive. eg: home/user1/test_123/test
you can use wild cards for file-to-extract. eg: home/user1/test_123/*
or you can have list of files to be extracted in to a single file and use that as referrence to extract
eg:
file1 contains:
home/user1/test_123/test
home/user2/test/user
tmp/output
to extract these files, you can use the tar
command: tar --files-from file1 -xvf tar-file.tar
this will extract the specified files and store them relative to the current path, if you have not used absolute path referrence while creating the archive
Regards,
Gopi