Have the possibility to change to column order and column widths of the output with an argument like this:
--columns "t u p10.(P) e f30.30"
User Goals
Often the filepaths and/or process names are very wide, and the total output gets hard to read.
I help myself with piping into sed and doing some custom find and replace to shorten filepaths.
But it would be desirable if one could do output customization in fatrace itself in a convenient fashion
Principles
Letters correspond to column-names.
Numbers immediately after letter means to truncate that column to that length
Special number 0 means: Use the remainder of the available width (if the Terminal defines it).
Default truncation: Leave that amount of characters and then cut off the end of the string, with no cutoff character.
p10 would shorten like this: "Plex Media Server" → "Plex Media…"
Use dots to specify how the truncation is performed
After the number like p10. means cut off the start of the string:
"Plex Media Server" → "Plex Media…"
Before the number like p.10 means cut off the end of the string:
"Plex Media Server" → "…dia Server"
Between two numbers like f30.30 means to leave the first 30 characters, then show a elipsis "………", then "leave last 30 characters, example:
Full column: /srv/disk-id/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
Shortened to: /srv/disk-id/Plex/Library/Appl…………com.plexapp.plugins.library.db
All characters other than A-Z, a-z, 0-9 and . are literals (whitespaces, punctuation, special symbols like #, • or ;
The column order is defined simply by how you order the column letters within that formatting string.
If you have a t in there but no --timestamp argument the default timestamp format is used.
Explanation of --columns "t u p10.(P) g10.(G) e f30.30"
t means timestamp, at full length, because no number is added.
Note that you can also format the timestamp itself with #13
u means username, at full length, because no number is added.
The -u --user flag itself is also a feature request, see #16
U is the numerical user id, I did not insert it in my custom column layout as I do not need it.
p means processName, truncated to 10 characters, cut off the end of the string (as the dot is right of the column name). Omitting the dot would have the same effect here, as cutting off the end of the string is the default cutoff.
( is a literal bracket
P is the numerical process ID. You could also cutoff here. Makes little sense to me. But maybe there are applications to this.
) is a literal bracket
g10.(G) is the same formatting as for p10.(P) but now for g group-name and G group-id.
p/P being consistent with u/U and p/P: The uppercase variant being the numerical representation.
e the file event(s). Cutoff numbers are ignored. These are any how only 1-2 single capital letters.
f is the filepath, 30.30 means to leave the first 30 characters, then show a elipsis "………", then "leave last 30 characters. Using the special width number 0 which means, cut it to the remainder of the available terminal width.
Feature Request
--columns "t u p10.(P) e f30.30"
User Goals
Principles
0
means: Use the remainder of the available width (if the Terminal defines it).p10
would shorten like this: "Plex Media Server" → "Plex Media…"p10.
means cut off the start of the string:p.10
means cut off the end of the string:f30.30
means to leave the first 30 characters, then show a elipsis "………", then "leave last 30 characters, example:/srv/disk-id/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
/srv/disk-id/Plex/Library/Appl…………com.plexapp.plugins.library.db
A-Z
,a-z
,0-9
and.
are literals (whitespaces, punctuation, special symbols like#
,•
or;
t
in there but no--timestamp
argument the default timestamp format is used.Explanation of
--columns "t u p10.(P) g10.(G) e f30.30"
t
means timestamp, at full length, because no number is added.u
means username, at full length, because no number is added.U
is the numerical user id, I did not insert it in my custom column layout as I do not need it.p
means processName, truncated to10
characters, cut off the end of the string (as the dot is right of the column name). Omitting the dot would have the same effect here, as cutting off the end of the string is the default cutoff.(
is a literal bracketP
is the numerical process ID. You could also cutoff here. Makes little sense to me. But maybe there are applications to this.)
is a literal bracketg10.(G)
is the same formatting as forp10.(P)
but now forg
group-name andG
group-id.p/P
being consistent withu/U
andp/P
: The uppercase variant being the numerical representation.e
the file event(s). Cutoff numbers are ignored. These are any how only 1-2 single capital letters.f
is the filepath,30.30
means to leave the first 30 characters, then show a elipsis "………", then "leave last 30 characters. Using the special width number0
which means, cut it to the remainder of the available terminal width.