To give you illustrator software users to detailed analysis to share the creation of exquisite shell texture tutorial.
Tutorial Sharing:
Well, the above information is small make up to you illustrator of
But shell scripts are readable and writable, and are likely to reveal sensitive information, such as user name, password, path, IP, and so on.
Similarly, sensitive information is leaked when the shell script is run.
SHC is a tool for encrypting
Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the
The way to get timestamps in the shell is: date-d "$currentTime" +%s
If you want to convert a date to a timestamp, you would do the following:
1. Get the current time
Currenttime= ' Date ' +%y-%m-%d%h:%m:%s '
2. Convert date to time stamp
The original script:
The code is as follows
Copy Code
#!/bin/bashFile= "/root/newfile/"List= "/root/sqlbak"Ls-l $list/|awk ' {print $} ' |while read lineTodoCp-r $list/$line $fileDone
Modified script:
Script content:
The code is as follows
Copy Code
VI iptables-reset.sh#!/bin/bash#Powered by blog.slogra.comport= ' Iptables-vl|grep Ssh|awk ' {split ($NF, A, ":");p rint a[2]} ' |wc-l 'if [$port = 1];thenecho
The IF statement in the shell needs to make a regular judgment and check the grammatical records.
The code is as follows
Copy Code
Datepattern= "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$"if [["$STARTDATE" =~ $DATEPATTERN]] && [[
When you download the SVN code on a Linux server and sync it to a web directory, you'll need to clean up the folder and add a little security to your safety.Script content:del_svn.sh
The code is as follows
Copy Code
Variable Description:$$The shell itself PID (ProcessID)$!The PID of the Shell's last running background process$?End code of the last command to run (return value)$-Flag list using the SET command$*A list of all parameters. Output all parameters in
Renamed a Web project, and then modified the Apache configuration to a new directory restart, the following error message appears:
Shell-init:error Retrieving current Directory:getcwd:cannot access parent directories:no such file or directory
Variable
Get the native host name
#hostname
Get the system version number
#uname-R
Get CPU Type
Get the CPU working frequency
Cat/proc/cpuinfo
Get Memory
The most common source package downloaded from the network is. tar.gz package, and part of the. tar.bz2 Package
To decompress is simple:
. tar.gz Format Decompression command for TAR-ZXVPF xx.tar.gz. tar.bz2 Format Decompression command for
Problem Description:
CentOS A new user, log in after the information of the shell script is as follows:
Linux CentOS Shell display-bash-4.1$ does not display the user name path solution
Ps: If you mistakenly delete files in the user directory, it
At work, you sometimes need to compare whether the files are consistent. You can use the following script (relatively simple): share it and hope to help friends who have the same requirements ~ The code is as follows:Copy code #! /Bin/bash#
Nginx service startup script The code is as follows:Copy code #! /Bin/sh# Chkconfig: 2345 55 25# Description: Startup script for nginx webserver on Debian. Place in/etc/init. d and# Run 'UPDATE-rc. d-f nginx defaults', or use the appropriate
Linux prohibits root users from logging on through sshRoot users are prohibited from logging on through ssh by operating the sshd_config configuration file.1. Open the ssh configuration fileVim/etc/ssh/sshd_config2. Find the following line of text
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.