Clear contents of a file in UNIX
$cat /dev/null > file
or
$true > file
|
||||||
Clear contents of a file in UNIX $cat /dev/null > file or $true > file AIX : Machine Type & Serial Number uname -m for the serial number uname -M for the machine type and model This works with AIX df -g | egrep -v “Filesystem|proc|tmp” | sed ‘s/\%//’ | awk ‘$4 >= 90 {print $4 “%\t” $7}’ df -k | sed 1d | awk ‘$4>90 {print}’ This works with Solaris and Linux df -k | egrep -v “proc|fd|cdrom|mnttab|run|tmp|Filesystem” | sed ‘s/\%//’ | awk ‘$5 >= 90 {print $5 “%\t” $6}’ 1- Start by check ipfilter status if it’s running you can go ahead and configure rules -bash-3.00$ svcs -a|grep -i ipfil online 10:29:37 svc:/network/ipfilter:default if it’s disabled enable it #svcadm enable ipfilter 2- Display rules #bash-3.00ipfstat -io block out all pass out quick on lo0 all pass out quick on eri0 proto tcp/udp from […] Clear DNS cache You can clear DNS cache in Solaris by doing the following #/etc/init.d/nscd stop #/etc/init.d/nscd start List PID’s for processes listening on ports To list PID’s for processes listening on ports #pfiles `ptree | awk ‘{print $1}’` | egrep ‘^[0-9]|port:’ Symptoms Repeated attempts by unprivileged users to stop the inetd server may transition the inetd service to the “maintenance” state, thereby moving all internet services managed by inetd(1M) to the “offline” state. To determine the state of the inetd service, the following command can be run: $ svcs inetd STATE STIME FMRI maintenance 12:00:23 svc:/network/inetd:default […] install ssh client on Centos To install openssh on a CentOS: yum install openssh
And if you want to install the client (ssh command) you have to run: yum install openssh-clients if you want to use on of the linux commands: dig, host or nslookup on a CentOS machine and you get the error message: -bash: nslookup: command not found you have to install the bind-utils package. Just run the command: yum install bind-utils First of all, we need to understand the procedure of the boot in Solaris. Next, follows a description of the boot sequence in Solaris. Overview of the boot sequence in Solaris When Solaris boots up, it runs “init”. “init” looks in /etc/inittab to find out what runlevel it needs to boot into On Solaris, this […] |
||||||
Copyright © 2024 - All Rights Reserved Powered by WordPress & Atahualpa |
Recent Comments