Useful Linux commands

Check physical processors

grep "physical id" /proc/cpuinfo | sort | uniq | wc -l

Check  virtual processors

grep "^processor" /proc/cpuinfo | wc -l


Check No. of Cores

grep "cpu cores" /proc/cpuinfo | uniq -- cores


Find the start time of any service

 ps -eo pid,lstart,cmd | grep python

ps -ef | grep nohup

 ps -A | grep python


List the files in descending order of thier modified date.

ls -lrth

Delete the files with specfic string in filename

find .  -name "*bak*" -delete

find .  -name "*bak*" -print   ---> To list all

ls -l  --group-directories-first 

0 comments:

Copyright © 2013 SoftKul