Shell features: Command line expansion, variable assignment, and file hierarchy standard (history)

Source: Internet
Author: User

Bash saves a list of previously executed commands by default

The current shell's process is saved in the buffer

The commands in the buffer are saved in the file after the shell exits. Bash history

Use the up and down arrows to look over the previously executed commands


History

! Number: Executes the number in history command

!! : Previous command

! -Number: Indicates the countdown number command in the list of execution commands

Esc. : Executes the last argument of the last command

! String: Executes the last command in the list of commands that starts with string

-D: Delete the number record

-C: Clear History list

-A: Append the current session's command to the history list

Command history-related environment variables

Histsize: View the number of items that can be saved in the history command

Histfile: File Saved by history command

Histfilesize: Number of files that can be saved in a history file

Histcontrol: The generation mechanism of control command history

Ignoredups: Ignore record duplicate directories, successive repeat commands

Ignorespace: Commands that begin with a space are not recorded

Ignoreboth: Both of the above features


Files starting with. Are hidden files, using ls-a to view


Variables in the shell are assigned values:

Variable name = value

Note: variable names do not need to be preceded by the $ sign when assigning values

Variable names can only contain numbers, letters, and underscores, and cannot start with a number

Variable names are case-sensitive

Try to see the name and the meaning


FHS: File Hierarchy Standard

/bin stores executable binaries, commands that both ordinary users and administrators can execute

Commands that/sbin administrators can execute

Where the program that runs the normal function is stored

/usr/bin

/usr/sbin

Programs for storing third-party software

/usr/local/bin

/usr/local/sbin

/Boot Storage System bootloader: Kernel, Ramfs file, bootloader (GRUB)

/dev Device files

/etc configuration file

/etc/sysconfig: System-level applications

/ETC/INIT.D: System service Script

/home user, by default there is a directory with the same name as the user's family directory.

/root Administrator's Home directory

/lib,/lib64 library file

/media dedicated mount location, typically used to mount portable devices

/mnt dedicated stubble position for mounting additional storage devices

/misc Miscellaneous, Alternate directory

/opt optional directory, typically used to install third-party software

The files displayed by/proc are not files, pseudo-file systems, kernel parameter mappings in operation

/sys pseudo file system, system level for configuring hardware device-related parameters

/SRV provides the data storage location for the service.

/tmp Temporary file system, 30 days default storage

/usr shared all systems that follow the protocol can use readonly read-only

/usr/include Header File storage location

/var frequently changing documents

/var/log

/var/lock

/var/run

/var/cache


Shell features: Command line expansion, variable assignment, and file hierarchy standard (history)

Related Article

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.