Accept output from another command and send it both to standard output and to files (like a T or fork in the road).
Ex.
|
# top -b -d 1 -n 7 | tee top_resilt.txt # ls *.txt | wc -l | tee count-02.txt count-01.txt # ls -l | tee savefile.txt |
Options :
-a, --append
Append to files; do not overwrite.
USER : account name
PID : process number
VSZ : vertial memory space that a process is using (k bytes)
%MEM : content of phisical memory
%CPU : occupancy of processor
COMMAND : command of process
| ps ax -o user,pid,vsz,pmem,pcpu -o args |
Most of the time you login into remote server via ssh. If you start a shell script or command and you exit (abort remote connection),
the process will get killed. Sometime job or command takes a long time. you are not sure when the job will finish. if you logout the system,
nohup is better to leave job running after exit.
| nohup command-name & |
Examples:
The easilst way is to empty root & users email message file
i.e. /var/spool/mail/root or /var/spool/mail/<username>.
There are two ways to delete all messages.
1.mail command & delete command :
Login linux as the user .
|
d 1-100 --> if you delete from 1 to 100, |
2. Simply type the following command at shell :
The Yellowdog Updater, Modified (YUM) is an open-source command-line package-management utility for RPM-compatible Linux operating systems
and has been released under the GNU General Public License. Suddenly you can not update any packaged by yum.
So you need to clear yum cache with the following command. Probably after thet, you would undate old packages.
This explains how to use Telnet to test Simple Mail Transfer Protocol (SMTP) communication between messaging servers. By default,
SMTP listens on port 25. If you use Telnet on port 25, you can enter the SMTP commands that are used to connect to an SMTP server
and send a message exactly as if your Telnet session was an SMTP messaging server. You can see the success or failure of each
step in the connection and message submission process.
1. Redhat
Next enter the following three commands to disable firewall.
| # service iptables save # service iptables stop # chkconfig iptables off |
For IPv6
| # service ip6tables save # service ip6tables stop # chkconfig ip6tables off |
2. Ubuntu
1. How to halt/stop user called user01
| # skill -STOP -u user01 |
2. How to resume already halted user called iser01
Send CONT single to user user01, type the following command:
| # skill -CONT -u user01 |
3.How to kill and logout user called user01
System administration command. Restore backed up files from a dump archiv.
Execure this command with one of the following flags.
1. Restart Rescue Mode by Installation DVD(or CDROM)
2. Mount an external device or NFS to access dump files.
Ex. Like USB and so on which has dump files for restore.
1. Create Snapshot first.
Before creating a snapshot, please check the disk space of volume group.
|
# vgdisplay .......... Total PE 4347 |