Merge branch 'dev' into vhs
This commit is contained in:
46
basics/ls.md
Normal file
46
basics/ls.md
Normal 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
|
||||
```
|
||||
|
25
basics/tree.md
Normal file
25
basics/tree.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "tree"
|
||||
tags: [ "basics" ]
|
||||
---
|
||||
|
||||
The `tree` utility outputs a full listing of everything in your current directory, and those below.
|
||||
|
||||
- Just directories: `tree -d`
|
||||
- Output colour to `less`: `tree -C --info | less -re`
|
||||
- Ignore files in the `.gitignore` file: `tree --gitignore`
|
||||
|
||||
You can place information about the files in a directory to use with the `tree --info` option, like this:
|
||||
|
||||
```
|
||||
config
|
||||
Config files.
|
||||
This is a git submodule.
|
||||
README.md
|
||||
Summary of the git.
|
||||
*.jpg
|
||||
Little picture, does not display
|
||||
words well.
|
||||
```
|
||||
|
||||
Each description-line starts with a tab.
|
Reference in New Issue
Block a user