1
0
mirror of https://github.com/cheat/cheat.git synced 2025-09-05 11:38:30 +02:00
Files
autocompletion
cheatsheets
7z
__init__.py
ab
apk
apparmor
apt-cache
apt-get
aptitude
asterisk
at
awk
bash
chmod
chown
convert
cut
date
df
dhclient
diff
distcc
emacs
find
gcc
git
gpg
grep
gs
head
history
ifconfig
iwconfig
less
ln
ls
lsof
mkdir
mount
mysql
mysqldump
netstat
nmap
notify-send
od
openssl
pacman
pdftk
php
ps
rm
sam2p
scp
screen
sed
shred
sockstat
sort
split
ssh
ssh-copy-id
ssh-keygen
stdout
tar
tmux
top
truncate
uname
vim
yaourt
youtube-dl
yum
.gitignore
LICENSE
README.md
cheat
setup.py
cheat/cheatsheets/chmod
2013-09-06 20:55:22 -06:00

37 lines
1.0 KiB
Plaintext

# Add execute for all (myscript.sh)
chmod a+x myscript.sh
# Set user to read/write/execute, group/global to read only (myscript.sh), symbolic mode
chmod u=rwx, go=r myscript.sh
# Remove write from user/group/global (myscript.sh), symbolic mode
chmod a-w myscript.sh
# Remove read/write/execute from user/group/global (myscript.sh), symbolic mode
chmod = myscript.sh
# Set user to read/write and group/global read (myscript.sh), octal notation
chmod 644 myscript.sh
# Set user to read/write/execute and group/global read/execute (myscript.sh), octal notation
chmod 755 myscript.sh
# Set user/group/global to read/write (myscript.sh), octal notation
chmod 666 myscript.sh
# Roles
u - user (owner of the file)
g - group (members of file's group)
o - global (all users who are not owner and not part of group)
a - all (all 3 roles above)
# Numeric representations
7 - full (rwx)
6 - read and write (rw-)
5 - read and execute (r-x)
4 - read only (r--)
3 - write and execute (-wx)
2 - write only (-w-)
1 - execute only (--x)
0 - none (---)