Linux_Course
Commands
ls
1 |
|
“-a” shows some hidden directories or files.
“-l” shows more information.
“-h” shows the filesize which should be used with “-h”.
cd pwd
1 |
|
“cd” change directory
“pwd” print work directory
mkdir
1 |
|
Make directory
“-p” can create directory-chain
touch
1 |
|
cp mv rm
copy move remove
1 |
|
““ refers to wildcard
e.g.:”test“ can represent test1 test2 test3
which find
1 |
|
grep wc Pipeline|
global regular expression print, Word count
1 |
|
“left | right” left output is the input of right.
echo `` > >> tail
1 |
|
root
su
switch user
1 |
|
sudo
switch user do
the user who verified can sudo
1 |
|
usergroup
1 |
|
ls -l description
e.g.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|
d | rwx | rwx | r-x | 4 | xx | xx | 4096 | Feb 2 19:07 | Desktop |
Field 1- for File, d for Directory, l for Link
Field 2,3,4 Those are permissions that means read, write and execute, and comes in three different fields that belongs to the permission the:
- second: The owner has over the file
- third: The group has over the file
- fourth: Everybody else has over the file
Field 5 This field specifies the number of links or directories inside this directory.
Field 6 The user that owns the file, or directory.
Field 7 The group that file belongs to, and any user in that group will have the permissions given in the third field over that file.
Field 8 The size in bytes, you may modify this by using the -h option together with -l this will have the output in k,M,G for a better understanding.