The first operation of the new Linux+python high-end operation and Maintenance class

Source: Internet
Author: User
Tags arch linux linux mint

1. List Linux distributions by series and describe the connection and difference between different distributions.

    1. Based on Red Hat

      Includes red Hat Enterprise Linux, Fedora, CentOS, Scientific Linux, and Oracle Linux

    2. Based on Debian

      Includes Debian, Ubuntu, Linux Mint, Knoppix, MEPIS, Sidux, CrunchBang Linux, Chromium os, Google Chrome OS

    3. Based on Mandriva

      Includes Mandriva Linux, PCLinuxOS, Unity Linux, and Mageia

    4. Based on Gentoo

      Includes Gentoo Linux, Sabayon Linux, Calculate Linux, and Funtoo Linux

    5. Based on Slackware

      including Slackware, Zenwalk and VectorLinux

    6. Other

SUSE, Arch Linux, Puppy Linux, Damn Small Linux, MeeGo, Slitaz, Tizen, Startos


2, description of the use of the command on the Linux system format, details Ifconfig, Echo, TTY, STARTX, export, pwd, history, shutdown, Poweroff, reboot, Hwclock, the use of the date command , and is elaborated in conjunction with the corresponding example.

Format: command [options][arguments]

Command commands

Options option, optional,-short option,--long option

Arguments parameters, optional

Ifconfig displaying or configuring network devices

echo displays a line of text or a string in a standard output or file

TTY display terminal connection file name of standard input device

StartX start x Window

Export setting or displaying environment variables

PWD View current working directory

Histroy Show Run command history

Shutdown the shutdown program, and transmits messages to all users in the process of execution before shutting down the computer

Poweroff immediately shut down the system

Reboot restart your computer

Hwclock display and set hardware clock

Date Displays or sets the day and time of the system


3, how to get the Help information of the command on the Linux system, please detailed list, and describe how the chapters of the man document are divided.

    1. Help command

      For internal commands

    2. Command--help

      For external commands

    3. Mans command

      Show the man page of the command

    4. Info command

      Displays the info entry for the command

    5. Program Self Help Documentation

      README, INSTALL, ChangeLog

    6. Program official documentation

      Documentation

    7. Official documentation for the release version

    8. Google, baidu.com


section of the man document:

    1. Commands or executables that a user can manipulate in a shell environment

    2. Functions and tools that can be called by the system kernel

    3. Some common functions and libraries, most of which are C libraries

    4. Description of the device file, usually files in/dev

    5. The configuration file or the format of some files

    6. Game

    7. conventions and agreements, etc.

    8. Administrative commands available to system administrators

    9. Documents related to Kernel


4. What are the file management commands on Linux, their commonly used methods and their related examples?

CP Copy files and directories

MV Move or rename files and directories

mkdir Creating a Directory

RM Remove files and directories

LN creates a hard link or symbolic link


5. Bash's work characteristics the command execution status return value and command line expansion are involved in the content and its sample demonstration.

Linux command execution results have both success and failure states
Variable $? Saves the execution status result of the most recent command
Command echo $? To view the command execution status return value:
0: Success
1-255: Failure


~: Expand to the user's home directory
~username: Expand the home directory for the development user
{}: You can host a comma-delimited list and expand it to multiple paths.


6. Use the command line expansion function to complete the following exercises:

(1), create/tmp directory: A_c, A_d, B_c, B_d

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/67/wKiom1hNGt2zLJ2MAAAhomGcmBA967.png-wh_500x0-wm_3 -wmp_4-s_2715543940.png "title=" 1.PNG "alt=" Wkiom1hngt2zlj2maaahomgcmba967.png-wh_50 "/>

(2), create the/tmp/mylinux directory:

mylinux/

├──bin

├──boot

│└──grub

├──dev

├──etc

│├──rc.d

││└──init.d

│└──sysconfig

│└──network-scripts

├──lib

│└──modules

├──lib64

├──proc

├──sbin

├──sys

├──tmp

├──usr

│└──local

│├──bin

│└──sbin

└──var

├──lock

├──log

└──run

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8B/67/wKiom1hNHWDhQrcBAACWkYo0ZNA949.png-wh_500x0-wm_3 -wmp_4-s_3900928612.png "title=" 2.PNG "alt=" Wkiom1hnhwdhqrcbaacwkyo0zna949.png-wh_50 "/>

7, what is the metadata information of the file, what does it mean, how to view it? How to modify timestamp information for a file.

Stat/path/to/somefile getting the metadata for the specified file

Touch-a only Modify access time

Touch-c only the time when the file was modified and does not create a new file if the file does not exist

Touch-m only modify the file modification time

Touch-t STAMP uses the specified time value as the new value for the file timestamp


8. Display all files or directories in the/var directory that start with L, end with a lowercase letter, and have at least one digit (can have other characters) appear in the middle.

ls-d/var/l*[0-9]*[[:lower:]]


9. Displays files or directories that start with any number in the/etc directory and end with a non-numeric number.

ls-d/etc/[[:d igital:]]*[^[:d igital:]]


10, Show/etc directory, start with a non-letter, followed by a letter and any other arbitrary length of any character file or directory.

Ls-d/etc/[^a-z]*[a-z]


11. In the/tmp directory, create a file that starts with Tfile, followed by the current date and time, with a filename such as: tfile-2016-09-20-09-32-22.

touch/tmp/tfile-$ (date+ "%y-%m-%d-%h-%m-%s")


12. Copy all files or directories ending with. D in the/etc directory into the/tmp/mytest2 directory.

Cp-ar/etc/*.d/tmp/mytest2


13. Copy all files in the/etc/directory that begin with L or M or N and end with. conf to the/TMP/MYTEST3 directory.

Cp-ar/etc/[l,m,n]*.conf/tmp/mytest3


New Linux+python high-end operation class first time assignment

Related Article

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.