The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 2,326β€…    Votes:  2β€…
Tags: bash   scripts   files   cron   systemd  
Link: πŸ” See Original Question on Ask Ubuntu πŸ”—

URL: https://askubuntu.com/q/1020411
Title: Are there file-naming conventions for .cron and .systemd extensions?
ID: /2018/03/30/Are-there-file-naming-conventions-for-.cron-and-.systemd-extensions_
Created: March 30, 2018    Edited:  August 5, 2021
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


I’m starting to rename all my existing bash scripts in /home/Me/bin and /usr/local/bin from no extension to a .sh extension. The reason is the exact same file name with drastically different contents and purposes will sometimes exist in /etc/cron.d or /lib/systemd/system-sleep. This is causing false-positives with locate --regex '<file_name>' searches.

I’ve googled around and can’t find any file extension naming conventions for cron or systemd.

I’ve seen .py used for Python, .c for C program, .h for header file, .o for compiled object. This leads me to presume the Linux-verse would prefer two character extensions. I think the four character extensions are more readable. I don’t see any need for DOS 8.3 format since the old 8.x component is now 256.x in size or something like that. Systemd service files buck the β€œshorter-is-better” trend with .service files instead of .sr or .srv.

Before I go through the labour of renaming files and editing the parents that call the files with new names, are there any existing file extension conventions?

Note that if you or your organization has internal standards, that would be a perfectly acceptable answer, in absence of industry standards.


Just found a launchpad bug report where a user named a job /etc/cron.d/job.cron and it crashed due to the . in the name. The bug was filed in 2011 and confirmed, but still not fixed.

This means all my extensions will have to start with - instead of .

⇧ Terminal splash screen with Weather, Calendar, Time & Sysinfo? echo "hello" >&0 | > file.txt doesn't write to file.txt  β‡©