Listing tar Archives



next up previous contents index
Next: Reading tar Archives Up: The tar Command Previous: Creating tar Archives

Listing tar Archives

To list the contents of a tar archive (always a good thing to do right after creating one), use the -t option in place of -c:

%tar -tvf nc.tar   	List all files in archive file nc.tar.   
-rw-r-r- 1047 100    3320 Dec 20 00:41:30 nc/About   	   
-rw-r-r- 1047 100    3106 Oct 27 15:35:22 nc/doc/mknewsrc.1   	   
-rw-r-r- 1047 100    6503 Apr 28 02:58:16 nc/doc/ncc.1   	   
-rw-r-r- 1047 100    8698 Apr 28 02:57:49 nc/doc/nclip.1   	   
-rw-r-r- 1047 100  155636 May 16 22:41:29 nc/doc/man.mm   	   
-rw-r-r- 1047 100   91031 May 16 22:41:34 nc/doc/append.mm   	   
-rw-r-r- 1047 100   18501 Jun 02 23:55:48 nc/doc/filter.man   	   
-rw-r-r- 1047 100    1464 Dec 15 01:45:26 nc/Makefile   	   
-rw-r-r- 1047 100    2626 Dec 18 19:08:39 nc/READ.ME   	   
-rw-r-r- 1047 100    4082 Apr 19 16:34:31 nc/License   	   

(here the -t option is concatenated with v and f). But be careful. Using the -c option accidently will wipe out your tar.



next up previous contents index
Next: Reading tar Archives Up: The tar Command Previous: Creating tar Archives