Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-25-2008, 03:28 AM   #1
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364

Rep: Reputation: 38
Place for custom made system scripts

I have written some scripts which are run by cron at various times of the day. The scripts perform some system related activities. I have placed the scripts at /root. Is there any convention/standard for placing custom written system scripts elsewhere in the filesystem?
Old 11-25-2008, 05:14 AM   #2
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,296

Rep: Reputation: Disabled
I put scripts that are run by cron daily in

and similar logic
Old 11-26-2008, 07:30 AM   #3
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364

Original Poster
Rep: Reputation: 38
Thanks for your reply.
Old 11-26-2008, 11:29 AM   #4
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137

to meet the filesystem standard you best place the scripts in /usr/local/bin or /usr/local/sbin and create a link in /etc/cron.daily.

This also provides an easy way what to backup in kind of reinstallation or system change.
Old 11-26-2008, 05:13 PM   #5
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
personally I hate the concept of /usr/local. To me /usr/local is for those that don't want to bother with proper installation of packages.

On the other hand. If you have several computers that all pull their base system from NFS then /usr/local makes some sense to customizing each machine. On the other hand of that hand though, storage space is cheap. Unless your computer is really old, you probably arn't going to be doing that set up for a home network.
Old 11-26-2008, 05:29 PM   #6
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I put individual user's cron scripts in ~/cron, and common ones in /home/cron. The reason I put the common ones there is they get caught by my backup procedures, whereas I don't want to be backing up /usr/bin.


bash, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do I place startup scripts? trist007 Linux - Newbie 9 08-21-2008 05:59 PM
Can My custom Icons be used in place of default? randell6564 Ubuntu 3 06-20-2006 03:12 PM
custom-made redhat distro srns Red Hat 1 12-15-2004 09:15 PM
Where do you place shutdown scripts? zer0halo Linux - Newbie 3 08-24-2004 04:43 PM
Good place to find scripts? twistedpair Linux - General 3 01-15-2004 02:15 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration