LinuxQuestions.org
Register a domain and help support LQ
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-2006, 11:57 AM   #1
Ion42
LQ Newbie
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Question Listing directories only from tar file?


I have a rather large (~31 GB) tar file, a backup of /home on a server.
What i want to do i list the contents of this file but only the directories.

I know that "tar -tvf backup.tar" lists all the files but i don't know how to make it list only the directories.

Anybody have any good advice?
 
Old 11-12-2006, 12:07 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Just append this to your existing command (which already has the v (verbose) and t (list) options:
Code:
|grep ^d
 
Old 11-12-2006, 12:27 PM   #3
Ion42
LQ Newbie
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
Smile

Thanks a lot
 
  


Reply

Tags
tar


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Listing largest directories jrdioko Linux - Software 1 07-19-2006 09:08 PM
Listing all directories only anjanesh Linux - Newbie 5 06-20-2006 04:23 AM
Bash - listing directories tarja Programming 8 12-03-2005 05:03 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 04:15 AM
proftpd...hangs before listing directories bstew007 Linux - Software 7 12-23-2002 03:57 AM


All times are GMT -5. The time now is 09:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration