Skip to content

Instantly share code, notes, and snippets.

@mumy81
Last active February 28, 2019 09:07
Show Gist options
  • Save mumy81/f3d1e3ca4573e4b6a85bd482ba053068 to your computer and use it in GitHub Desktop.
Save mumy81/f3d1e3ca4573e4b6a85bd482ba053068 to your computer and use it in GitHub Desktop.
CentOS linux comamnds
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