<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Command to display all crontabs for a given system in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075474#M6720</link>
    <description>I am looking for a command that would show all of the active installed crontabs for all users on a machine.  Is there a more elegant way than ls in /var/spool/cron/crontabs/ ?&lt;BR /&gt;&lt;BR /&gt;Are the crontabs shown in that directory necessarily active?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
    <pubDate>Fri, 19 Sep 2003 20:10:43 GMT</pubDate>
    <dc:creator>Dave Falloon</dc:creator>
    <dc:date>2003-09-19T20:10:43Z</dc:date>
    <item>
      <title>Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075474#M6720</link>
      <description>I am looking for a command that would show all of the active installed crontabs for all users on a machine.  Is there a more elegant way than ls in /var/spool/cron/crontabs/ ?&lt;BR /&gt;&lt;BR /&gt;Are the crontabs shown in that directory necessarily active?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Fri, 19 Sep 2003 20:10:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075474#M6720</guid>
      <dc:creator>Dave Falloon</dc:creator>
      <dc:date>2003-09-19T20:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075475#M6721</link>
      <description>crontab -l&lt;BR /&gt;&lt;BR /&gt;But that only works for each user. &lt;BR /&gt;&lt;BR /&gt;You can do a su - username -c "crontab -l" for each user authorized for cron.&lt;BR /&gt;&lt;BR /&gt;Or you can look at the raw files.&lt;BR /&gt;&lt;BR /&gt;watch this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while xx&lt;BR /&gt;read&lt;BR /&gt;  cron.allow&lt;BR /&gt;  /usr/bin/su - $xx -c "crontab -l"&lt;BR /&gt;done &amp;lt; /var/adm/cron/cron.allow&lt;BR /&gt;&lt;BR /&gt;That will do it.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 21:15:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075475#M6721</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T21:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075476#M6722</link>
      <description>My instructions were HP-UX specific and did not read your question carefully.&lt;BR /&gt;&lt;BR /&gt;If you change the script I wrote to /var/spool/cron it will display the crontabs.&lt;BR /&gt;&lt;BR /&gt;I know of know more elegant way to do the job.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 21:46:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075476#M6722</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T21:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075477#M6723</link>
      <description>I have written and tested a small sh script on Linux that does it in a different way &lt;BR /&gt;&lt;BR /&gt;"All the road lead to Rome"&lt;BR /&gt;&lt;BR /&gt;To try it out just download the attachement invoke it as root like&lt;BR /&gt;&lt;BR /&gt;./show_all_crontab.sh&lt;BR /&gt;&lt;BR /&gt;should do the job of diplaying the content of th various crontabs, you could output this to a report file like &lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;&lt;BR /&gt;#./show_all_crontab.sh &amp;gt; report_crontab.rep&lt;BR /&gt;&lt;BR /&gt;then when you need to check if it as been modified you could&lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;# mv report_crontab.rep report_crontab_old.rep&lt;BR /&gt;# ./show_all_crontab.sh &amp;gt; report_crontab.rep&lt;BR /&gt;# diff report_crontab_old.rep report_crontab.rep&lt;BR /&gt;&lt;BR /&gt;this way you would know WHAT has been changed.&lt;BR /&gt;&lt;BR /&gt;If you are more intested by WHEN it has been changed then you could do &lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;&lt;BR /&gt;#for i in `find /var/spool/cron/ -name "*" -type f` ; do stat $i ; done &amp;gt; when_change_crontab.rep&lt;BR /&gt;&lt;BR /&gt;this when_change_crontab.rep could also be mv to an old version when needed and checked again's difference's with newly created when_change_crontab.rep&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;all theses ex: could be put into a script invoke so to make it more robust and easy.&lt;BR /&gt;&lt;BR /&gt;Hope this will get you rolling&lt;BR /&gt;&lt;BR /&gt;Keep us informed.&lt;BR /&gt;&lt;BR /&gt;enjoy&lt;BR /&gt;&lt;BR /&gt;J-P&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Sep 2003 08:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075477#M6723</guid>
      <dc:creator>Huc_1</dc:creator>
      <dc:date>2003-09-21T08:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075478#M6724</link>
      <description>Me again.. try to be short this time around&lt;BR /&gt;&lt;BR /&gt;It is just say the I named attachement script show_all_crontab.sh &lt;BR /&gt;the forums rename's it to 14807.sh&lt;BR /&gt;&lt;BR /&gt;so remplace show_all_crontab.sh with 14807.sh in my prior reply.&lt;BR /&gt;&lt;BR /&gt;J-P</description>
      <pubDate>Sun, 21 Sep 2003 09:37:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075478#M6724</guid>
      <dc:creator>Huc_1</dc:creator>
      <dc:date>2003-09-21T09:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Command to display all crontabs for a given system</title>
      <link>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075479#M6725</link>
      <description>Thanks Guys,&lt;BR /&gt;&lt;BR /&gt;Thats pretty much what I figured though, its not a hidden cron switch from 1975 or something that has just been left out of the man pages.&lt;BR /&gt;&lt;BR /&gt;SEP you get points for fast command line job, but I think huc wins as far as script features :)&lt;BR /&gt;&lt;BR /&gt;Again thanks a lot guys,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 23 Sep 2003 16:16:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/command-to-display-all-crontabs-for-a-given-system/m-p/3075479#M6725</guid>
      <dc:creator>Dave Falloon</dc:creator>
      <dc:date>2003-09-23T16:16:18Z</dc:date>
    </item>
  </channel>
</rss>

