mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
synced 2024-11-22 19:23:11 +00:00
added new one-liner to 'find' commmand
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
952f2b6a22
commit
891c4d5441
1 changed files with 6 additions and 0 deletions
|
@ -1445,6 +1445,12 @@ find . -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2-
|
|||
find . -not -path '*/\.git*' -type f -print0 | xargs -0 sed -i 's/foo/bar/g'
|
||||
```
|
||||
|
||||
###### Recursively find/replace of a string in directories and file names
|
||||
|
||||
```bash
|
||||
find . -depth -name '*test*' -execdir bash -c 'mv -v "$1" "${1//foo/bar}"' _ {} \;
|
||||
```
|
||||
|
||||
###### Recursively find suid executables
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in a new issue