Recently, I have adopted a Linux operating system in the construction of campus network application platform to provide campus network users with DNS, Apache, POP3, SMTP, FTP and other services. Since the number of students in our school is more
Print "YY/MM/dd hh: mm: SS" at a row or a location"
First determine the location
Output again
Note: The time format is incorrect. % Y: % B: % d % H: % m: % s
Locate and cursor to problems:
Tput Cup 10 10
Tput SC, tput RC, tput CIVIS, tput
I have written a git usage and advanced practice article, which explains many basic git usage, including creating a repository and troubleshooting some errors.
I often create a git repository on a local home host/Server. A git repository is required
1. First, cut Apache logs by day
VI/etc/httpd/CONF/httpd. confErrorlog "| rotatelogs/var/log/httpd/% Y % m % derror_log 86400 480 ″Customlog "| rotatelogs/var/log/httpd/% Y % m % daccess_log 86400 480" combined
Ii. Restart Apache server
Service
[[Email protected] ~] $ PS-Ef | grep initRoot 1 0 0 apr24? 00:08:25 init [3]
[[Email protected] ~] $ PS-Ef | head-N 1Uid pid ppid C stime tty time cmd
The second and third columns are the current process ID and parent process ID.
P1: process 0
File Type:
-F: determines whether the file is a common file.-D: determines whether the directory is used.
-B: determines whether a device file is a block.-C: determines whether a device file is a dual-character device file.-S: Determine whether the
I. Requirements
It is often difficult to enter a password for different linux machines, such as ssh Login or scp file copying. You can generate a public key through ssh-keygen, establish a trusted channel between the two machines.II. Environment
I. Requirements
It is often difficult to enter a password for different linux machines, such as ssh Login or scp file copying. You can generate a public key through ssh-keygen, establish a trusted channel between the two machines.II. Environment
Variable type
I always thought that the bash shell variables are non-typed and can also be specified.
Administrator@DADI ~$ declare -i num=10Administrator@DADI ~$ echo $num10Administrator@DADI ~$ num='iamaint'Administrator@DADI ~$ echo $num0
After
1. $0, $1, $2, and so on: the location parameter is passed to the script from the command line, to the function, or to a variable.
The following is an example to illustrate what these three parameters are and give readers a perceptual knowledge.
1)
For is an important loop statement in shell programming:
Syntax 1:
For variable in list
Do
Action
.....
Done
List:
① 'Seq 1 10' #1-10
② {1 .. 10 }## 1-10
③/Etc/rc. d/rc3.d/K * # All files starting with K in the directory will be cycled once.
④
While Syntax:
While [condition]
Do
Command
........
Done
Special while usage:
① While true | while ;;
Do
Done ---------------------- endless loop
② While read line_value
Do
Done
Exercise:
Use the while statement to capture bash
Preface * with the development of the entire Internet, there have been countless websites, large and small. As a result, users are increasingly enhancing their website UI and speed experience. For enterprises or individuals, winning the user
Command-1 & command-2 & command-3 & command-4 &... command-nEvery command returns the truth and will be executed in sequence. When a command returns false, the command chain will be broken.The last one is false. It will be the last command to be
LINENO
The row number of the script or shell function currently being executed.
LINES
The select command is used to determine the width of the selected columns. After receiving SIGWINCH, It is set automatically.
MACHTYPE
Is a string that
Shell programming (3) shell Syntax Functions
To define a shell function, we only need to write its name, then a pair of empty parentheses, and then put the related statements in a pair of curly braces, as shown below:
Function_name
Xp_cmdshell command shellThis process is an extended stored procedure used to execute a specified command string and return any output as a text line.Syntax:Xp_cmdshell command_string [, no_output]Command_string command string to be
I am a Shanghai Telecom ADSL Broadband User and use ZTE ADSL 831 MODEN to access the Internet.I am an old man and I don't want to know much about it technically. I just drew a gourd image. After two weeks of hard work, I initially set up my
1. Install the system patch of power shell V2.0 on the client. The patch number is KB968930, which includes winrm and powershell 2.0.
2. Set the view connection server to a trusted host of winrm:
Ps c: \ set-item wsman: \ localhost \ Client \
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