Linux - ls (List directory content)

> Procedural Languages > Bash Shell and (Unix|Linux) Utilities (XCU) > Bash - File System

1 - About

Linux Command to list the contents of a directory ll is an alias of “ls -la”

Check also the find command

Advertising

3 - Syntax

ls [option] [file}

4 - Example

ls -alt

5 - Options

5.1 - long format (l)

The -l option lists files and directories as a table with the following structure:

  • the number of child's (directory and file)
  • the owner name
  • the group owner name
  • the size of the file in bytes
  • the date and time of the last modification
  • the name of the file or directory
Advertising

5.2 - order (t)

The -t option orders files and directories by the time they were last modified.

5.3 - hidden files and directory (a)

5.4 - Only file name

ls -A1
lang/bash/fs/ls.txt · Last modified: 2019/04/11 16:56 by gerardnico