Host Security  «Prev 

Creating a File with crond

Running automated checks

Creating and Editing crontab Files

The simplest way to create a crontab file is to use the crontab -e command.
This command invokes the text editor that has been set for your system environment and the default editor for your system environment is defined in the EDITOR environment variable. If this variable has not been set, the crontab command uses the default editor.
Preferably, you should choose an editor that you know well like Notepad++. The following example shows how to determine if an editor has been defined, and how to set up vi as the default.

$ which $EDITOR
$ export EDITOR

Creating a file with crond

Linux Crond/ con.daily/stickyCheck

  1. This command simply displays a description of the activity, which in this case is Recent Sticky Files
  2. find / -perm -6000
    Use the find command to locate sticky files
  3. -ctime
    Looks for files whose mode has changed
  4. -mtime
    Looks for files that have been modified
  5. -2    -2
    Checks if the file was created or modified within the last two days (each 2 represents 2 days or 48 hours)
  6. (   -or   )
    Groups the search parameters so that they are evaluated together, rather than separately
  7. echo:: END
    This tells you that you have reached the end of the file listing.