# Alias for detailed listing of archive directory alias lsa='ls -lh --color=auto archive' list_archive() case "$1" in *.tar) tar -tf "$1" ;; .tar.gz
man ls man tar man unzip
Usage:
$ tar -tzf myarchive.tar.gz docs/readme.txt docs/photo.jpg scripts/run.sh To get detailed output similar to ls -l : ls archive
1. Executive Summary In standard Unix/Linux systems, there is no native ls archive command . The command ls is used to list directory contents, and archive is typically either a filename, a directory name, or a command (like tar or ar ) used for archiving. Therefore, the behavior of ls archive depends entirely on the context in which it is executed. # Alias for detailed listing of archive directory