mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2025-02-16 23:32:45 +00:00
commit
895c9dab1f
@ -45,9 +45,9 @@ Ctrl + x + backspace : delete all text from the beginning of line to the cursor.
|
|||||||
Ctrl + t : transpose the character before the cursor with the one under the cursor, press Esc + t to transposes the two words before the cursor.
|
Ctrl + t : transpose the character before the cursor with the one under the cursor, press Esc + t to transposes the two words before the cursor.
|
||||||
Ctrl + w : cut the word before the cursor; then Ctrl + y paste it
|
Ctrl + w : cut the word before the cursor; then Ctrl + y paste it
|
||||||
Ctrl + u : cut the line before the cursor; then Ctrl + y paste it
|
Ctrl + u : cut the line before the cursor; then Ctrl + y paste it
|
||||||
Ctrl + x + Ctrl + e : launch editor define by $EDITOR
|
|
||||||
Ctrl + _ : undo typing.
|
Ctrl + _ : undo typing.
|
||||||
Ctrl + l : equivalent to clear.
|
Ctrl + l : equivalent to clear.
|
||||||
|
Ctrl + x + Ctrl + e : launch editor defined by $EDITOR to input your command. Useful for multi-line commands.
|
||||||
```
|
```
|
||||||
##### Change case
|
##### Change case
|
||||||
```bash
|
```bash
|
||||||
@ -707,7 +707,7 @@ find . -name "*.html"|xargs rm
|
|||||||
rm `find . -name "*.html"`
|
rm `find . -name "*.html"`
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Delete fiels with whitespace in filename (e.g. "hello 2001")
|
##### Delete files with whitespace in filename (e.g. "hello 2001")
|
||||||
```bash
|
```bash
|
||||||
find . -name "*.c" -print0|xargs -0 rm -rf
|
find . -name "*.c" -print0|xargs -0 rm -rf
|
||||||
```
|
```
|
||||||
@ -987,7 +987,6 @@ echo ${var,,}
|
|||||||
helloworld
|
helloworld
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
##### Expand and then execute variable/argument
|
##### Expand and then execute variable/argument
|
||||||
```bash
|
```bash
|
||||||
cmd="bar=foo"
|
cmd="bar=foo"
|
||||||
@ -1875,12 +1874,12 @@ http://onceuponmine.blogspot.tw/2017/10/setting-up-msmtprc-and-use-your-gmail.ht
|
|||||||
telnet 192.168.2.106 53
|
telnet 192.168.2.106 53
|
||||||
```
|
```
|
||||||
|
|
||||||
##### change network maximum transmission unit (mtu) (e.g. change to 9000)
|
##### Change network maximum transmission unit (mtu) (e.g. change to 9000)
|
||||||
```bash
|
```bash
|
||||||
ifconfig eth0 mtu 9000
|
ifconfig eth0 mtu 9000
|
||||||
```
|
```
|
||||||
|
|
||||||
##### get pid of a running process (e.g python)
|
##### Get pid of a running process (e.g python)
|
||||||
```bash
|
```bash
|
||||||
pidof python
|
pidof python
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user