10 of the python third-party Library Series-commands library, python-commandsWe are talking about using the commands module to execute Linux shell commands. When we use Python to write O M scripts, we often need to execute linux shell commands, the commands module in Python
Common Linux shell commands and shell commands
I. Basic commands
1. Shut down immediately and restart again. Execute the following command:
Shutdown-r now or reboot
2. Shut down immediately and execute the following command:
Shutdown-h now or poweroff
3. Wait for two minutes to shut down and restart again. Execute the following command:
Shutdown-r 2
4. Wait for 2
Linux commands-system management commands
I. Installation and logon commands
Login1. RoleLogin is used to log on to the system and has the permission to all users.2. Format
Login [name] [-p] [-h host name]3. Main Parameters
-P: notifies login to retain the current environment parameters. -H: used to transmit user names between remote logins.If you choose to log
Sed commands for file operations, sed commands for detailsFile Modification in a simple shell script in Linux1. Introduction to SedSed is an online editor that processes a row of content at a time. During processing, the currently processed rows are stored in the temporary buffer, called patternspace. Then, the sed command is used to process the content in the buffer. After processing, send the buffer conte
Linux commands-common file operation commands
Original works of Lin bingwen Evankaka. Reprinted please indicate the source http://blog.csdn.net/evankaka
Abstract: This article focuses on Linux commands-common file operation commands with examples
Ls
This command is often used to display the files in the current directo
, including TCP, UDP, ICMP and IP statistics, etc.
6. Detect ARP Bindings (dynamic and Static) list, show all connected to my computer, display the other IP and MAC address
Arp-a
7. On the proxy server side
Bundled IP and MAC addresses to address local area network misappropriation ip!:
Arp-s 192.168.10.59 00-50-ff-6c-08-75
Unbind the IP of the NIC from the MAC address:
ARP-D Network card IP
8. Hide your computer from a network neighbor (let others see you!)
NET config Server/hidden:yes
Yesterday, a person on the Bug-bash asked: why [--help did not output help information. Someone answered him because coreutils provided the [command to accept the--HELP option, and Bash's own [command does not accept any options.] When you execute [--help ] in Bash, of course the first priority is the internal command [, not the external command [, the execution of /usr/bin/[--help(on my Mac is/bin/[) to get the help information he wants.In fact, there are other external
Command name: ChownEnglish: Change file ownershipCommand path:/bin/chownSyntax: chown [user] [file or folder]Description of the function: Change the file or folder of the entire personExample: Chown Shenchao FengjieChange the file Fengjie the whole person is ShenchaoCommand name: CHGRPEnglish: Change file group ownershipCommand path:/BIN/CHGRPSyntax: chgrp [user] [file or folder]Function Description: Change the group to which the file or folder belongsExample: Chown lampbrother FengjieChange fil
if the compressed file is a very large case.Tar command-Function Description: File package and unpacking.-Command format: tar [parameters] -Common parameters:-F Name: Use name to specify the archive file name or device name.-V: Lists processing details.-C: Used to create a new archive file.-X: Restore the backup file from the archive file.-T: Used to list the file names in an archive file.-Z: Compress files or unzip with GNU Gzip.-Z: Compress files or unzip with compress.-j: Compress files or u
very large case.Tar command-Function Description: File package and unpacking.-Command format: tar [parameters] -Common parameters:-F Name: Use name to specify the archive file name or device name.-V: Lists processing details.-C: Used to create a new archive file.-X: Restore the backup file from the archive file.-T: Used to list the file names in an archive file.-Z: Compress files or unzip with GNU Gzip.-Z: Compress files or unzip with compress.-j: Compress files or unzip with bzip2.-use Example
Common CentOS commands and common centos commands
// Linux common command query link: http://linux.chinaitlab.com/special/linuxcom/
I. View cpu using common CentOS commands
More/proc/cpuinfo | grep "model name"Grep "model name"/proc/cpuinfo[Root @ localhost/] # grep "CPU"/proc/cpuinfoModel name: Intel (R) Pentium (R) Dual CPU E2180 @ 2.00 GHzModel name: Intel (R
Built-in and external commands in Linux
1. linux commands can be divided into internal commands and external commands:
Internal commands are transferred to the memory at system startup, Which is resident memory, so the execution efficiency is high.
External
Common commands in Linux (1) and Common commands in linux
Address:Http://www.cnblogs.com/archimedes/p/linux-commands1.html, Reprinted, please specify the source address.Ls command
Ls is used to list the contents of a directory. It is one of the most commonly used commands. The format of ls is as follows:
Ls [Option] [directory name or file name]
Main parameters:
http://blog.csdn.net/pipisorry/article/details/44681081Little TricksDirect view of Linux shell commands and explanations in the command lineMans commandHelp commands for better use under Linux-cheat#pip Install cheat$cheat Tar[better use of Linux help command-cheat]Copy, paste on the command lineIn the Ubuntu Terminal window, the shortcut keys for copying and pasting need to be added shiftCopy: Ctrl+shift+c
Linux yum commands and yum commands
Yum (all called Yellow dog Updater, Modified) is a Shell front-end Package Manager in Fedora, RedHat, and SUSE. Based on RPM package management, You can automatically download and install the RPM package from the specified server, automatically handle dependencies, and install all dependent software packages at a time, you do not need to download and install it repeatedly
Git Common commands and git Common commands===== Git Common commands ======= 1.Git documentation ===Git Chinese Document viewing address: http://git.oschina.net/progit/=== 2.Git basic commands ===Git config -- global user. name // set the global user name without adding gloabl as a localGit config -- global user. email
Common Liunx commands and common liunx commands
1. Tomcat-related commands
Restart tomcat in linux and view tomcat running logs in real time
In Linux, restart Tomcat and run the command!
First, go to the bin directory under Tomcat
Cd/usr/local/tomcat/bin
Use Tomcat to close the command
./Shutdown. sh
Check whether Tomcat is disabled
Ps-ef | grep java
Or ps aux |
Linux executes multiple commands consecutively and linux Multiple commandsIf each command is separated by ";", the next command will be executed no matter whether the command at the front is successfully executed or not.Here, the echo in the second command is intentionally written to one o, and the command execution error does not affect subsequent command execution.In this case, if commands are separated b
Introduction to three AngularJS commands that can improve user experience, and angularjs commands
1. profile picture
To display a profile picture in your application, you need to use your email address to convert the address to lowercase and use md5 to encrypt the string. Therefore, it is wise to use commands to achieve this and reuse it.
/* * A simple Gravatar
Common Linux commands (version 2) and common linux commandsPermission management commands
1. chmod [change the permissions mode of a file]:/bin/chmod
Syntax: chmod [{ugo} {+-=}{ rwx}] [file or directory name] // intuitive
E. g. chmod u + wx filename
Chmod o-x filename
Chmod g = rwx filename
Or: chmod [mode = 421] [file or directory] // recommended
Number of the permission pair:
R-4
W-2
X-1
E.g. rwxr-xr --
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.