Jump to Navigation


164 - How to delete e-mails in IMAP server (openssl)

OpenSSL is an open source implementation of the SSL and TLS protocols. The core library (written in the C programming language) implements
the basic cryptographic functions and provides various utility functions. You can access to IMAP server with this tool.

1. Connect IMAP server

# openssl s_client -connect mail.myserver.com:993 -crlf -quiet


161 - How to use ifconfig

The "ifconfig" command allows the operating system to setup network interfaces and allow the user to view information
about the configured network interfaces.

Example :


160 - CPU Load

The w, top, sar and uptime commands show the three load average numbers. In Linux, they can also be
accessed by reading the /proc/loadavg file.


158 - Clean up /tmp directory

If you are a Linux administrator, then you certainly need a tool to delete old files - especially old backup files or /tmp directory.
Here comes tmpwatch. With parameter time and path, tmpwatch will recursively delete all files older then a given time.

To clean up /tmp directory by crontab :

   0 */2 * * * /usr/sbin/tmpwatch -maf 8 /tmp 

   0 5 * * * /usr/sbin/tmpwatch -md 24 /tmp 

   0 5 * * * /usr/sbin/tmpwatch -maf 24 -x /tmp/lost+found /tmp 


156 - Check the number of processors

/proc/cpuinfo contains all of the processor information for all current processors in your computer. This will include the speed,
the amount of on-chip cache, processor type, and how many cores. You can check the number of processors following the command on Linux.

[root@myserver ~]# cat /proc/cpuinfo | grep processor | wc -l



152 - device is busy

You got an message "device is busy" when you do "umount" command.
You could do "umount" by the following command.

# umount -l < PATH_TO_DEVICE >

Also you can check which processes are using this device.

# fsuer -muv /d01

Yoiu can kill that process.


150 - Check a specific port number in Linux

Checking port number has a lot of methods.

1. /etc/services

# cat /etc/services | grep xxx (xxx = port number)

2. Use netstat command

# netstat -anp | grep 1521

3. Use lsof command


148 - Create Linux User

  • Create a general User

# /user/sbin/adduser -g <Groups > -d <Home Directory> -s <Shell> <User Name>

# /user/sbin/adduser -d /home/user1 -g users -s /bin/bash user1


144 - tee command

Accept output from another command and send it both to standard output and to files (like a T or fork in the road).


# 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.

-i, --ignore-interrupt
     Ignore interrupt signals.


143 - Useful command for CPU & Memory

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




Subscribe to RSS - command

Main menu 2

by Dr. Radut