0% found this document useful (0 votes)
96 views1 page

Solaris Tips From Site

This script allows users to execute commands across multiple workstations listed in the script using rsh. The script hardcodes the workstation names and executes the command passed to it as an argument on each workstation listed. It then prints the output of the command for each workstation along with a header identifying the machine.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views1 page

Solaris Tips From Site

This script allows users to execute commands across multiple workstations listed in the script using rsh. The script hardcodes the workstation names and executes the command passed to it as an argument on each workstation listed. It then prints the output of the command for each workstation along with a header identifying the machine.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Sometimes files have bad names(like starting with dot or hyphen or blanks) and cannot be deleted or moved by the

normal rm and mv command. Inode number can be used to delete such files. Use the "ls -i" command to check for the inode number of the file to be removed or moved. CODE: $ find . -inum -exec rm -i {} ; or $ find . -inum -exec mv {} newname ;

In Solaris 2.6 the CDE sometimes becomes unresponsive if the screen lock is activated for a long period of time. This completely locks the console and renders it unusable, even though the machine continues to function normally otherwise. This tip allows you to restart the X server and gain control of your CDE again without a reboot. Code Kill all 'dt' processes. Kill all 'X' and 'Xsession' processes. Remove /var/dt/Xpid Check the console to make sure no one is logged in. /etc/rc2.d/S99dtlogin stop /etc/rc2.d/S99dtlogin start

This script will execute a number of commands such as who -b on all workstations listed in script. Workstations are hard-coded in this version. Example: rsh_all 'who -b' will result in a listing of all workstations and the last boot time and date. Code # Usage: rsh_all 'command string' # Example: rsh_all 'who -b' (will list all boot times for machines) # Example: rsh_all 'uname -a' (will list system hostname, Solaris version, etc.) # Example3: rsh_all 'prtconf -v | grep Memory' (will list RAM in each machine) echo `date` echo "running rsh_all for $1" # Machine1 is hostname of workstation; user name is optional echo "Machine1...Paul K-----------------------------------" rsh machine1 $1 #Copy previous two lines as needed for each machine; change machine name, etc. # echo "DONE! n"

You might also like