Linux face Questions (3)

Source: Internet
Author: User

First, the topic

(1) Use Iptables to write out only 22 ports that allow 10.1.8.129 access to this server
(2) Query 1.txt add a line before line seventh, the content is "ABC"
(3) Print out the 6th to 10th line of the 1.txt file
(4) Transfer files larger than 100k in the/usr/local/test directory to the/tmp directory
(5) Print out 1.txt 1th to 3rd column
(6) How to forward the local 80 port request to 8080 port, the current host IP is 192.168.2.18
(7) Write a crontab statement that executes the/usr/bin/waks.day.sh once every morning at 3.
(8) Write a crontab statement that executes a/usr/bin/baks_week.sh every Sunday morning at 4.
(9) How Apache achieves load balancing
(10) How to tell if the file is empty

Second, the answer

(1) iptables-i input-s 10.1.8.179-p tcp--dport 22-j ACCEPT
(2) sed-i ' 7 i\abc ' 1.txt
(3) sed-n ' 6,10 ' P 1.txt
(4) Find-type f-size +100k/usr/local/test-exec mv {}/tmp/\;
(5) Awk-f ': ' {print $1,$2,$3} ' 1.txt
(6) Iptables-t nat-i prerouting-d 192.168.2.18-p tcp--dport 80-j DNAT--to 127.0.0.1:8080
(7) 0 3 * * */bin/bash/usr/bin/waks.day.sh
(8) 0 4 * * 7/bin/bash/usr/bin/baks_week.sh
(9) Multiple machines run Apache, then one of the running Nginx, let Nginx agent more than one Apache to achieve load balancing
(10) [! -S filename]

Linux face Questions (3)

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.