- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar 1.5.1 problem
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
Discussions
Discussions
Discussions
Forums
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
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
тАО03-26-2007 10:25 PM
тАО03-26-2007 10:25 PM
I have tar 1.5.1 installed from one of my forum thread..for gnu tar utility to take a tar of more than 2 gb...
but when i run tar -cvf test.tar /home which is 5 gb in size the tar file is cretaed but the file is not compressed..the same file size of 5 tar is getting formed..what should i do??
Solved! Go to Solution.
- Tags:
- tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 10:30 PM
тАО03-26-2007 10:30 PM
Re: tar 1.5.1 problem
tar is an archiving method not a compression tool!
use tools like compress, gzip ... for compression of the files.
See:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1053335
and the last answer in
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=775222
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 10:37 PM
тАО03-26-2007 10:37 PM
Re: tar 1.5.1 problem
Try adding the z option.
# gtar cvzf test.tar.gz /home
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 11:20 PM
тАО03-26-2007 11:20 PM
Re: tar 1.5.1 problem
You can zip the file using gzip command
#gzip file_name.
If it is a directoy, then tar the directory and then zip the file
#tar -cvf dir.tar dir
#gzip dir.tar
You can also use gtar command.
Cheers;
Indrajit Roy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 11:23 PM
тАО03-26-2007 11:23 PM
Re: tar 1.5.1 problem
im not able to find gtar command in my server....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 11:29 PM
тАО03-26-2007 11:29 PM
Re: tar 1.5.1 problem
It is already mentioned.
Still, for clarity here is the full path for gzip.
1.
/usr/contrib/bin/gzip test.tar
(filename of the tar - in your case test.tar)
2.
compress test.tar
Regards,
Rasheed Tamton.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 11:37 PM
тАО03-26-2007 11:37 PM
Re: tar 1.5.1 problem
I think my questn is not clear...
what i mean to ask u guys is that after creating a tar archive should my directory size be reduced ? and if yes then to what extent ..by how many % ?
And second thing i have installed gnu tar since i need to take a tar of 5gb directory.. from http://hpux.connect.org.uk/hppd/hpux/ as a result of which im not able to find gtar command in my server..i doubt whether gnu tar has been properly installed...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2007 11:44 PM
тАО03-26-2007 11:44 PM
Re: tar 1.5.1 problem
Your original files may be increased if they had holes in them and when tar reads them, it would fill in these holes.
The size of the archive should be the sum of the files plus overhead. Only when compressing would you have a reduced size.
gnu tar is just probably called tar and not gtar. Typically if you want to make sure you keep your foreign devil tools separate from HP's, you use g* as the name.
- Tags:
- foreign devil tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 12:00 AM
тАО03-27-2007 12:00 AM
Re: tar 1.5.1 problem
/usr/local/bin/gtar - it should be the default location.
or try to find
find /usr -name gtar
or any dir where you think this might have gone in.
Reg. the reduction of the size, as far as I noticed, normally it should not impact.
Tar as a tool is used for archiving/backing up or moving files around from systems to systems, etc. It is not meant anyway for anyway of compression.
Regards,
Rasheed Tamton.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 12:29 AM
тАО03-27-2007 12:29 AM
Re: tar 1.5.1 problem
no gtar found on my server..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 01:07 AM
тАО03-27-2007 01:07 AM
Re: tar 1.5.1 problem
To make it clear, does /usr/local/bin/tar support the -z or --gzip option?
Use /usr/local/bin/tar --help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 01:22 AM
тАО03-27-2007 01:22 AM
Re: tar 1.5.1 problem
# /usr/local/bin/tar --help
Usage: tar [OPTION...] [FILE]...
GNU `tar' saves many files together into a single tape or disk archive, and can
restore individual files from the archive.
Examples:
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -tvf archive.tar # List all files in archive.tar verbosely.
tar -xf archive.tar # Extract all files from archive.tar.
Main operation mode:
-A, --catenate, --concatenate append tar files to an archive
-c, --create create a new archive
--delete delete from the archive (not on mag tapes!)
-d, --diff, --compare find differences between archive and file system
-r, --append append files to the end of an archive
-t, --list list the contents of an archive
-u, --update only append files newer than copy in archive
-x, --extract, --get extract files from an archive
Operation modifiers:
-g, --listed-incremental=FILE handle new GNU-format incremental backup
-G, --incremental handle old GNU-format incremental backup
--ignore-failed-read do not exit with nonzero on unreadable files
-k, --keep-old-files don't replace existing files when extracting
--keep-newer-files don't replace existing files that are newer than
their archive copies
-n, --seek Archive is seekable
--no-overwrite-dir preserve metadata of existing directories
--occurrence[=NUMBER] process only the NUMth occurrence of each file in
the archive. This option is valid only in
conjunction with one of the subcommands --delete,
--diff, --extract or --list and when a list of
files is given either on the command line or via
-T option. NUMBER defaults to 1.
--overwrite overwrite existing files when extracting
-O, --to-stdout extract files to standard output
--recursive-unlink empty hierarchies prior to extracting directory
--remove-files remove files after adding them to the archive
-S, --sparse handle sparse files efficiently
-U, --unlink-first remove each file prior to extracting over it
-W, --verify attempt to verify the archive after writing it
Handling of file attributes:
--atime-preserve don't change access times on dumped files
--group=NAME force NAME as group for added files
--mode=CHANGES force (symbolic) mode CHANGES for added files
-m, --touch don't extract file modified time
--no-same-owner extract files as yourself
--no-same-permissions do not extract permissions information
--numeric-owner always use numbers for user/group names
--owner=NAME force NAME as owner for added files
-p, --preserve-permissions, --same-permissions
extract permissions information
--preserve same as both -p and -s
-s, --preserve-order, --same-order
sort names to extract to match archive
--same-owner try extracting files with the same ownership
Device selection and switching:
-f, --file=ARCHIVE use archive file or device ARCHIVE
--force-local archive file is local even if has a colon
-F, --info-script=NAME, --new-volume-script=NAME
run script at end of each tape (implies -M)
-L, --tape-length=NUMBER change tape after writing NUMBER x 1024 bytes
-M, --multi-volume create/list/extract multi-volume archive
--rmt-command=COMMAND use given rmt COMMAND instead of rmt
--rsh-command=COMMAND use remote COMMAND instead of rsh
--volno-file=FILE use/update the volume number in FILE
Device blocking:
-b, --blocking-factor=BLOCKS BLOCKS x 512 bytes per record
-B, --read-full-records reblock as we read (for 4.2BSD pipes)
-i, --ignore-zeros ignore zeroed blocks in archive (means EOF)
--record-size=NUMBER SIZE bytes per record, multiple of 512
Archive format selection:
-H, --format=FORMAT create archive of the given format.
FORMAT is one of the following:
gnu GNU tar 1.13.x format
oldgnu GNU format as per tar <= 1.12
pax POSIX 1003.1-2001 (pax) format
posix Same as pax
ustar POSIX 1003.1-1988 (ustar) format
v7 old V7 tar format
-j, --bzip2 filter the archive through bzip2
--old-archive, --portability
same as --format=v7
--pax-option=keyword[[:]=value][,keyword[[:]=value], ...]
control pax keywords
--posix same as --format=posix
--use-compress-program=PROG
filter through PROG (must accept -d)
-V, --label=TEXT create archive with volume name NAME. At
list/extract time, use TEXT as a globbing pattern
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
-Z, --compress, --uncompress filter the archive through compress
Local file selection:
--after-date=DATE same as -N
--anchored exclude patterns match file name start
--backup[=CONTROL] backup before removal, choose version CONTROL
-C, --directory=DIR change to directory DIR
--exclude=PATTERN exclude files, given as a PATTERN
--exclude-caches exclude directories containing a cache tag
-h, --dereference dump instead the files symlinks point to
--ignore-case exclusion ignores case
-K, --starting-file=MEMBER-NAME
begin at member MEMBER-NAME in the archive
--newer-mtime=DATE compare date and time when data changed only
--no-anchored exclude patterns match after any / (default)
--no-ignore-case exclusion is case sensitive (default)
--no-recursion avoid descending automatically in directories
--no-wildcards exclude patterns are plain strings
--no-wildcards-match-slash exclude pattern wildcards do not match '/'
--null -T reads null-terminated names, disable -C
-N, --newer=DATE-OR-FILE only store files newer than DATE-OR-FILE
--one-file-system stay in local file system when creating archive
-P, --absolute-names don't strip leading `/'s from file names
--recursion recurse into directories (default)
--strip-components=NUMBER strip NUMBER leading components from file
names
--suffix=STRING backup before removal, override usual suffix ('~'
unless overridden by environment variable
SIMPLE_BACKUP_SUFFIX
-T, --files-from=FILE-OF-NAMES get names to extract or create from file
NAME
--wildcards exclude patterns use wildcards (default)
--wildcards-match-slash exclude pattern wildcards match '/' (default)
-X, --exclude-from=FILE exclude patterns listed in FILE
Informative output:
--checkpoint display progress messages every 10th record
-v, --verbose verbosely list files processed
--check-links print a message if not all links are dumped
--index-file=FILE send verbose output to FILE
-R, --block-number show block number within archive with each
message
--show-defaults Show tar defaults
--show-omitted-dirs When listing or extracting, list each directory
that does not match search criteria
--totals print total bytes written while creating archive
--utc print file modification dates in UTC
-w, --interactive, --confirmation
ask for confirmation for every action
Compatibility options:
-o when creating, same as --old-archive. When
extracting, same as --no-same-owner
Other options:
-?, --help Give this help list
--license Print license and exit
--usage Give a short usage message
--version Print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control may be set with --backup or VERSION_CONTROL, values are:
t, numbered make numbered backups
nil, existing numbered if numbered backups exist, simple otherwise
never, simple always make simple backups
*This* tar defaults to:
--format=gnu -f- -b20 --rmt-command=/usr/local/bin/rmt --rsh-command=/usr/bin/remsh
Report bugs to
when i do tar -cvzf i get an error illegal option....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 02:07 AM
тАО03-27-2007 02:07 AM
Re: tar 1.5.1 problem
ask for usage information from
/usr/local/bin/tar
it talks about "-z", but if you use
tar -z
it fails?
Have you considered using
/usr/local/bin/tar -z
instead of
tar -z
???
Time for "Introduction to UNIX"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 02:57 AM
тАО03-27-2007 02:57 AM
Re: tar 1.5.1 problem
a "-z" option, this kind of thing was done
using a pipeline, like:
tar cf - file_list | gzip - > archive.tgz
or:
gzip -c -d archive.tgz | tar xfo -
Or somethings like those.
The fancy options in GNU "tar" hide this
stuff, but it's nice to know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 02:48 PM
тАО03-27-2007 02:48 PM
Re: tar 1.5.1 problem
That's why you rename this file (or create a symlink) to gtar, so you can keep them straight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 04:48 PM
тАО03-27-2007 04:48 PM
Re: tar 1.5.1 problem
I want to take a tar of mount point which is 5 gb in size...and at the same time i want to compress it....
For ex:
/test - 5gb
i would like to tar this mount point plus compress it anohter mount point which is 6gb only...how can i fit it into thta mount point
bcoz tar and gzip take place in the same mount point simultaneously....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:00 PM
тАО03-27-2007 05:00 PM
Re: tar 1.5.1 problem
not) ...
If the source file system is at "/src", and
the destination is "/dst", I might try
something like:
( cd /src ; tar cf - . ) | gzip -c > /dst/src.tgz
Do you want the compressed "tar" archive at
the destination, or did you want to unpack
the archive at the destination? (Do you want
"/dst/src.tgz", or do you want all the files
from "/src" to be copied to "/dst"?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:04 PM
тАО03-27-2007 05:04 PM
Re: tar 1.5.1 problem
from "/src" to be copied to "/dst"?)
space being 5gb in src ansd 6gb in dst.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:21 PM
тАО03-27-2007 05:21 PM
Re: tar 1.5.1 problem
> from "/src" to be copied to "/dst"?
This is how you should have started this
thread. It's often easy to explain how to
solve a problem. It's often hard to explain
how to implement the wrong solution to that
problem.
So why compress? You can, but you don't
need to. What you _do_ need is a "tar"
pipeline (or a cpio pipeline, or a
dump-restore pipeline, or ...). For example:
( cd /src ; tar cf - . ) | \
( cd /dst ; tar xfo - )
Of course, you need to get the right "tar",
as covered earlier.
If you have fast CPUs and a slow network, it
might make sense to add compression, like,
for example:
( cd /src ; tar cf - . | gzip -c ) | \
( cd /dst ; gzip -c -d | tar xfo - )
This type of question seems to be popular.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1111049
Because this is all new stuff, you should
probably run a few experiments on small
directories, to see how it works, before
doing the big job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:25 PM
тАО03-27-2007 05:25 PM
Re: tar 1.5.1 problem
one "tar" command or the other. (If you add
"-v' to both "tar" commands, the mixed output
can be more confusing than helpful.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:36 PM
тАО03-27-2007 05:36 PM
Re: tar 1.5.1 problem
thanx for the explaination...........points given to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 05:39 PM
тАО03-27-2007 05:39 PM
Re: tar 1.5.1 problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 06:11 PM
тАО03-27-2007 06:11 PM
Re: tar 1.5.1 problem
progress, and that's better than no progress.
When I learn everything, I'll be sure to
announce it here. (Don't hold your breath.)