1

I'm pretty new to ubuntu and cron, and I was wondering how to search for something in the crontab file. Basiclly, the ubuntu equivilent of ctrl+f on windows.

thanks

4 Answers 4

3

just found it. If I run crontab -e, I can search with ctrl+w.

thanks for the help

1
  • Ah, you did not mean the crontab file (/etc/crontab), but the user specific crontab entries. If you set your EDITOR to gedit, you will have nicer output and be able to use Ctrl-F.
    – January
    Sep 27, 2012 at 10:58
3

To grep a user-specific crontab:

crontab -l | grep -i keyword

1

Try from command line. Open terminal Ctrl+Alt+T and run following command :

cat /etc/crontab | grep yoursearchkeyword
1
  • This crontab file doesn't appear to be the one I get when I use crontab -e
    – Jonathan
    May 28, 2015 at 0:41
0

You can just open the crontab file in gedit and use Ctrl-F.

gedit /etc/crontab

For your user specific crontab file, do

crontab -e

Depending on your $EDITOR environmental variable, you will open it in your favorite editor. If the EDITOR=gedit, then you will be able to do Ctrl-F. If the editor is nano, you need to do Ctrl-W. With EDITOR=vi, you type /.

2
  • 1
    Is there anyway to cat the user-specific crontab?
    – Jonathan
    May 28, 2015 at 0:40
  • sudo cat /var/spool/cron/crontabs/username | grep -i searchterm
    – PLA
    Jun 24, 2017 at 18:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .