LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2011, 06:53 PM   #1
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Rep: Reputation: 53
tar misbehaving (or else I'm lost)


Okay, I'm trying to create a tar file from my shell, from the directory containing the directory I want to archive, using this command:

Code:
tar -cp bluebounty.tar bluebounty
The file I want to archive is bluebounty
I'm using the -p option because I want to preserve permissions

When the command is run, my shell spits out a barrage of strange characters and fails to create the file.

Any ideas why?
 
Old 11-12-2011, 07:12 PM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Quote:
-f, --file [HOSTNAME:]F
use archive file or device F (default "-", meaning stdin/stdout)
You need the -f option to specify the name of the tar file. As the last option

ie:
Code:
tar -cpvf bluebounty.tar bluebounty
Code:
tar -[options]f $archive_name $stuff_to_archive
 
1 members found this post helpful.
Old 11-12-2011, 07:21 PM   #3
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by fukawi1 View Post
You need the -f option to specify the name of the tar file. As the last option
Much thanks! Very helpful.
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Lost in installation of tar.gz's... or1onas Linux - Newbie 10 04-14-2004 01:40 PM
lost in the world of tar humanveal Linux - General 5 06-20-2002 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:27 AM.

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