Linux Review Notes 1__linux

Source: Internet
Author: User
Tags bz2
1.Linux strictly case-sensitive 2.Linux all content is saved in file format, including hardware 3.Linux file type is not dependent on extension
Compressed package *gz, *.bz2,*.tar.bz2, *.tgz, etc.
Binary package: ". RPM"
Script file "*.sh"
Configuration file "*.conf"

partitions each block size is 4k
Hard links: 1. Have the same I node and storage block blocks, can be considered as the same file 2. Can be identified by the I node 3. Cannot cross partition 4. Cannot be used for directory use
Soft connection: 1. Similar to WinDOS shortcuts 2. Soft connections have their own I nodes and block blocks, but the data block only save the original file name and I node number, and there is no actual data 4. Fix any one, another change 5. Delete the original file and the soft connection cannot be used Do soft connection original file must write absolute path.
Linux File Search commandLocate search speed block, in the background database search/var/lib/mlocate frequency is once a day (can be forced to update with UpdateDB), the disadvantage can only search the file name
Command Search command (command for search commands) Whereis the location of the query command and the location of the Help document which query LS alias Linux command is through the $path variable path, to find the command
Find search Scope search criteria
Find/root-nonuser search for files without users find/root-mtime-ctime-atime find/root-size k| M
grep searches in a file
-exec {} \ Search results
man-f command, view command help level Info ls view command help document
Compress related CommandsZip compressed file name source file zip-r compressed file name source directory unzip uncompressed
Gzip source files compressed into. GZ compressed files, the source files will disappear gzip-c source files > Compressed files compressed to. gz format, source file retention such as gzip-c Cangls > cangls.gz gzip-r Directory compression directory , but cannot compress the directory. GZ format uncompressed gzip-d compressed file gunzip compressed file
. bz2 format compression bzip2 source files do not keep source files bzip2-k longzls compression Keep source files
TAR-CVF packaged file name source file Package command options:-C: Package-V: Show procedure-F: Specifies the name of the packaged file a directory or file is packaged into One tar, easy to compress.
TAR-ZCVF compression package name. tar.gz Source file-Z: Compressed to. tar.gz format TAR-ZXVF uncompressed. tar.gz format
TAR-JCVF compressed to. tar.bz2 format
TAR-JXVF decompression. tar.bz2 format
Mount Command: Assign a letter so that peripherals can connect to the file system

Mount CD: 1 Mkdir/mnt/cdrom 2) mount/dev/sr0/mnt/cdrom mount U disk fdisk-l view U disk device file name Mount-t VFAT Dev/sdb1/mnt/usb
Shell ScriptTwo ways to execute a script bash ***.sh directly execute///chmod 755 ***.sh with bash scripts
Output redirection: > Overwrite >> append 2 indicates error 1 for correct output
Command > file 2>&1 the correct output and error output to the same folder in a overwritten manner

Pipe character: Command 1 | Command 2 command 1 as input to command 2 use example netstat-an| grep "established"



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.