create/update 'blog - fun with find.md' file
This commit is contained in:
@@ -45,3 +45,18 @@ find /var/log/hbase -type f -iname "*log*" -mtime +360 -delete
|
|||||||
Replace `hbase` with the log directory you want to search. If you don't need to save the archives anywhere, skip step two.
|
Replace `hbase` with the log directory you want to search. If you don't need to save the archives anywhere, skip step two.
|
||||||
|
|
||||||
[Reference](https://www.cyberciti.biz/faq/linux-unix-find-tar-files-into-tarball-command/)
|
[Reference](https://www.cyberciti.biz/faq/linux-unix-find-tar-files-into-tarball-command/)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Find files by group and mode
|
||||||
|
|
||||||
|
Note: *from Teachingbooks web directory permission fix.* at OverDrive
|
||||||
|
|
||||||
|
Find files that have `group: www-data` and current `permissions: 644`, then update the permissions to 664
|
||||||
|
|
||||||
|
```bash
|
||||||
|
find <directory> -type f -group www-data -perm 644 -exec ls -al {} \;
|
||||||
|
find <directory> -type f -group www-data -perm 644 -exec chmod g+w {} \;
|
||||||
|
```
|
||||||
|
|
||||||
|
[Reference](https://ostechnix.com/find-files-based-permissions/)
|
||||||
Reference in New Issue
Block a user