Reputation
3,308
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 18 55
Impact
~337k people reached

1d
comment Using chown $USER:$USER inside bash script
Use chmod user: <file> to chown to the user and his primary group.
1d
comment How do I compile DKMS module for multiple kernel image versions in Debian?
Does it already exist, perhaps?
May
19
revised Change a locale definition (as opposed to a locale setting)
Updated to incorporate the best-practice suggestion from http://unix.stackexchange.com/users/22565/st%C3%A9phane-chazelas
May
19
comment Change a locale definition (as opposed to a locale setting)
@Janis: unfortunately I have no desktop install, I'll try it out a bit later and will also try to put the steps into an easy-to-use script.
May
19
comment Compare two files with four columns
So you don't actually want to compare but rather join two data sets on a given column? Would it be admissible to do this in, say, SQL? Also awk would indeed be suited for the task (although it wouldn't be a one-liner), but it's hard to wrap ones head around your description of what you want to achieve, tbh. For example is one supposed to match the first three fields of what seems like a time stamp or are the records running in parallel, so one could also go by the line number from the start?
May
19
comment Change a locale definition (as opposed to a locale setting)
@Janis: only if you set it in your profile, that is decidedly not the system locale. It's your user locale.
May
19
comment Change a locale definition (as opposed to a locale setting)
@Janis: Other applications are likely not going to make use of your ~/.profile although they would most likely inherit the global settings if you set it globally. Also, for those a restart of KDE or whatever you are using may be required. I did a full reboot to make sure (although that's probably overkill, too).
May
19
comment How can I copy a file in a bash script and rename it while copying and place it in the same directory
If you don't insist on Bash, I think there are ready-made tools for that as well.
May
19
revised Extract some columns from grep output
edited body
May
19
comment Prevent a lot of brute force attacks on Exim2
I don't have a clue. I don't use such canned administration interfaces for the most part, because I want the full control. The terminal gives me just that ;) ... IIRC Fail2Ban and similar solutions are picking up slowly on IP Sets. So if you have a recent version and configure it accordingly, you may get a similar effect as my semi-automated but custom solution ;)
May
19
comment Change a locale definition (as opposed to a locale setting)
@StephenKitt: I believe on Debian and Ubuntu referencing the locale in /var/lib/locales/supported.d/local and then running dpkg-reconfigure locales would be the canonical way. Although underneath this likely also calls localedef in the end. I''ll test this and adjust my instructions above accordingly. I need to make sure that the way LC_TIME and the locales reference the name it'll still work. But thanks for the input. It helped!
May
19
comment Change a locale definition (as opposed to a locale setting)
@Janis: no. Thanks for spotting the glitch. Corrected it now.
May
19
revised Change a locale definition (as opposed to a locale setting)
added 21 characters in body
May
19
comment Change a locale definition (as opposed to a locale setting)
@StéphaneChazelas: Hah! Awesome. However, then you cannot copy the LC_IDENTIFICATION and how would that affect the naming of the files and how you refer to the locale in /etc/default/locale and /var/lib/locales/supported.d/local respectively? Can you tell?
May
19
revised Change a locale definition (as opposed to a locale setting)
added 732 characters in body
May
19
revised Change a locale definition (as opposed to a locale setting)
added 732 characters in body
May
19
comment Configure OpenSSH server not to require password *or* key for a particular user
@Lambert: preferably I'd like to circumvent the prompt for the password altogether. To my knowledge PermitEmptyPasswords merely allows hitting <kbd>Enter</kbd> when the password prompt appears. But I'll check it out again. Haven't used it in years as it's normally not desirable.
May
19
answered Change a locale definition (as opposed to a locale setting)
May
19
comment Change a locale definition (as opposed to a locale setting)
@Janis: on Debian and Ubuntu you'll also want to put the name of your locale into /var/lib/locales/supported.d/local (or one of the other files in there) and run dpkg-reconfigure locales as superuser for the locale definition to be compiled. And yes, setting LC_TIME to point to a customized locale appears to be the least intrusive method of all I've seen so far. That's why your system has global settings where LC_TIME can be set different from the "overall locale".
May
19
comment Change a locale definition (as opposed to a locale setting)
You might want to read my question, which contains details on what I did. I have yet to package it up, but for now this works quite nicely. Simply set LC_TIME (in /etc/environment or /etc/default/locale or /etc/locale.conf depending on distro) to the modified locale (I called mine isodate.UTF-8) and the respective format will get picked from that customized locale for only time/date. This is how I customized my otherwise en_US setting to display ISO date/time.