First week of Linux Foundation

Source: Internet
Author: User
Tags temporary file storage

first week of Linux Foundation
Format of the command
Command option (option) arguments (parameter) consists of three parts, which require a space interval
The Options option enables a feature of the command to change the function of the command
Arguments parameter change command action object
Short option multiple option combination ls-a-l=-al/-la
Long option itself command consists of multiple letters required--Example LS--help

Command prompt
#为管理员 $ for normal users
Useradd + user name (create user)
Su-user name (switch user)
Hostname (current host name)
~ Wavy line for current directory echo $PS 1 [\[email protected]\h \w]\$ \u for username \h for hostname previous section \h for full hostname \w current directory last section \w full directory $ current user rights

Order of precedence for command execution
Alias > Internal > External (Hash > PATH)
Alias view aliases (own settings) (alias precedence is called) > Internal command (Shell comes with) > External command (File system path corresponding program file (Hash>path))

Get help
Whatis database-based lookup commands
Advantages: Fast Search speed
Cons: A database that does not have a real-time need to re-collect new commands
CENTOS6:
Database storage location:/var/cache/man/whatis
Update Database: Makewhatis
CENTOS7:
Database storage location:/var/cache/man/index.db
Update Database: MANDB

Help Internal command Query helper pwd; Help and help; Help type.
External command help example LS--help; Ifconfig--help

Mans
1: User command
2: System call
3:C Library Call
4: Equipment files and special files
5: Configuration file format
6: Game
7: Miscellaneous
8: Commands for managing classes
[] Optional content
<> Required Content
A|b two Choose one
{} grouping
... The same content can appear multiple times
Name and brief description
Synopsis Usage Format Description
DESCRIPTION Detailed description
Options description
EXAMPLES Example
Files Related Documents
AUTHOR author
COPYRIGHT Version Information
REPORTING BUGS Bug Information
See ALSO other Help references

F: Flip one screen down
B: Turn up one screen
D: Flip down half screen
U: Flip up half screen
J: Turn down one line
K: Turn up one line
G: Skip to Homepage
G: Skip to Last

Search:
/keyword top-down n find n up
? keyword bottom-up n find n down
Man's configuration file
CENTOS6:/etc/man.conf
CENTOS7:/etc/man_db.conf
Man XXX Keywords
Man + chapter number +xxx directly into the selected chapters find
man-k keyword Blur Search
Man-f or Whatis exact search
Man-m/path Hello put the help file for hello to the configuration file centos6:/etc/man.conf centos7:/etc/man_db.conf
man-w keyword Prints the storage path of the man page

File system Structure
/boot: Boot file directory, kernel file (vmlinuz), boot loader (bootloader,grub) are stored in this directory
/bin: A basic command for all users, a program that is not associated to a separate partition, and that is used by OS startup
/sbin: The basic command of the management class, which cannot be associated to a separate partition, the program that is used by OS startup
/lib: Basic shared library files that the program relies on at startup and kernel module files (/lib/modules)
/LIB64: storage location for secondary shared library files dedicated to x86_64 systems
/etc: Configuration file directory
/home/username: Normal User home directory
/root: Administrator's home directory
/media: Portable mobile device mount point
/MNT: Temporary file system mount point
/dev: Device files and special file storage locations
B:block device, random access
C:character device, linear access
/OPT: Where to install third-party applications
/SRV: Data used by services running on the system
/tmp: Temporary file storage location
/usr:universalshared, read-only data
Bin: An application that ensures that the system has full functionality
Sbin
Lib:32 bit use
LIB64: Only 64-bit systems exist
Include:c header file for the program (header files)
Share: structured independent data, such as Doc, man, etc.
Local: Installation location for third-party applications
Bin, Sbin, Lib, lib64, etc, share
/var:variabledata files
Cache: The application caches the data directory
LIB: Application state information data
Local: Dedicated to storing variable data for applications under/usr/local;
Lock: Lock file
LOG: Logs directory and files
OPT: Dedicated to storing variable data for applications under/OPT;
Run: Process-related data in progress, typically used to store process PID files
Spool: Application Data Pool
TMP: Save temporary data generated between system two reboots
/proc: A virtual file system for outputting kernel-related process information
/sys: For outputting information about hardware devices on the current system virtual file system
/selinux:security Enhanced Linux, where information such as selinux-related security policies are stored

File type

    • : Normal file
    • D: Catalog file
      B: Block device
      C: Character device
      L: Symbolic Link file
      P: Piping File pipe
      S: Socket file socket

Absolute path vs. relative path
Absolute: path starting from the root
Relative: vs. Current path

Time stamp
Access Time (Atime): When a file is read, it is updated
Modify Time (Mtime): Data modification times, updated when the file's data is modified
Change Time (CTime): Metadata modified when the metadata (permissions, size, owner,group,mtime, etc.) of the file is updated
File name wildcard character
*: matches 0 or more arbitrary characters
?: matches any single character
0-9: Indicates any number
A-Z: denotes all letters, including case

First week of Linux Foundation

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.