Skip to content

Latest commit

 

History

History
executable file
·
22 lines (17 loc) · 445 Bytes

swiss-army-knief-commands.md

File metadata and controls

executable file
·
22 lines (17 loc) · 445 Bytes

Swiss Army Knief Commands For Bash

## Find and replace with pattern.
find . -type f -exec sed -i 's/foo/bar/g' {} +
## Find files with pattern.
grep -rnw '/path/to/somewhere/' -e 'pattern'
## List the directory and files sorted by last modified date-time decending.
ls -ltr
grep -rnwl './' -e 'gateway.tapsys.net'

find . -type f -exec sed -i 's/gateway.tapsys.net/staginggateway.tapsys.net/g' {} +