Polysh Bulk execution of shell commands

Source: Internet
Author: User

Installing Polysh
wget http://guichaz.free.fr/polysh/files/polysh-0.4.tar.gztar -zxvf polysh-0.4.tar.gzcd polysh-0.4sudo python setup.py install
Using Polysh

Usage:/usr/bin/polysh [OPTIONS] HOSTS ...

Control commands is prefixed by ":". Use:help for the list

Options:

--version Show Program ' s version number and exit

-H,--help show this help message and exit

--hosts-file=file read hostnames from given file, one per line

--command=cmd command to execute on the remote shells

--SSH=SSH SSH command to use [exec ssh-ologlevel=quiet-t

% (host) s EXEC Bash--noprofile]

--user=user remote user to log in as

--no-color Disable colored hostnames [enabled]

--password-file=file read a password from the specified file. -Is the TTY.

--log-file=log_file file to log all machine conversation [None]

--abort-errors Abort If some shell fails to initialize [ignore]

--debug Print debugging information

Create a host list file host.list, each of which behaves as a hostname or IP:

localhost

Localhost.localdomain

Localhost4

Localhost4.localdomain4

Node0003.nemongo.com

Execution: Polysh--user=root--hosts-file=host.list, when all connections OK, will prompt a ready (5) >, here the number is the number of host.

650) this.width=650; "title=" clipboard "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clipboard "src=" http://s3.51cto.com/wyfs02/M02/6C/CB/wKioL1VStWnyA7-xAAGNP9ZB7_ E290.jpg "" 795 "height=" 146 "/>

Note: If you do not want to enter a password before logging in, you can pre-configure SSH login without password.

To make it easy to run commands automatically in bulk using shell scripts, you can add parameter--command to specify which commands to execute:

650) this.width=650; "title=" clipboard[1] "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clipboard[1] "src=" http://s3.51cto.com/wyfs02/M00/6C/CB/ Wkiol1vstwurkdn1aafz65jlhsm946.jpg "" 795 "height=" 113 "/>

Polysh Bulk execution of shell commands

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.