This commit is contained in:
Malin Freeborn 2023-09-27 02:18:31 +02:00
parent aac3df9997
commit c4313277e8
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
1 changed files with 46 additions and 0 deletions

46
basics/ls.md Normal file
View File

@ -0,0 +1,46 @@
---
title: "ls"
tags: [ "basics" ]
---
Firstly, your `ls` is probably aliased to something.
Check it with:
```bash
alias ls
```
If the prompt shows some alias, then start by removing it:
```bash
unalias ls
```
Now we can begin.
Check the most recently modified file:
```bash
ls -t
```
Reverse this with `tac` to see the file which has been unmodified the longest:
```bash
ls -t | tac
```
Group files by extension:
```bash
ls -X
```
Sort largest files first:
```bash
ls -X
```