Last active
February 28, 2019 09:07
-
-
Save mumy81/f3d1e3ca4573e4b6a85bd482ba053068 to your computer and use it in GitHub Desktop.
CentOS linux comamnds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Learn CentOS version: | |
cat /etc/centos-release | |
2. Show Users | |
cat /etc/centos-release | |
3. Find Command | |
find [optimization] [path] [options] [parameter] | |
examples: | |
find . -name ornek.txt | |
find / -name | |
find -03 ./folder -type f -name conf.d | |
find -01 -03 -maxdepth 3 -type d -name lib | |
Change chmod permissions recursively | |
chmod 755 $(find /path/to/base/dir -type d) | |
chmod 644 $(find /path/to/base/dir -type f) | |
Or, to reduce chmod spawning: | |
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 | |
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment