difference between cat and systemctl cat

Issues related to applications and software problems
Post Reply
knzzz
Posts: 157
Joined: 2017/02/25 12:41:42

difference between cat and systemctl cat

Post by knzzz » 2018/06/02 12:02:19

Hi Team,

Can any one tell the difference between cat and systemctl cat xyz.txt

Regard
Kanna

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: difference between cat and systemctl cat

Post by jlehtone » 2018/06/02 12:23:51

https://www.digitalocean.com/community/ ... he-journal
A unit file contains the parameters that systemd uses to manage and run a unit. To see the full contents of a unit file, type:

Code: Select all

systemctl cat nginx.service

The normal cat assumes that you give a path to a file.

Code: Select all

cat foo
expects thus to find the 'foo' from current directory.

The unit files are on multiple locations. The systemctl knows where. It's cat command is not a generic cat; it is for looking at unit files.

Post Reply