Questions tagged [units]
For questions about the command-line unit converter.
Interact with Linux service via SSH
I've rented a server which I access using the Terminus SSH terminal. I've created a program that has prompts and takes input and works as intended when started normally. But I've created a service to ...
Issues creating boot and shutdown systemd daemon
I'm trying to create a config file for my unit but when I start the daemon after enabling and shutdown the computer it doesnt works. The script only executes the ExecStart line after network.target on ...
Gnome (Debian 11): How to install en_DK formats (date, numbers, units)?
I switched my system from Debian 10 to 11 (new computer), so I'm trying to revert to my normal settings. I have installed with en_US locale, which I do want for UI texts, but I need to revert to ISO ...
How to get just the number from units?
The default output of units seems to be a bit verbose: $ units "2 fortnight" seconds * 2419200 / 4.1335979e-07 Suppose I just want the number only, so that I can do things like ...
How do I tell the "units" command to use a different length unit by default?
By default, the GNU units command outputs length units in meters. If I want to use a different unit, I have to specify this manually at the You want: prompt. Is there a way to change the default from ...
What units are the values in /proc/partitions and /sys/dev/block/<block>/size?
I have a sample emmc block info from an android device From /proc/partitions major minor #blocks name 179 1 5120 mmcblk0p1 Using my little intelligence I am assuming /proc/partitions ...
Human-readable `du` with finer grain
I sometimes wish human-readable du -h option to be more fine-grained while still human-readable. Instead of showing: 14G it would show something like: 14G 236M 788k 110b Is there an easy / ...
Polkit rule for systemd template unit files
I'm trying to figure out how to write a polkit rule for a systemd template file. The rule is triggered when I use the actual service that will be instantiated (email@example.com) but not ...
Filesystems Size Single Letter Abbreviation
In many file system related man page, the units are represented by single letters [bBsSkKmMgGtTpPeE]. What do the upper case and lower case mean? I.e. megabyte, megabit, mebiyte, mebibit, which one is ...
systemd // failed with result 'dependency'
I'm quite new to this systemd topic. I have some Units with varios Requires, After and Before. On some Units I got messages like: tinc.service: Job tinc.service/start failed with result 'dependency'. ...
Systemd doesn't start a timer unit
I would like to create a timer that launch a command every 2 months (the first of the month) I already do that with a cron, but I would like to do the same with systemd and get rid of cron. I have a ...
What is wrong with my systemd unit file?
Here is my unit file: [Unit] Description=Backend Service After=mariadb.service Requires=mariadb.service [Service] Type=simple ExecStart=/var/www/html/pythonscripts/Backend.py [Install] Alias=BEd ...
CSV Units Conversion
I've got a CSV file that looks like the following: miami,20,in lansing,2,cm austin,3,mm chicago,5,miles phoenix,2,feet The first field is the name, the next field is the numeric value and the third ...
Logging interactive input and output without capturing all typed input and control characters
I am trying to log output from an interactive command-line program; units, specifically. I have tried using tee like this: units | tee units.log or script like this: script -c units units.log ...
Tool to convert between human-readable byte sizes and bare byte counts [duplicate]
Can you recommend a Unix-style tool that converts between human-readable bytesizes (e.g., 10KiB->10240, 10240->10KiB)? By Unix-style I mean that it should do just this (i.e., be just a simple filter ...
A standard tool to convert a byte-count into human KiB MiB etc; like du, ls1
Is there a standard tool which converts an integer count of Bytes into a human-readable count of the largest possible unit-size, while keeping the numeric value between 1.00 and 1023.99 ? I have my ...
How do you sort du output by size?
How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong. [~]# du -sh /var/* | sort -n 0 /var/mail 1.2M /...