You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be fooling myself if I claim to be proficient in Linux command line. So I took the Linux Command Line video course to enhance my knowledge in the area.
The first char is the type. The 2-4 is the owner permission for reading, writing and execution respectively. 5-6 is for group members and 9-11 is for others. Taking the example above for illustration:
-: normal file
rw-: owner(i.e. michaelzheng) can read and write
r--: groups members can only read
r--: others can only read
To change each permission group, we can convert binary representation to octal format.
r
w
e
4(i.e. 2^2)
2(i.e. 2^1)
1(i.e. 2^0)
Therefore, if I want to grant owner rwx(4 * 1 + 2 * 1 + 1 * 1 = 7), group member rx(4 * 1 + 2 * 0 + 1 * 1 = 5) and others r (4 * 1 + 2 * 0 + 1 * 0 = 4) then i can use
chmod 750 README.md
ps: displays information about a selection of the active processes
jobs: display status of jobs in the current session
Preface
I would be fooling myself if I claim to be proficient in Linux command line. So I took the Linux Command Line video course to enhance my knowledge in the area.
ls: list directory content
Userful Options:
whatis: displays short manual page descriptions
file: find the type of a file
head: output the first part of file
Userful Options:
tail: output the last part of file
Userful Options:
wildcard: a symbol used to replace or represent one or more characters.
tar: create, maintain, modify, and extract files that are archived in the tar format.
Userful Options:
gzip: compress
wget: download file over network.
Userful Options:
id: prints real and effective user and group ID
groups: show group memberships
whoami: prints the effective user
chmod: change the permissions of files or directories
For a file with listing like this:
The first char is the type. The 2-4 is the owner permission for reading, writing and execution respectively. 5-6 is for group members and 9-11 is for others. Taking the example above for illustration:
To change each permission group, we can convert binary representation to octal format.
Therefore, if I want to grant owner rwx(4 * 1 + 2 * 1 + 1 * 1 = 7), group member rx(4 * 1 + 2 * 0 + 1 * 1 = 5) and others r (4 * 1 + 2 * 0 + 1 * 0 = 4) then i can use
ps: displays information about a selection of the active processes
jobs: display status of jobs in the current session
fg: run jobs in the foreground
bg: run jobs in the background
df: report file system usage
Useful options:
du: estimate file space usage
Useful options:
Reference
Notice
The text was updated successfully, but these errors were encountered: