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 - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2009, 07:51 AM   #1
dmj2009
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
Unhappy Strange tar issue regarding output filename


Hi - first post here as my Google-fu failed me

I am using Redhat Enterprise Linux and have come across a strange problem using tar. I am issuing the command as follows:-

tar -czfp /directoryhere/filename.tar.gz /directorytobackup --exclude "/directoryhere"

and although it whirs away and completes, I am left with a file named p.

Just p - no extensions, nothing...

So, having successfully used tar before but not with .gz I removed that from the equation, using filename.tar instead - guess what - p again!

If I try to un-tar the file named p it justs sits there and does absolutely nothing.

Any ideas at all would be greatly appreciated!
 
Old 08-12-2009, 08:25 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
It's the fp that's doing it. See the man page for what the f option does.
 
Old 08-12-2009, 08:33 AM   #3
dmj2009
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Ah, that would explain it...!

I'll get my coat.

Thankyou
 
Old 08-12-2009, 10:22 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Don't worry -- it happens to all of us; sometimes you get so close to a problem you can't see the wood for the trees. We used to have a great technique in one support team I worked in called "stone walling". When one of us got really stuck on a problem we would explain it to a colleague. In the act of explaining it from the beginning we had to look again at parts of the problem we could no longer see. Almost always, when we were explaining the simple basics of the problem we would have that "eureka moment" -- Ah! Of course!

We called it "stone walling" because, for all the expertise of our colleagues they mostly did nothing but listen -- they might as well have been a stone wall for all the input they made.

I guess we should have taken the technique to its logical conclusion and not have bothered our colleagues at all. Any inanimate object would have done, just so long as we were serious about explaining the problem to it. Picture the scene -- members of the technical support team talking to doors to solve problems!
 
Old 08-12-2009, 11:18 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
tar czfp /directoryhere/filename.tar.gz ...
or
tar -czpf /directoryhere/filename.tar.gz ...

Should do it. Your problem is that -f expects the filename to immediatly follow it, and you gave it "p". Either using the old-style flags (no "-") or reordering the -switches will work. With the first form, it expects arguments in the same order as the switches and does not require proximity.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iPod detection issue with Helix Banshee: ipod-debug-dump.sh - strange output! mahantya SUSE / openSUSE 2 04-27-2007 08:14 PM
iPod detection issue with Banshee: ipod-debug-dump.sh - strange output! mahantya Linux - Software 0 03-26-2007 05:08 PM
getting error during "tar -xvzf filename.tar.gz" b0nd Linux - Newbie 11 04-23-2005 08:50 PM
extracting -filename.tar.gz- zokter Linux - Newbie 3 06-29-2003 06:18 AM
Untar filename.tar.tar Dr.Swing Linux - Newbie 12 09-27-2002 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:57 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