Sponsored Content
Top Forums UNIX for Advanced & Expert Users Where is the crontab file stored Post 302159702 by Perderabo on Friday 18th of January 2008 08:46:10 AM
Old 01-18-2008
If root edits the files directly, changes will not take effect in most cases and can even be lost. With most versions of cron, the answer to the question is "in memory". Those files are read only as cron starts up. The alternative would be to reread them every minute which would put quite a load on the system. It is critical that you use the crontab command to view and change those files. The crontab command interacts with cron to change the tables in cron's memory.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Directory where spooled file is stored

I am spooling a text file to printer under Sun Solaris m/c (solaris 7). I want to know which directory the spooled text file is stored before it goes to printer. B'se my main problem is to find the escape sequence from the text file to get landscape orientation. Now when ever I spool a file... (1 Reply)
Discussion started by: babulilly
1 Replies

2. Shell Programming and Scripting

Increment variable stored in a file

Hi, I want to write a perl script, which will increment number stored in file. I want to do this without any file handles. I think we have to use some UNIX commands. I am not sure how to do this with file handles. Thanks, (1 Reply)
Discussion started by: solitare123
1 Replies

3. Shell Programming and Scripting

Prase a file and stored the result to an array

Dear all , I have a file whose content has the following format: jboss.web:type=ThreadPool,name=AAAA jboss.web:type=ThreadPool,name=BBBB How can I parse this file to get the value of the name of each line (AAAA , BBBB) and store the result to an array ? (array = AAAA , array = BBBB).... (4 Replies)
Discussion started by: youareapkman
4 Replies

4. UNIX for Dummies Questions & Answers

How to get the Username stored in another file

Hello, I have a file FSGReport.info which reads as export username=abc export password= 1333 Now I have another FTP script file FTP.sh in which I need to access the username and password stored in the file FSGReport.info . How can I access this file and get the username and password. Please... (1 Reply)
Discussion started by: vnatarajan
1 Replies

5. OS X (Apple)

Where are package contents stored for a file, or why aren't they visible w/o right clicking the file

I was wondering about the "Show Package Contents" option in OS X. I have a keynote file that I'm looking at. Exactly where are these contents or its directory stored, because they aren't visible in the Finder window, unless I obviously right click and choose to view them. And I don't think I can... (2 Replies)
Discussion started by: Straitsfan
2 Replies

6. Shell Programming and Scripting

Extract rows from file based on row numbers stored in another file

Hi All, I have a file which is like this: rows.dat 1 2 3 4 5 6 3 4 5 6 7 8 7 8 9 0 4 3 2 3 4 5 6 7 1 2 3 4 5 6 I have another file with numbers like these (numbers.txt): 1 3 4 5 I want to read numbers.txt file line by line. The extract the row from rows.dat based on the... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

7. Shell Programming and Scripting

Searching a string stored in other file

I need to design a script which can do the following: I have two files abc.txt and constant.hmtl abc.txt contains some 5 string that I need to see if they exist in contants.html. Constants.hmtl is a very large file around 800 lines. I want to search all the strings present in file... (8 Replies)
Discussion started by: hemasid
8 Replies

8. Shell Programming and Scripting

Want to Insert few lines which are stored in some file before a pattern in another file

Hello, I have few lines to be inserted in file_lines_to_insert. In another file final_file, I have to add lines from above file file_lines_to_insert before a particular pattern. e.g. $ cat file_lines_to_insert => contents are abc def lkj In another file final_file, before a... (6 Replies)
Discussion started by: nehashine
6 Replies

9. Shell Programming and Scripting

Eliminating words from a file through ngrams stored in another file

Hello, I have a large data file which contains a huge amount of garbage i.e. words which do not exist in the language. An example will make this clear: kpaware nlupset rrrbring In other words these words are invalid in English and constitute garbage in the data. I have identified such... (2 Replies)
Discussion started by: gimley
2 Replies

