Wednesday, March 27, 2013

Extract File Basename Without Path and Extension in Bash

    $ s=/the/path/foo.txt  $ echo ${s##*/}  foo.txt  $ s=${s##*/}  $ echo ${s%.txt}  foo  $ echo ${s%.*}  foo

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...