Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-12-2006, 10:57 AM   #1
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, 11:07 AM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

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

Original Poster
Rep: Reputation: 0

Thanks a lot



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 08:08 PM
Listing all directories only anjanesh Linux - Newbie 5 06-20-2006 03:23 AM
Bash - listing directories tarja Programming 8 12-03-2005 04: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 03:15 AM
proftpd...hangs before listing directories bstew007 Linux - Software 7 12-23-2002 02:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 AM.

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