Example of bash read and write files in Linux

#!/bin/bash#读取文件内容到变量中 Filecontent= ' Cat ~/file.txt ' is the TAB key on thatEcho $filecontent#取得文件内容的每一行 For Fileline in $filecontentTodoEcho $filelineDone#写内容到文件中 echo $filecontent >> test.txt Bash built-in UNIX command .: Executes the

The same server in Linux PhP2 version php5.3 and php5.4 coexistence of build notes

Should be a brother to help the demand to operate this, brother Server, a need for zend+php 5.4, a website needs 5.3, Before the brothers bought directly 2 servers, feeling too wasted money, so he set up, with the following build notes: Basically

Linux op-d common commands work notes

I bought an ECS, often toss, install some good fun software, tools. Configure the LNMP environment, run the website program, very interesting. Linux is often used, so it collects and collates some Linux server operation commands 1. Delete 0-byte

Linux Server Log Analysis command encyclopedia

Own small website runs in the Aliyun ECS above, occasionally also analyzes own website server log, looks at the website the amount of visits. See if there's any black-and-wide sabotage! So collect, organize some server log Analysis command, we can

Linux Server netstat command usage records

Regardless of our users choose VPS, server used to build stations, or used for project operation, and even the old Chiang often see a lot of even virtual host did not play the neat users also began to use VPS server to build the site. These users

Linux echo Command Introduction and-N,-e parameter detailed

The echo command is used to print the value of the shell variable in the shell, or to output the specified string directly. The echo command of Linux, which is very commonly used in shell programming, is often used when printing variable value in a

Installing VPN servers in Linux pptpd step tutorial

Environment: [Root@vpn_server network-scripts]# Cat/etc/redhat-release CentOS Release 6.6 (Final) [Root@vpn_server network-scripts]# Uname-m x86_64 Preparation: C64 RPM-IVH http://mirrors.aliyun.com/epel/6/x86_64/epel-release-6-8.noarch.rpm

Linux VPS Automatic Backup: Script upload FTP and rsync incremental backup

☆☆☆ Daily automatic backup site data and database upload ftp☆☆☆ This way, the main is a script (including compressed site data and database, upload), and then use the cron command every day in a specified period of time to run, see the

Key mode login for SFTP configuration in Linux system

Because the vsftp is transmitted in clear text, the username password can be obtained by grasping the packet, for the sake of security, it is necessary to use SFTP, lock the directory and not allow SFTP user to log to the server. Because SFTP uses

Inotify+rsync Real-time synchronization configuration tutorial in Linux

Background Our company is using Inotify+rsync to do real-time synchronization to solve the problem of distributed cluster file consistency. But when the Web files more and more (millions number of small files, such as html,jpg), synchronization is

The left-shift operation, the right shift operation, the bitwise negation operation of the built-in mathematical function of awk in Linux

In programming, one of the bitwise operator operators. In C + +, the shift operators have binocular shift operators:> (move right). An expression consisting of a shift operator also belongs to an arithmetic expression whose value is an arithmetic

Linux rpm command Parameters _unix Linux

The toolkit was first launched by Red Hat and later borrowed by other Linux developers. Because it saves a lot of time for Linux users, it is widely used to install and remove software under Linux. Here is a description of its specific use of the

How to view and modify file read and Write permissions under Linux system _unix Linux

Statement to view file permissions: In the terminal input: Ls-l xxx.xxx (xxx.xxx is file name) Then there will be similar messages, mostly these: -rw-rw-r-- A total of 10 digits Which: the front one-represents the type The middle one of the three rw-

Linux system xorg.conf files in detail _unix Linux

First look at a complete xorg.conf file, as follows: Copy Code code as follows: # /.../ # SaX generated X11 config file # Created on:2009-05-31t19:02:32+0800. # # version:8.1 # Contact:marcus Schaefer , 2005 # Contact:sax-user List

Linux Top command usage details _unix Linux

View multi-core CPU commandsMpstat-p All and sar-p all Description:sar-p all > Aaa.txt redirect output to file Aaa.txt The top command is often used to monitor Linux system conditions, such as CPU, memory use, the programmer basically know the

Deep analysis of the timing tasks under Linux _unix Linux

Before doing a scheduled task, check the current system time "date" +%y-%m-%d%T "" and Hardware Clock time "hwclock": [Root@localhost test]# Date "+%y-%m-%d%T"2013-07-01 07:57:52 [Root@localhost test]# HwclockJuly 01, 2013 Monday 07:57 48 sec -0.0

Linux Network Operations Related command Rollup _unix Linux

Linux operations-related command rollup GitHub address: Https://github.com/zhwj184/shell-work Copy Code code as follows: #/bin/sh #查看http请求的header Tcpdump-s 1024-l-a-n Host 192.168.9.56 Tcpdump-s 1024-l-A src 192.168.9.56 or DST 192.1

Linux File/directory permissions

File type permission belongs to the main group directory name/file nameDRWX------2 Alice girls 4096 September 11:33 AliceDRWX------2 Rose girls 4096 September 10:47 RoseDRWX------2 Tom boys 4096 September 10:43 TomFile type:-Normal file D directoryO

13 more useful tools for Linux operations

This article introduces several useful tools for Linux operations, hoping to help Linux administrators.1. View the process usage bandwidth-nethogsNethogs is a network traffic monitoring tool under a terminal that can visually display the bandwidth

Linux thread scheduling and priority setting

Reprint: http://blog.csdn.net/a_ran/article/details/43759729Three scheduling strategies for the Linux kernel:1,sched_other time-sharing scheduling strategy,2,sched_fifo Real-time scheduling strategy, first-come-first service. Runs continuously once

Total Pages: 5469 1 .... 315 316 317 318 319 .... 5469 Go to: GO

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.