Linux Command Notes

# help about any code
>command_name –help
or
>man command_name

# listing folders and documents in a directory with permissions
>ls -l

# searching for a name
>grep 100 // find 100

# pipe = to use the output of a code as another’s input
>ls -l | grep 100 // list the names of folders and documents, and find 100
or
>cat file.pdf | grep 100 // show the file.pdf and then find 100 in it


# changing the permissions of a document or folder
Note: write=4, read=2, execute=1, (wrx)(wrx)(wrx)  => 777
>chmod u+wrx file.pdf or chmod 700 file.pdf // u is for owner
>chmod g+wrx file.pdf or chmod 70 file.pdf // g is for group
>chmod o+wrx file.pdf or chmod 7 file.pdf   // o is for user
- for simply make executable
>chmod +x install.sh

Comments