projects:openwrt_on_hlk-rm04

Archive | Ls

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.

Usage:

# 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 ls archive

man ls man tar man unzip

$ tar -tzf myarchive.tar.gz docs/readme.txt docs/photo.jpg scripts/run.sh To get detailed output similar to ls -l : a directory name