The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

ls - List Files




ls (list) 應是最長用的指令之一, ls 功能是列出檔案和目錄,常和萬用字元管線配合使用 。

ls 命令的基本語法為:ls [OPTIONS] [FILES] .

ls 命令的常用選項包括:

ls (list) is one of the most frequently used commands. Its purpose is to list files and directories. It's commonly used in combination with wildcards and pipelines.

The basic syntax of the lscommand is:ls [OPTIONS] [FILES] .

Some common options for the ls command include:

Examples:
$ ls ←List files in the current working directory
fileA       fileB       fileC
ls -F /etc | grep '/$' ←List only directories in '/etc')
a2ps/
acpi/
alsa/
$ ls -d .* ←List only hidden files
.bash_history
.bash_logout
.bashrc

For additional examples and usage of the 'ls' command, you can refer to the provided link.