DEV Community

Manish Chaudhary
Manish Chaudhary

Posted on

Some Useful Linux Commands

Search Specific text in a file

cat filename | grep keyword
Enter fullscreen mode Exit fullscreen mode

Show last few lines in a file

tail -f filename
Enter fullscreen mode Exit fullscreen mode

Shows last couple of lines

tail -100 filename # shows last 100 lines
Enter fullscreen mode Exit fullscreen mode

keeps showing new content if new content gets added

locate to search file

install mlocate package first

locate filename
Enter fullscreen mode Exit fullscreen mode

For queue supervisor

login as root first

supervisorctl status
Enter fullscreen mode Exit fullscreen mode

Note: Location of supervisor configuration files

cd /etc/supervisor/conf.d/ # as this is the location of files
Enter fullscreen mode Exit fullscreen mode

Show List of files

ls
Enter fullscreen mode Exit fullscreen mode

will show list of files with names like worker-xyz.conf

Top comments (0)