10. Shell Programming and Scripting

Search if file exists for a file pattern stored in array

Hi experts, I have two arrays one has the file paths to be searched in , and the other has the files to be serached.For eg searchfile.dat will have abc303 xyz123 i have to search for files that could be abc303*.dat or for that matter any extension . abc303*.dat.gz The following code... (2 Replies)
Discussion started by: 100bees
2 Replies
CRONTAB(1)							   User Commands							CRONTAB(1)

NAME
crontab - maintains crontab files for individual users SYNOPSIS
crontab [-u user] file crontab [-u user] [-l | -r | -e] [-i] [-s] crontab -n [ hostname ] crontab -c DESCRIPTION
Crontab is the program used to install, remove or list the tables used to serve the cron(8) daemon. Each user can have their own crontab, and though these are files in /var/spool/, they are not intended to be edited directly. For SELinux in MLS mode, you can define more crontabs for each range. For more information, see selinux(8). In this version of Cron it is possible to use a network-mounted shared /var/spool/cron across a cluster of hosts and specify that only one of the hosts should run the crontab jobs in the particular directory at any one time. You may also use crontab(1) from any of these hosts to edit the same shared set of crontab files, and to set and query which host should run the crontab jobs. Running cron jobs can be allowed or disallowed for different users. For this purpose, use the cron.allow and cron.deny files. If the cron.allow file exists, a user must be listed in it to be allowed to use cron If the cron.allow file does not exist but the cron.deny file does exist, then a user must not be listed in the cron.deny file in order to use cron. If neither of these files exists, only the super user is allowed to use cron. Another way to restrict access to cron is to use PAM authentication in /etc/security/access.conf to set up users, which are allowed or disallowed to use crontab or modify system cron jobs in the /etc/cron.d/ directory. The temporary directory can be set in an environment variable. If it is not set by the user, the /tmp directory is used. OPTIONS
-u Appends the name of the user whose crontab is to be modified. If this option is not used, crontab examines "your" crontab, i.e., the crontab of the person executing the command. Note that su(8) may confuse crontab, thus, when executing commands under su(8) you should always use the -u option. If no crontab exists for a particular user, it is created for him the first time the crontab -u command is used under his username. -l Displays the current crontab on standard output. -r Removes the current crontab. -e Edits the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically. -i This option modifies the -r option to prompt the user for a 'y/Y' response before actually removing the crontab. -s Appends the current SELinux security context string as an MLS_LEVEL setting to the crontab file before editing / replacement occurs - see the documentation of MLS_LEVEL in crontab(5). -n This option is relevant only if cron(8) was started with the -c option, to enable clustering support. It is used to set the host in the cluster which should run the jobs specified in the crontab files in the /var/spool/cron directory. If a hostname is supplied, the host whose hostname returned by gethostname(2) matches the supplied hostname, will be selected to run the selected cron jobs subsequently. If there is no host in the cluster matching the supplied hostname, or you explicitly specify an empty hostname, then the selected jobs will not be run at all. If the hostname is omitted, the name of the local host returned by gethostname(2) is used. Using this option has no effect on the /etc/crontab file and the files in the /etc/cron.d directory, which are always run, and considered host-specific. For more information on clustering support, see cron(8). -c This option is only relevant if cron(8) was started with the -c option, to enable clustering support. It is used to query which host in the cluster is currently set to run the jobs specified in the crontab files in the directory /var/spool/cron , as set using the -n option. SEE ALSO
crontab(5), cron(8) FILES
/etc/cron.allow /etc/cron.deny STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax differs from previous versions of Vixie Cron, as well as from the classic SVR3 syntax. DIAGNOSTICS
An informative usage message appears if you run a crontab with a faulty command defined in it. AUTHOR
Paul Vixie <vixie@isc.org> Colin Dean <colin@colin-dean.org> cronie 2012-11-22 CRONTAB(1)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy