Linux | tar, bc, uname commands
Article directory
tar command【Important】
tar [-cxtzjvf] files and directories... Parameters:
- -c: Parameter command to create a compressed file (meaning create);
- -x: Parameter command to unpack a compressed file!
- -t: View the files in tarfile!
- -z: Does it also have the attributes of gzip? That is, do I need to use gzip compression?
- -j: Does it also have the attributes of bzip2? That is, do I need to use bzip2 compression?
- -v: Display files during compression! This is commonly used, but it is not recommended to be used in background execution processes!
- -f: Use the file name. Please note that the file name must be followed immediately after f! Don't add any more parameters!
- -C: Extract to the specified directory
- According to the above options we start using
tar -cvzf test.tgz 111
- These four options are compression, which are more commonly used.
- There are also 4 options for decompression
tar -xzvf test.tgz -C 222
- Here
-C
is the specified path~~
There are many options for tar here, so I won’t introduce them one by one here. There are only a few commonly used ones. Just look them up when you need to use them, and then slowly remember them~~
bc instruction
The bc command can easily perform various operations
- There is nothing to say about this command. Just enter it directly. Press
ctrl + d
to exit~~
uname -r command
uname -r
Syntax: uname [option]
Function: uname is used to obtain information about the computer and operating system information.
Additional explanation: uname can display basic information such as the version of the operating system used by the Linux host and the name of the hardware.
Common options: -a or –all output all information in detail, followed by kernel name, host name, kernel version number, kernel version, hardware name, processing Device type, hardware platform type, operating system name
- This command is also very simple, that is, you can use it directly. You can just check the version when needed~~