0% found this document useful (0 votes)
23 views

Linux Ls Command

IT Technical English
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Linux Ls Command

IT Technical English
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux "ls" Command with Examples

SEP 23, 2022 7 MIN READ LINUXLSCOMMANDS

In Linux, the command "ls" is one of the most commonly used. It's used
to display a list of files and sub-directories in the current directory. If
you're new to using the command line, the first command you should
learn is probably ls.This command can be used by both regular users as
well as system administrators.

The ability to view what files are in a directory is what makes ls so


important. It will be used frequently to display directory contents.
Although it is not a complicated command, it does come with a number
of options for listing files with additional information. Even while ls is
always enough to list contents, you're likely to find a few of these
options highly handy.

Linux Command "ls" options


A Linux command has the following basic syntax:
ls [ Options ] [File]

Following are some frequently used options in Linux ls commands:

Options Description

ls -a list all files including hidden file starting with '.'.

ls -d list directories - with ' */'.


ls -l list with long format - show permissions.

ls -F Append indicator (one of */=>@|) to entries.

ls -lh This command will show you the file sizes in human readable format.

ls -r list in reverse order.

ls -i list file's inode(index) number.

ls -ltr View Reverse Output Order by Date.

ls -t sort by time & date.

ls -n It is used to print group ID and owner ID instead of their names.

ls -m A list of entries separated by commas should fill the width.

ls -g This allows you to exclude the owner and group information columns.

ls -q Force printing of non-graphic characters in file names as the character `?';.

ls -Q Place double quotations around the entry names.

You might also like