From today, I like to add new some useful tips that I came across in "Tips" title.
- Check Folder size in Unix thru console : du -h
- Check disk free space in Unix thru console : df -h
- List all open ports : nmap -sT < host name >
- Read file contents through bash : cat file.lst |while read line; do echo "${line}"; done
- We know that top gives the information about the CPU, MEMORY usage of a process in a Linux Box. For Solaris, we have prstat command. This gives the similar information.
- Setting priority for a process in Linux : nice -n -20 <command>. Starts the "command" with highest priority. 19 is the lowest priority.
- Setting priority for a running process : renice <priority> -p <pid>
- Listing directory structure in tree format (I stole it from a website ;) ) : ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
List will grow as and when I learn new things... :)