Answer by mwfearnley for What does aux mean in `ps aux`?
The key to understanding the manpage is not to search for "aux" (which I tried first), but to focus on the section that describes the kinds of parameter ps takes:This version of ps accepts several...
View ArticleAnswer by mwfearnley for How to mount ufs file system under Debian testing?
According to mount freebsd slice partition under linux, you may need to specify an offset into the partition.partx -l should be able to identify the sector offset of the filesystem, which you'd need to...
View ArticleAnswer by mwfearnley for speedtest-cli: ValueError: invalid literal for int()...
From this speedtest-cli Pull Request, I gather the speedtest site have changed something in the response their API gives out. Looking at the first commit in the PR, you just need to modify a single...
View ArticleAnswer by mwfearnley for What is the equivalent of 'update-grub' for RHEL,...
The update-grub script in Ubuntu is actually just a stub for grub-mkconfig, and it can be adapted to other distros without too much pain. Here it is in its entirety:#!/bin/shset -eexec grub-mkconfig -o...
View ArticleWhy is 'cryptsetup luksFormat' not prompting for a passphrase?
I am expecting cryptsetup to prompt me for a passphrase, but instead it's just trying and failing to open a key file:sudo cryptsetup luksFormat test.img cryptsetup-testWARNING!========This will...
View ArticleAnswer by mwfearnley for Why is 'cryptsetup luksFormat' not prompting for a...
You are confusing the syntaxes for luksFormat and luksOpen.luksFormat does not open the device, so doesn't take a device name to map to. So if you try to pass one, it will interpret it as a filename...
View ArticleAnswer by mwfearnley for awk: Built-in FILENAME variable on empty file
Note: parts of this answer are specific to GNU awk, specifically 4.0 and later, which added BEGINFILE/ENDFILEPer-line blockawk '{print "File name: " FILENAME}' myfileThis will print File name: myfile...
View ArticleAnswer by mwfearnley for How can I filter read only file systems out of df...
Yes, snap's intrusion into the filesystems list can be annoying...You're on the right lines with df -x - as Snapcraft says, all snaps use the read-only Squashfs filesystem, so you can filter them all...
View ArticleAnswer by mwfearnley for Tab completion errors: bash: cannot create temp file...
I had this issue on a read-only root filesystem.I was able to get tab-completion working for the time being by mounting a temporary filesystem in /tmp (sudo mount -t tmpfs tmpfs /tmp), and reopening...
View ArticleAnswer by mwfearnley for UUID Of A drive that won't show up in...
I have found that file -s can give the UUID for a partition in a case where blkid will not:sudo file -s /dev/sda1/dev/sda1: Linux rev 1.0 ext2 filesystem data (mounted or unclean),...
View ArticleComment by mwfearnley on Systemctl remove unit from failed list
@Yetti99 Note, it's generally best to encase a wildcard in quotes, otherwise if you have any matching files in the current directory, it will substitute for them instead.
View ArticleAnswer by mwfearnley for What is the mkdict command and what does it do? (It...
On my system, /usr/sbin/mkdict is a symlink for cracklib-format, which as pointed out in comments, is a simple shell script. It's short enough to post here.#!/bin/sh## This preprocesses a set of word...
View ArticleComment by mwfearnley on Replace an XML attribute's value with the value of a...
Also, it's hard to tell, but the $FLDR is also unquoted, so spaces would also break it.
View ArticleAnswer by mwfearnley for Replace an XML attribute's value with the value of a...
I don't recommend sed in the general case, but this case is perhaps simple enough for it to handle, we just have to watch out for some hazards:if $FLDR contains " then that will break the XML.If $FLDR...
View ArticleComment by mwfearnley on How do I set time and date from the Internet?
I think the main issue with this question is that it doesn't specify which version of Unix or Linux is being used, and the correct answer is going to depend on that. The accepted answer seems to assume...
View ArticleComment by mwfearnley on Show the year while listing files in the current...
The OP's ls -al probably had the same behaviour (choosing the year or time depending on how far into the future/past it is), only with modified rather than created times.
View ArticleAnswer by mwfearnley for Porting Linux date parsing to FreeBSD
You can parse a date in a specific format in FreeBSD using:date -j -f "$input_fmt" "$input_date" +"$output_fmt"According to the date manpage:-jDo not try to set the date. This allows you to use the -f...
View Article