0
votes
3answers
40 views

How do you view a sql.gz file as plain text SQL from the command line?

How do you view a sql.gz file as plain text SQL from the command line? I want to read the SQL statements stored in a .sql.gz file, from the command line on the server. I've tried tar -xzvf, but get ...
2
votes
3answers
96 views

Tar compress folder without specifying the filename

Is it possible to use tar to compress a folder without giving the filename of the archive to store in? Normally you use: tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog I want to do something ...
1
vote
2answers
2k views

tar: short read

I get an error when I uncompress my tar. I do this: tar xvf VM_DECOMPTES.tar and after some time I get the following error: tar: short read What is going wrong here? tar: unrecognized ...
2
votes
1answer
652 views

Untar Without Top-Level Directory

I have a tar (websites.tgz) that contain a bunch of Drupal websites that are tarred up starting with 'htdocs' I need to untar them into /local/htdocs/web1 /local/htdocs/web2 and so on. But I ...
3
votes
1answer
2k views

Extrat tar “Cannot open: File name too long”

I made a tar with a directory on a remote machine with: tar -czvf I scp it to my local machine, where I wanted to untar it: tar -xzvf But I get : Cannot open: File name too long On my local ...
3
votes
1answer
357 views

Extract directory from wget's stdout

I am trying to wget a tarball from github.com and, without creating a temporary file, extract a subdirectory from it: wget -qO- https://github.com/django-nonrel/django-nonrel/tarball/develop | tar ...
4
votes
2answers
2k views

Why doesn't tar ask before overwriting existing files?

I lost a couple hundred lines of a Vim plugin I wrote and continue back up every so often because I extracted a tar file containing an older version. I decided not to use source control management ...
9
votes
2answers
937 views

What does “-” mean as an argument to a command?

I found this link on how to open tgz in one step. gzip -dc target.tar.gz | tar xf - What does the '-' mean?