bash.md (618B)
1 # bash 2 3 use parameter of previous command ([ref 1](#ref#1)) 4 ``` 5 mkdir test 6 cd $_ 7 ``` 8 or 9 ``` 10 mkdir test 11 cd !$ 12 ``` 13 14 ## `find` examples 15 ``` 16 find . -type f -iname "*regex*" -exec rm -f {} \; 17 ``` 18 19 ## when was user created [ref_2](#ref#2) 20 - if user has never logged in after account creation 21 ``` 22 ls -l /home/<user>/.bash_logout 23 ``` 24 25 ## run bg job and log out 26 after 'ctrl-z' 27 ``` 28 disown -h %1 29 bg 1 30 logout 31 ``` 32 _where 1 is the job number_ 33 34 ## ref 35 - :1: https://unix.stackexchange.com/questions/125385/combined-mkdir-and-cd 36 - :2: https://it.toolbox.com/question/how-to-find-out-when-a-user-is-created-in-linux-030612