Sie sind auf Seite 1von 1

Network Shell Cheat Sheet

Command
host% cd //hostname host% uname -a host% ls l //host1/directory host% ls l //host1/directory //host2/directory host% vi //host1/dir/file host% more //host1/dir/file host% tail f //host1/dir/file host% cat //host1/dir/file host% md5sum //host1/dir/file host% cp /directory/file //host2/directory host% cp r //host1/directory //host2/directory host% cp //host1/directory/file //@/directory host% ncp //host1/directory/file d //host1/directory1 //host2/directory2 host% diff //host1/directory/file //host2/directory/file host% nmem h host1 host% ndf h host1 host2 host% ntop h host1 host2 -t

Result
Connect to a remote server. List directory contents on one or many remote machines. Take actions on a remote file.

Copy one or more file or directories from one machine to another.

host% ndf h host1 host2 c | csv2xml host% nexec <redhat_host> rpm qa host% nexec <solaris_host> pkginfo l host% nexec <windows_host> ipconfig -all host% runcmd h host 1 host 2 -e rm /file_being_deleted host% runcmd f /hostlist -e ps ef | grep process host% runscript NH V f /hostlist e //host/script host% agentinfo host1 host% logman cat h host1 | tail

Compare a file that exists on multiple hosts Use n commands to retrieve pertinent os-level information about servers: a. ndf runs df across many machines b. nps runs ps across many machines c. ntop runs top across many machines d. nover provides system-level overview across many machines e. nmem summary of memory across many machines f. nnet summary of network info across many machines g. nstats system statistics across many machines Convert CSV output to XML using pipe. Remotely execute a command that lives locally on the target server.

Execute a command against many servers. Verify a process exists across many servers. Execute an NSH script across many servers Verify the RSCD agent version, mapping, and license status. View RSCD agent logfile contents.

For documentation on all the network enabled commands available, see the BladeLogicNSHCommands.pdf.