Skip to content
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

truncate.1: Minor polish #1568

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

concussious
Copy link
Contributor

@concussious concussious commented Jan 7, 2025

I was studying this manual and noticed some possible improvements.

  • Rewrite the document description to fit in one std. cons. line, adding "resize" to the keywords, removing only "length" as a keyword, which I find implausible.

  • Switch to human readable ls output for examples. This makes them fit on standard console, and makes it easier to understand since the example operations are in megabytes already.

  • Improve English and roff grammar, eliminating a linter warning and improving rapid reader comprehension.

  • Remove prompt from an example which has it, to create consistency with the rest of them.

  • Tag spdx

Cc @mhorne, @sergio-carlavilla

+ add `resize` to description (search keywords)
+ remove redundant `the length of`, duplicate `files` and `truncate`
+ description is now one line on standard console
+ fold a line to eliminate linter warning + tag spdx

MFC after:	3 days
+ switch examples to human readable sizes, with consistent spacing
+ `Downsize ... in 5 Megabytes` >> `Downsize ... by 5 Megabytes`
+ remove prompt from lone example with prompt for consistency
+ examples now fit on standard console without wrapping

MFC after:	3 days
@concussious concussious changed the title truncate.1: Polish truncate.1: Minor polish Jan 7, 2025
Comment on lines -35 to +37
.Nd truncate, extend the length of files, or perform space management in files
.Nd resize, extend, or perform space management in files
Copy link
Member

Choose a reason for hiding this comment

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

"truncate" and "extend" are opposites. But "extend" operations are a subset of "resize". I like the old wording better. If you're going to switch to "resize", you should eliminate "extend".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Is extend a reasonable search keyword? If we're willing to drop them, how's

truncate(1) -- manage disk space in files

Copy link
Member

Choose a reason for hiding this comment

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

I probably also prefer the older text, but the old text is also kind of buggy, it should be more like:

.Nd truncate or extend the length of files, or manage file space

Alternatively I think what Alan was suggesting might be:

.Nd resize files or manage file space

"manage backing store for files" might be a more accurate description, but "manage disk space for files" is pretty close to that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow, manage backing store for files is absolutely the best one and tells me everything without creating any false ideas!

-r-xr-xr-x 1 root wheel 31352552 May 15 14:18 /boot/kernel/kernel*
-rw-r--r-- 1 root wheel 31352552 Jul 22 19:15 test_file
-rw-r--r-- 1 root wheel 31352552 Jul 22 19:15 test_file2
ls -lh /boot/kernel/kernel test_file*
Copy link
Member

Choose a reason for hiding this comment

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

The -h is a nice improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants