Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have created iostat report file from last 3 days and I am able to read file. Just now try to compressed file using tar (Actually it not compressed)and after compressed tried to read it but it not showing any thing .
Below are commands i tried
985 ls -lh iostat_output
986 tar -zf iostat_output
987 tar --help
988 tar -cf iostat_output
989 tar -cf iostat_output iostat
990 ls -lh iostat_output
991 cat iostat_output
992 tar -xf iostat_output
993 cat iostat_output
Hi,
I have created iostat report file from last 3 days and I am able to read file. Just now try to compressed file using tar (Actually it not compressed)and after compressed tried to read it but it not showing any thing .
Again, as you have been asked for TWO YEARS now, you need to PROVIDE ACTUAL DETAILS. The subject of this thread is "filerupted after tar command"...what, exactly, is 'filerupted'?? You say "it now showing any thing", but don't say what it IS doing.
Quote:
Below are commands i tried
985 ls -lh iostat_output
986 tar -zf iostat_output
987 tar --help
988 tar -cf iostat_output
989 tar -cf iostat_output iostat
990 ls -lh iostat_output
991 cat iostat_output
992 tar -xf iostat_output
993 cat iostat_output
Its not displaying any output.
...and AGAIN, as you've been asked MANY TIMES, you need to use CODE TAGS, and ask a clear question. Based on what you posted, it's not clear WHAT you're trying to do. Did you bother to try reading the man page on the tar command? Because:
Quote:
Originally Posted by Sagar666
985 ls -lh iostat_output
986 tar -zf iostat_output
987 tar --help
988 tar -cf iostat_output
989 tar -cf iostat_output iostat
990 ls -lh iostat_output
991 cat iostat_output
992 tar -xf iostat_output
993 cat iostat_output
985 - Lists symlinks and checks them. Nothing to do with creating a tar file, but checking an existing one
986 - Says to use a file and further zip compress, but doesn't put the actual CREATE directive in it
987 - How, exactly, does "--help" factor in?
988 - Great, you've created a file...but you again didn't read the man page, since the FIRST filename is the name of the archive to create. You overwrote your iostat file with blank data, since the output file probably doesn't exist, does it?
989 - Pretty much the same as 988.
990 - Again, why?
991 - cat'ing the file does what? You zeroed out the file(s) previously
992 - Now you want to extract files...from the empty file you created?
993 - Again, why?
Read the man page, or see ANY of the many thousands of easily-found examples on how to create a tar file on Google.
The purpose of tar is to combine several files in an archive, not to compress files.
To compress a file, use commands like gzip or xz.
Quote:
Originally Posted by sagar666
985 ls -lh iostat_output
986 tar -zf iostat_output
987 tar --help
988 tar -cf iostat_output
989 tar -cf iostat_output iostat
990 ls -lh iostat_output
991 cat iostat_output
992 tar -xf iostat_output
993 cat iostat_output
Its not displaying any output.
None of the above commands display any output? Unlikely.
So which command doesn't display any output?
The purpose of tar is to combine several files in an archive, not to compress files.
To compress a file, use commands like gzip or xz.
None of the above commands display any output? Unlikely. So which command doesn't display any output?
You're right...but, with the addition of the z option, it will create a gzipp'ed file after the tar operation completes. And the commands he ran above, show that he gave a command that pretty much used the input file as the output file..meaning the OP zeroed out the input file (lines 988 and 989).
The gzip option will vary by version of tar, but it's pretty standard these days.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.