In the previous. Net encryption principle, the implementation of the method body's encrypted information ing describes the basic problems to achieve the encryption shell,This article introduces how to implement an encrypted shell kernel of the pure
1. login and logout
Tty1 ~ is enabled by default in Linux ~ Seven tty7 terminal interfaces, 1-6 text terminals and 7 graphics Terminals
Use CTRL + ALT + F1 to switch
Remote login: Method 1: SSH-l account host name or IP address
Method 2: SSH
Shell can be extended, shell ExtensionProgramThe following functions can be implemented.
◇ Specific file type, all file types, network neighbors, recycle bin, drive, network shared folder, printer, disc drive, directory, folder background (
Wandering on the Cu, you can see a person's personal signature
:() {:|:Echo 'ten people | day 1 | ten dozen o' | SED's/.../& \ n/G' #
Haha, I tried it on my own machine. See all the posts I 've mentioned.CrashNow (Linux is probably used), there
1. ChildProgramOnly the environment variables of the parent program will be inherited, And the subroutine will not inheritDefinitionVariable.
Custom variables: declare them as environment variables through export
Convert environment variables to
Parentheses
The parentheses structure can force the command to run in the sub-shell. Its basic format is:
(
Command 1
Command 2
...
Command n
)
The N commands in parentheses are run in the sub-shell. After bash version 3, the internal
1. Description
/Sbin/ldconfig-configure dynamic linker Run-Time Bindings
Ldconfig Option
2. Option
1)-P: indicates that ldconfig prints the names of all the shared libraries saved in the current cache file.
2)-V: ldconfig displays the
1. Tail-output the last part of Files
Tail [Option] [+/-num]... [file]...
2. Option
①-F,: Output appended data as the file grows;
②-S,: With-F, sleep for S seconds (default 1.0) between iterations.
③-N,: output the last n lines, instead of
1. FTP automatically logs in to batch download files.
##### From/home/data on the FTP server to the local/home/databackup #####! /Bin/bashFTP-n Open 192.168.1.171User guest 123456.BinaryCD/home/DataLCD/home/databackupPromptMget *CloseBye!2. FTP
Http://rimuhosting.com/howto/profile.jsp
Linux Shell environment setup using/etc/profile. d /*
When a user logs in, environment variables are set from various places. That between des:
/Etc/profile (for all users ).
Then all the
## Check the PID of such program#Checkpid (){If [-z "'ps X | grep $1 | grep-V grep | grep-V $0 | awk '{print $1}'' "]; thenEcho "the $1 program cant run well ."Fi}
Simple Description:
PS reportProgramStatus.
Ps x shows all programs,
1. Count the total number of rows of all common files in a directory
# Practical scenarios: when designing a graduation project, you need to calculate your ownCodeNumber of rows #
Solution 1:Find.-Type F-name"*. C"-Exec cat {}\; | grep-V'^ $'|
Replace file1 with the actual file as follows
1. query the row number of the empty row in file1.Grep-n "^ $" stl_stable_sort.ccRefer:Common grep commands
2. query the rows ending with ABC in file1.Grep-n "^. * ABC $"
Before scripts runs, the most feared problem is the syntax error! So how can we debug it? Is there a way to determine whether there is a problem without directly running the scripts? Haha! Of course! Let's take the bash-related parameters for
1. Description
Report a snapshot of the current processes.
PS [Options]
2. Common options
①L long format output;
②U displays processes in the username and start time order;
③J. display processes in the task format;
④F process is
7. grep family:1. grep exit status:0: indicates successful;1: The matching pattern cannot be found in the provided file;2: The file provided in the parameter does not exist.See the following example:/> Grep 'root'/etc/passwdRoot: x: 0: 0:
When accessing the ps1 file, be sure to check whether the access path contains spaces.
Spaces must be enclosed in single quotes.
PowerShell-command Set-ExecutionPolicy "Bypass" set filepath = '% CD % \ AppDeployment. ps1 'powershell-command "& %
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