It is a weired book that it has no the part one but part two.
Yes, very basic, if you can't master all of them, please don't get forward. Read it again and again until you can do every example without the book.
No, it is not beyong the basics, it is still basic knowledge. Read it again and agian. This is my tricky to learn programming.
haha, wolderful thing begins here.
......
Need more practice over these commands.
There are a lot of interesting topics in this part. I read all of them and understand them. But I think I can't remeber them clearlly in the future.
LOGFILE=logfile.txt
exec 6>&1 #Make file descriptor 6 point to standard output.
exec > $LOGFILE # Make the standard output point to $LOGFILE, this command is default to exec 1> $LOGFILE
#Output any things, for example, echo "hello", the output goes $LOGFILE
exec 1>&6 6>&- # Recover the standard output and close the file descriptor 6
The /dev directory contains entries for the physical devices that may or may not be present in the hardware.
The /proc directory is actually a pseudo-filesystem. The files in /proc mirror currently running system and
kernel processes and contain information and statistics about them. It is a snapshot of the OS.
Think of /dev/null as a black hole. It is essentially the equivalent of a write-only file. Everything written to it disappears. Attempts to read or output from it result in nothing. All the same,/dev/null can be quite useful from both the command line and in scripts.
Like /dev/null, /dev/zero is a pseudo-device file, but it actually produces a stream of nulls(binary zeros, not the ASCII kind). Output written to /dev/zero disappears, and it is fairly difficult to actually read the nulls emitted there, though it can be done with od or a hex editor. The chief use of /dev/zero is creating an initialized dummy file of predetermined length intended as a temporary swap file.