s unix socket (unix sockets are much faster than communication over ip interface)
c character device (terminal)
b block device (like a terminal but receives blocks)
f named pipeline (created by mkfifo)
$ touch file.txt
$ mkdir tmp
$ ls -la | grep -E "file|tmp"-rw-r--r-- 1 bard bard 0 Jan 16 09:50 file.txt
drwxr-xr-x 2 bard bard 4096 Jan 16 09:55 tmp
file type
owner
group
others
-
rw-
r--
r--
d
rwx
r-x
r-x
file type - means that is a regular file
rw- - file can be read/written by owner
r-- - file can be read group
r-- - file can be read by other system users
file type d means that is a directory (more file types could be found above
in section UNIX file types)
rwx - directory can be read/written/executed by owner (by executed it means
that owner can list files or enter to a directory)
r-x - directory can be read/executed
everything is a file
Outputs & inputs (aka file descriptors)
0 - stdin
1 - stdout
2 - stderr
> - other
created every time a program needs to interact with files
They are split, user can redirect them to different outputs (other streams, files, sockets).
2>&1 redirects a standard error to a standard output so they appear together and can be jointly redirected to an output.
NOTE2>1 redirects a standard error to a file called 1NOTEls > /dev/null 2>&1 or unknowncommand > /dev/null 2>&1 means that no outputs are printed on terminal
Useful commands
0 questions
0 katas
Basic commands for everyday use.
Learn
Please read the manual (at least description) for each command
You can use documentation during the interview
If you get command not found, try to install it with brew or apt or any other package manager.
NOTE just explore a command - please do not learn all possible options
NOTE during testing please be careful with using rm* commands