Bug 273997 - truncate 1 EXAMPLE incorrect description
Summary: truncate 1 EXAMPLE incorrect description
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL: https://man.freebsd.org/cgi/man.cgi?q...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 11:44 UTC by toxictrash
Modified: 2025-03-07 01:48 UTC (History)
2 users (show)

See Also:


Attachments
Diff for submited bug and new example (1.07 KB, patch)
2023-09-21 11:44 UTC, toxictrash
no flags Details | Diff
truncate.diff (1.10 KB, patch)
2025-02-27 01:41 UTC, Mark Linimon
no flags Details | Diff
refactored patch (2.05 KB, patch)
2025-03-01 02:29 UTC, Maxim Konovalov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description toxictrash 2023-09-21 11:44:01 UTC
Created attachment 245092 [details]
Diff for submited bug and new example

In man 1 truncate in EXAMPLE section instead of "truncate -c -s +10M test_file" the command should be "truncate -c -s 10M test_file".
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-02-27 01:41:27 UTC
Created attachment 258011 [details]
truncate.diff

^Triage: rebase patch.
Comment 2 Maxim Konovalov freebsd_committer freebsd_triage 2025-03-01 02:29:06 UTC
Created attachment 258146 [details]
refactored patch

Hello,

I re-did the patch.  Now it addresses the following issues in the Examples section:

- spells "Megabytes" as "megabytes" consistently

- removes a stray * from the /boot/kernel/kernel listing

- avoids using a shell prompt in the examples consistently

- fixes the size parameter

- adds an example how to increase the file size
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-03-07 01:48:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5460bdda9d4cb3ce1d7431824b6f53c545888b53

commit 5460bdda9d4cb3ce1d7431824b6f53c545888b53
Author:     Maxim Konovalov <maxim@FreeBSD.org>
AuthorDate: 2025-03-07 01:45:21 +0000
Commit:     Maxim Konovalov <maxim@FreeBSD.org>
CommitDate: 2025-03-07 01:45:21 +0000

    truncate.1: improve the example section

    Notably:
     * spell "Megabytes" as "megabytes" consistently;
     * remove a stray asterisk from the /boot/kernel/kernel listing
     * avoid using a shell prompt in the examples consistently
     * fixes the size parameter
     * add an example how to increase the file size

    PR:             273997
    MFC after:      1 week

 usr.bin/truncate/truncate.1 | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)