- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar command options
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
09-20-2006 07:49 AM
09-20-2006 07:49 AM
Case in point, you are supposed to say
tar xvf
and not
tar -xvf
Every other command precedes its option or switches with "-", for example rm, cp, find and more.
I've always said
tar -xvf
and
tar -cvf
without any problems.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 07:54 AM
09-20-2006 07:54 AM
SolutionYou can use either:
# tar -xvf
(or):
# tar -xvf
Personally, I use the "-" character to denote the switch that the options that follow represent.
The best answer I can provide to your question of why the "-" is optional is that 'tar' is one very old utility; written when conformity and standards were less rigorously enforced or valued.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 07:58 AM
09-20-2006 07:58 AM
Re: tar command options
You can both of them "tar tvf" or tar -tvf. I am not sure why other commands doesn't allow you to do this.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 08:05 AM
09-20-2006 08:05 AM
Re: tar command options
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
#
There is the "-" in the syntax and since the command works very well without the "-" give me more flexibility !!
As JRF said, most people are used to typing
tar -cvf or tar -xvf ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 08:40 AM
09-20-2006 08:40 AM
Re: tar command options
tar -cvf /dev/rmt/0m -b 1024 /
tar cvfb /dev/rmt/0m 1024 /
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 09:55 AM
09-20-2006 09:55 AM
Re: tar command options
tar's only use is for simple exchanges of data. It is inappropriate for full system backups or large system backups.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 06:33 PM
09-20-2006 06:33 PM
Re: tar command options
as a remark to Bill's answer:
If you have a real heterogenous environment and must exchange backup files between them, 'tar' is nearly unbeatable as backup backend utility, IMHO.
mfG Peter