Skip to content

Fix example and language in manpage #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2025
Merged

Fix example and language in manpage #636

merged 2 commits into from
Mar 20, 2025

Conversation

mb720
Copy link
Contributor

@mb720 mb720 commented Oct 29, 2023

Hi and thanks a lot for rmlint!

I'd like to offer some improvements for the manpage.

It's mostly typo fixes and attempts to make the manpage easier to read.

But I think I also spotted an error in the examples. In the old version, rmlint -e was described as

Find duplicates with same basename (excluding extension)

Yet I'm pretty sure that option -b does that, whereas -e makes rmlint consider two files as duplicates only if their extensions match.

This command makes ``rmlint`` exit with one of the following exit codes:

* 0: files are reflinks
* 1: files are not reflinks
* 3: not a regular file
* 4: file sizes differ
* 5: fiemaps can't be read
* 6: file1 and file2 are the same path
* 6: file1 and file2 are at the same path
Copy link
Contributor

@cebtenzzre cebtenzzre Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this change. This status is for when the two paths provided are literally the same path after resolving symlinks, hence no data needs to be looked at. Maybe we could say "have the same path", but I'd have to think about it - technically, no two files can have the same path, because that would mean they're the same file.

Copy link
Contributor Author

@mb720 mb720 Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "path1" and "path2" are more suitable argument names. Then this could read:

6: path1 and path2 point to the same file (after resolving symlinks)

Come to think of it, this sounds reasonable as well:

6: file1 and file2 are the same (after resolving symlinks)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, "the same file" is ambiguous here, because it could be taken to mean "the same inode." But that's a hardlink - two different paths that point to the same file. The paths themselves are equal after resolving symlinks in this case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just explain more explicitly in the same way as we do in this discussion?
Like:
* 6: resolved absolute paths of file1 and file2 are identical

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find that still a bit confusing: what is the actual state it should explain?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file1 is file2 (same path) or
file1 is a symlink to file2 or
file2 is a symlink to file1 or
file1 and file2 are symlink to the same file3

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they are not symlink to each others ;)

vt@luga ~/dev/contrib/rmlint% ls -l b c
lrwxrwxrwx 1 vt vt 1 Mar  3 20:19 b -> c
lrwxrwxrwx 1 vt vt 1 Mar  3 20:19 c -> b
vt@luga ~/dev/contrib/rmlint% rmlint --is-reflink b c
ERROR: lib/utilities.c:1167: rm_util_link_type: Error opening /home/vt/dev/contrib/rmlint/c: Too many levels of symbolic links

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And status 9 (RM_LINK_SYMLINK) seems not possible to happen in that case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RayOei what do you think should be the right formulation ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your suggestion is fine.

@@ -268,7 +268,7 @@ General Options

The letter may also be written uppercase (similar to ``-S /
--rank-by``) to reverse the sorting. Note that ``rmlint`` has to hold
back all results to the end of the run before sorting and printing.
back all results till the end of the run before sorting and printing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a native speaker of English, but it seems to me that until sounds better than till in this sentence and the formal style of a manual page.
What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not native either. But from my understanding both are fine, albeit until is a bit more formal and would therefore fit a bit better in manual, I think.

while ``apple.png`` and ``peach.png`` won't. The comparison is case-insensitive.

:``-n --newer-than-stamp=<timestamp_filename>`` / ``-N --newer-than=<iso8601_timestamp_or_unix_timestamp>``:

Only consider files (and their size siblings for duplicates) newer than a
certain modification time (*mtime*). The age barrier may be given as
seconds since the epoch or as ISO8601-Timestamp like
seconds since the epoch or as an ISO8601 timestamp like
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO 8601-formatted timestamp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or ISO 8601 formatted timestamp, whichever looks better to you.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 8601-formatted is unnatural in English.
The more common phrasing would be a timestamp formatted according to ISO 8601


Available options:

- *iso8601=[true|false]:* Write an ISO8601 formatted timestamps or seconds
- *iso8601=[true|false]:* Write ISO8601-formatted timestamps or seconds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that answers my question above ;)
I feel like it would be more accurate with a space after ISO though. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above 😁

This command makes ``rmlint`` exit with one of the following exit codes:

* 0: files are reflinks
* 1: files are not reflinks
* 3: not a regular file
* 4: file sizes differ
* 5: fiemaps can't be read
* 6: file1 and file2 are the same path
* 6: file1 and file2 are at the same path
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just explain more explicitly in the same way as we do in this discussion?
Like:
* 6: resolved absolute paths of file1 and file2 are identical

The gui has its own set of options, see ``--gui --help`` for a list. These
should be placed at the end, ie ``rmlint --gui [options]`` when calling
it from commandline.
The GUI has its own set of options, see ``--gui --help`` for a list. These
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why two spaces after dot ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, I presume?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, I presume?

Yeah, but in the original version there was only one, and the two spaces appeared multiple times over the document. So maybe I thought that was a formatting of some sort.

@vassilit vassilit merged commit 01f5aad into sahib:master Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants