LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-15-2007, 10:42 PM   #1
newio
Member
 
Registered: May 2006
Location: Sydney
Distribution: Slackware 11.0
Posts: 39

Rep: Reputation: 15
bad file created


Hi All,

Im managed to do one of those one-in-a-million stupid things. I tried to use:

tar -cvf --compress appbackup .kde .local

to backup some of my stuff. Unfortunatly, tar used "--compress" as the name of the file to create, rather then an option.

Can anyone correct my usage of tar so i can compress it as it goes?
 
Old 02-15-2007, 10:47 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
"-cvf" is shorthand for "-c -v -f". -f means "the following is the output filename". So you can move the --compress before all that:

Code:
tar --compress -cvf appbackup .kde .local
You can get rid of the file named "--compress" as follows:

Code:
rm -- --compress
Hope this helps.
 
Old 02-15-2007, 10:49 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I would use 'gzip' or 'bzip2' support rather than compress to begin with. In any case, tar ALWAYS uses whatever comes immediately after 'f' for the filename.

Gzip compression:
Code:
tar czvf appbackup.tar.gz .kde .local
For bzip2, replace the 'z' with j.
 
Old 02-15-2007, 11:30 PM   #4
newio
Member
 
Registered: May 2006
Location: Sydney
Distribution: Slackware 11.0
Posts: 39

Original Poster
Rep: Reputation: 15
thankx all. worked a treat :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File format of .vnc file created by vncrec rktech83 Linux - Networking 0 08-17-2006 09:16 AM
How do you unintall a bad package created by rpm illwi11 Linux - Software 1 09-02-2004 08:33 PM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM
wrong fs type ,bad option, bad superblock on /dev/hda3, or too many mounted file syst Vencalator Linux - Newbie 4 09-20-2003 01:58 PM
wrong fs type, bad option, bad superblock on /dev/cdrom, or too many mounted file sy TheCyberDude Linux - Software 1 02-11-2002 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration