"background task" and "foreground task" is one: whether to inherit standard input. Therefore, the user can also enter other commands while performing background tasks.third, Sighup signalDoes a process become a daemon after it becomes a "background task"? Or, after the user exits the session, does the background task continue to execute?This is how the Linux system is designed.
User prepares to exit session
The system emits a SIGHUP signal to the session
Session sends Sighup signal
Tags: declare meaning unset status array variable action class output1. Variable assignment:NAME=LBG equals sign cannot have spaces name= "Lebron James" variable values have spaces in double quotes Echo ${name} with ${} More insurance shopt-s-O Nou Nset setting "Declare and use first"2. Cancel the variable:unset releasing memory for variables and functions3. Position parameters:${N}: Input nth parameter ($ = script name) $#: number of input parameters
, declare, dirs, Disown, Echo, enable, Eval, exec, exit, export, FC, FG,Getopts, hash, help, history, jobs, kill, let, local, logout, popd, printf,pushd, PWD, read, ReadOnly, return, set, shift, shopt, source, suspend, test,Times, trap, type, typeset, Ulimit, Umask, Unalias, unset, waitThe second type: Compound CommandsFor example, if while and so onSee Mans BashThe third type: function[[Email protected] ~]# function CD () {echo ' my function CD ';}Wh
variables:3|1. Export Path=file path: $PATH (temporarily valid, expired after reboot)4|2. Modify the. bashrc file in the user's home directory, and at the end add the environment variables that you want to add. You also need to execute the source when you are finished adding the BASHRC command to make the environment variable effective 5|(for one user)6|3. Modify the global environment variables in the/etc/Add the required environment variables at the end of the profile file. 7|(for all users)8
[[emailprotected]xx]#lsfile1file10file2file3 file4file5file6file7file8file9[[email protected]xx]#rsync-az--delete--exclude "File10" /null//xx /[[emailprotected]xx]#lsfile10 old boy Teacher Reviews: This method for icing on the cake, add sub-item! Method Three: Open Bash's extglob function (the function is to use rm! ( *jpg) Such a way to delete files that do not include the number of files) [[emailprotected]xx]#shopt-sextglob[[email protected]xx]#lsfi
Variable name: Use English, Numbers and _ (underscore), the beginning can not be a number, length unlimited, strictly case-sensitiveVariable settings: variable name = variable ValueNote: No spaces on both sides of the equals signYou can enclose the value of a variable in single or double quotation marks.All Chinese symbols (including single and double quotes in Chinese) are not supportedCommand output can be obtained using the reverse single quotation mark (above the TAB key) ' Command ' or $ (c
file
# Enable programmable completion features (you don ' t need to enable# This, if it ' s already enabled IN/ETC/BASH.BASHRC And/etc/profile# SOURCES/ETC/BASH.BASHRC).If [-f/etc/bash_completion] ! Shopt-oq POSIX; Then. /etc/bash_completionFiAlias op7688= ' cd/home/linux/svn0825/develop/openwrt-3.10.14 '
Let the settings op7688 effective
[Email protected]:~$ Source ~/.BASHRC
View al
(1) -list directory Contentsls (1p) -List directory Contents[[email Protected] ~]# Whatis CDCD (1p) -Change the working DIRECTORYCD [Builtins] (1) -Bash built-in commands, See Bash (1)4. HelpSee Help for the Shell's built-in instructions, such as our CD is a bash built-in instruction[[Email protected] ~]# CD--HELPBASH:CD:--: Invalid OPTIONCD:USAGE:CD [-l|-p] [dir][[email protected] ~]# help CDCD:C d [-l|-p] [dir] Change the curre
:
# . /etc/bash_completion
You can also cancel/ETC/BASH.BASHRC (for the Ubuntu Linux 13.04 system), so that you don't have to execute the above command
The code is as follows:
Enable bash completion in interactive shells
if! Shopt-oq POSIX; Then
if [-f/usr/share/bash-completion/bash_completion]; Then
. /usr/share/bash-completion/bash_completion
elif [-f/etc/bash_completion]; Then
. /etc/bash_completion
Fi
Fi
If you don't find the code and
command completion function work in your terminal , you only need to perform/etc/bash_completion as follows:#. /etc/bash_completionYou can also cancel the comments in the/ETC/BASH.BASHRC (from Ubuntu Linux 13.04 system), so that you don't need to execute the above command:# # # Enable bash completion in interactive shells if!Shopt-oq POSIX;Then if [-f/usr/share/bash-completion/bash_completion];Then./usr/share/bash-completion/bash_completion elif [-f/
pattern-matching operators need to be recognized. In the following description, "Pattern-list" is one or more patterns with the "|" A delimited list. The composite mode can be constructed using one or more of the following sub-modes:? (pattern-list)Match the given pattern 0 or one time* (Pattern-list)Matches the given pattern 0 or more times+ (Pattern-list)Match the given mode one or more occurrences@ (pattern-list)Match exactly one of the given patternsThe following pattern matching operators
1. View the Help information for a commandMans mkdir2. View the Help information for the service configuration fileMans Services DescriptionA. If no man is installed by Yum install ManB. If the command and service have the same name, specify clearly1.Linux through Whereis xxx can see the command and Help document address of XXX2. Help document if it is xxx.1.gz then xxx for the command3. Help document if it is xxx.5.gz then xxx for service4. When using man at this time can be added 1 or 5来 desig
Today found a system to detect the integrity of the shell script, I tried it can be, introduced to everyone.System: CentOS 5.xScript content:
Copy Code code as follows:
Cat my_filecheck.sh
#!/bin/bash
#
# variable first declared to use
Shopt-s-O Nounset
# statement
# Build Date
date=$ (date + '%y%m%d%h%m%s ')
# Join the approved directory #
Dirs= "/bin/sbin/usr/bin/usr/sbin/lib/usr/local/sbin/usr/local/bin/usr/local/lib"
Optimize content:
(1. Set history history
(2. Add ordinary users, set sudo permissions
(3. Prevent root remote user from logging in
(4. Modify Remote port
(5. Streamlined boot server
(6. Close SELinux
(7. Configure Iptables
(8. Modify the maximum number of connections Ulimit
(9. Disable the use of the Ctrl+alt+del shortcut key to restart the server
(10. Modify default DNS
(11. Install necessary software, update yum source [Epel Source]
(12. Update the kernel and software to the latest version
(1
Tags: environment inf div using ls-l delete pictures etc TTYDelete IssueInstall Kalilinux When you use a normal user, pressing the BACKSPACE key does not implement the delete function.There are two ways to solve this problem.A change of shortcut keys:Use the Ctrl+backspace key combination to implement the DELETE function Ctrl + BACKSPACESecond, change the environment variable (execute the following command):$ Stty Erase ^hTAB Completion/ARROW key failure problemThe command completion function ca
contains the following:/tmp/dir4/tmp/dir3/tmp/dir2/tmp/dir1The last directory to be pressed will be at the top of the stack. When you execute "popd", the system jumps to the top of the stack and clears it from the stack. As shown above, the last press on the stack is/tmp/dir4, so when a popd is performed, it jumps to the/tmp/dir4 directory and removes it from the stack at the same time. As shown below: pwd/tmp/dir4[Note: After executing the popd command, the directory stack includes the followi
Man CD---cannot be queried, so it prompts Bash's built-in commands. Alias BG bind break builtin Caller CD command Compgen complete compopt continue declare dirs disown echo enable eval exec Exit export false FC FG Getopts hash help history jobs kill let local logout mapfile popd printf pushd pwd Read ReadOnly r Eturn Set shift shopt source suspend test times trap True Type typeset ulimit umask unalias unset wait - bash Built-in commands See Bash (
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.