Questions tagged [units]

For questions about the command-line unit converter.

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 views

Starting user units from custom path

I have successfully enabled user units in RHEL 8 under ~/.config/systemd/user directory. Enabling linger also gives me the option to start the service without having to login. My question, is it ...
Casper Netherlands's user avatar
1 vote
1 answer
1k views

Mounting options with Systemd Mount Units

I used to use the fstab file for mounting drives. This time i wanted to use Units instead and created a .mount file. However i wonder how i would set a file system check option and umask settings ...
Noobman's user avatar
  • 63
0 votes
1 answer
233 views

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 ...
Michael's user avatar
0 votes
1 answer
36 views

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 ...
ser356's user avatar
  • 58
2 votes
1 answer
2k views

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 ...
0__'s user avatar
  • 694
0 votes
2 answers
37 views

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 ...
Haterind's user avatar
  • 169
1 vote
1 answer
71 views

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 ...
Metamorphic's user avatar
  • 1,179
2 votes
1 answer
3k views

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 ...
Bret Joseph's user avatar
-1 votes
1 answer
558 views

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 / ...
iago-lito's user avatar
  • 2,751
4 votes
0 answers
2k views

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 protected]) but not ...
Worried in Denver's user avatar
4 votes
4 answers
7k views

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 ...
jackluo923's user avatar
4 votes
1 answer
16k views

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'. ...
Norman's user avatar
  • 41
2 votes
0 answers
1k views

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 ...
Guillaume's user avatar
  • 121
2 votes
1 answer
820 views

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 ...
gunslingor's user avatar
1 vote
3 answers
1k views

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 ...
Varludea's user avatar
5 votes
1 answer
1k views

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 ...
Nathaniel M. Beaver's user avatar
1 vote
0 answers
73 views

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 ...
Petr Skocik's user avatar
  • 28.9k
173 votes
20 answers
88k views

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 ...
Peter.O's user avatar
  • 32.9k
286 votes
18 answers
313k views

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 /...
xenoterracide's user avatar