1.How to disable the Stop-A key on a Sun box without touching the keyswitch?
Enter the following line into /etc/system and reboot:
set abort_enable = 0
The Stop-A key will be disabled
2.How to check cron jobs are running OK?
We can check the following 2 files
1./var/cron/log (cron history information)
2./var/cron/olog (moves log file to /var/cron/olog if log
file exceeds system limit)
The output of the following files looks like the following
> root 17659 c Sun May 20 04:00:00 2007
> CMD: /usr/sbin/chkrootsmc
> root 17662 c Sun May 20 04:00:00 2007
< sys 17658 c Sun May 20 04:00:00 2007
< root 17659 c Sun May 20 04:00:00 2007 rc=137
< root 17662 c Sun May 20 04:00:00 2007
> CMD: /usr/sbin/chkrootsmc
> root 17712 c Sun May 20 04:05:00 2007
< root 17712 c Sun May 20 04:05:00 2007
> CMD: /usr/sbin/syscheck
> root 17754 c Sun May 20 04:10:00 2007
> CMD: /usr/sbin/chkrootsmc
> root 17755 c Sun May 20 04:10:00 2007
< root 17755 c Sun May 20 04:10:00 2007
3.How to check number of inodes used by a ufs file system?
To check the number of inodes used and free by a file system use the following command
df –k –F ufs -o i
The output will be like the following
root@itd-smc # df -F ufs -o i
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t0d0s0 184738 596830 24% /
/dev/dsk/c0t0d0s3 641 780927 0% /data
/dev/dsk/c0t0d0s4 64103 458777 12% /web
/dev/dsk/c0t0d0s5 51095 384489 12% /oramteam
If we run out of inodes in a filesystem, even if we have free space, we will not be able to create additional files.
4.How to unplug a keyboard from arunning machine?
To change it from the command line before we pull the keyboard out, we have totype the following as root:
# kbd -a disable
When we've reconnected the keyboard to the host,we have to type:
# kbd -a enable
5.How to disable the power/suspend key?
We have to renamethe file in:
/usr/openwin/bin/speckeysd
like
/usr/openwin/bin/speckeysd.old
and reboot the system and the power/suspend key will be disabled
6.Smallest command in unix
W - The w command displays a summary of the current activity on
the system, including what each user is doing.
7.How can I find out if the OS has been configured to run in ?
32 bit or 64 bit Mode?
On a 32 bit machine
-------------------
# isainfo -v
32-bit sparc applications
On a 64 bit machine
-------------------
# isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
8.Command to determine the booted disk.
# prtconf -vp | grep bootpath
The output will be like the following
bootpath: '/pci@1f,0/pci@1,1/ide@3/disk@0,0:a'
9.How to change the banner of the telnet daemon when logging in?
To set the banner, add a line of the form:
BANNER="..."
to /etc/default/telnetd
The writing in the double quotes will be printed when logging in.
No banner will be printed if /etc/default/telnetd contains:
BANNER=" "
10.How to change the banner of the FTP daemon when logging in
To set the banner , add a line of the
form
BANNER="..."
to /etc/default/ftpd.
The writing in the double quotes will be printed when logging in.
no banner will be printed if /etc/default/ftpd contains
BANNER=" "
0 comments:
Post a Comment