updated README.md
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
6fdd8a1e5e
commit
f078b33b6b
28
README.md
28
README.md
@ -443,24 +443,34 @@ column -c3 -s " " -t | \
|
|||||||
sort -nr | nl | head -n 20
|
sort -nr | nl | head -n 20
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Empty a file (truncate to 0 size)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
>filename
|
|
||||||
```
|
|
||||||
|
|
||||||
###### Quickly backup a file
|
###### Quickly backup a file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp filename{,.orig}
|
cp filename{,.orig}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###### Empty a file (truncate to 0 size)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
>filename
|
||||||
|
```
|
||||||
|
|
||||||
###### Delete all files in a folder that don't match a certain file extension
|
###### Delete all files in a folder that don't match a certain file extension
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm !(*.foo|*.bar|*.baz)
|
rm !(*.foo|*.bar|*.baz)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###### Pass multi-line string to a file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# cat >filename ... - overwrite file
|
||||||
|
# cat >>filename ... - append to file
|
||||||
|
cat > filename << __EOF__
|
||||||
|
data data data
|
||||||
|
__EOF__
|
||||||
|
```
|
||||||
|
|
||||||
###### Edit a file on a remote host using vim
|
###### Edit a file on a remote host using vim
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -1039,6 +1049,12 @@ dd <dd_params> status=progress
|
|||||||
watch --interval 5 killall -USR1 dd
|
watch --interval 5 killall -USR1 dd
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###### Redirect output to a file with dd
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo "string" | dd of=filename
|
||||||
|
```
|
||||||
|
|
||||||
<a name="http-https"><b>HTTP/HTTPS</b></a>
|
<a name="http-https"><b>HTTP/HTTPS</b></a>
|
||||||
|
|
||||||
##### Tool: [curl](https://curl.haxx.se)
|
##### Tool: [curl](https://curl.haxx.se)
|
||||||
|
Loading…
Reference in New Issue
Block a user