Ls: Difference between revisions

From Leechfinger
Jump to navigationJump to search
Qais (talk | contribs)
No edit summary
Qais (talk | contribs)
No edit summary
Line 7: Line 7:
=== Show modification time ===
=== Show modification time ===
<syntaxhighlight lang="bash">$ ls -lgot --time-style=long-iso</syntaxhighlight>
<syntaxhighlight lang="bash">$ ls -lgot --time-style=long-iso</syntaxhighlight>
=== Sorting files by extension/version ===
<syntaxhighlight lang="bash">
$ ls -lgo --sort=extension
// or sort by version
$ ls -lgo --sort=version
</syntaxhighlight>
[[Category:Commands]]
[[Category:Commands]]

Revision as of 17:41, 3 May 2025

Show only directories

$ ls -d */‎

Newest files first

$ ls -lt

File size and sort

$ ls -sSh

Show modification time

$ ls -lgot --time-style=long-iso

Sorting files by extension/version

$ ls -lgo --sort=extension 
// or sort by version 
$ ls -lgo --sort=version