In the tutorials/manuals, I often see numbers like this. Is it necessary? If so, specific numbers necessary?
To make the setting persistent across reboot, one can use a udev rule:
/etc/udev/rules.d/69-hdparm.rules
In the tutorials/manuals, I often see numbers like this. Is it necessary? If so, specific numbers necessary?
To make the setting persistent across reboot, one can use a udev rule:
/etc/udev/rules.d/69-hdparm.rules
From man udev
in Rules Files
section:
RULES FILES
The udev rules are read from the files located in the system rules directories /usr/lib/udev/rules.d and /usr/local/lib/udev/rules.d, the volatile runtime directory /run/udev/rules.d and the local administration directory /etc/udev/rules.d. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live.
So the short answer is Yes, specially if you do care about the order in which the udev rules are processed.
– Brad Jan 07 '23 at 15:25for f in $(find ~/.config/xxx/conf.d/ -maxdepth 1 -type f| sort); do source $f; done
sort
. (Untested) this might workssource "$(find ~/.config/xxx/conf.d/ -maxdepth 1 -type f| sort)"
– Edgar Magallon Jan 07 '23 at 16:01.zshrc
into sub-files to make them more manageable. I use this method to source the sub rc files from the main rc file. – Brad Jan 07 '23 at 16:01source file1 file2
sourcesfile1
withfile2
in$1
. You wantfor f (~/.config/xxx/conf.d/*(N.)) . $f
. Usingfind
that way doesn't make sense – Stéphane Chazelas Jan 07 '23 at 20:08bash
, is there a way to use glob qualifiers? (For sorting data like zsh does) – Edgar Magallon Jan 07 '23 at 20:32N
for nullglob and.
as the equivalent of-type f
. Sorting is lexical by default like in every shell, though you could also use then
glob qualifier for numeric sorting (for12_foo.conf
to come after2_bar.conf
for instance) – Stéphane Chazelas Jan 07 '23 at 21:20N
was used for sorting. Thanks for the clarification. – Edgar Magallon Jan 08 '23 at 04:37