FreeBSD Bugzilla – Attachment 258146 Details for
Bug 273997
truncate 1 EXAMPLE incorrect description
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
refactored patch
truncate.1.diff (text/plain), 2.05 KB, created by
Maxim Konovalov
on 2025-03-01 02:29:06 UTC
(
hide
)
Description:
refactored patch
Filename:
MIME Type:
Creator:
Maxim Konovalov
Created:
2025-03-01 02:29:06 UTC
Size:
2.05 KB
patch
obsolete
>diff --git a/usr.bin/truncate/truncate.1 b/usr.bin/truncate/truncate.1 >index 649749ddf255..1fa7b6f028e6 100644 >--- a/usr.bin/truncate/truncate.1 >+++ b/usr.bin/truncate/truncate.1 >@@ -27,7 +27,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" >-.Dd August 19, 2021 >+.Dd February 28, 2025 > .Dt TRUNCATE 1 > .Os > .Sh NAME >@@ -188,14 +188,14 @@ and continue processing the remaining arguments. > .Sh EXAMPLES > Adjust the size of the file > .Pa test_file >-to 10 Megabytes but do not create it if it does not exist: >+to 10 megabytes but do not create it if it does not exist: > .Bd -literal -offset indent >-truncate -c -s +10M test_file >+truncate -c -s 10M test_file > .Ed > .Pp > Same as above but create the file if it does not exist: > .Bd -literal -offset indent >-truncate -s +10M test_file >+truncate -s 10M test_file > ls -l test_file > -rw-r--r-- 1 root wheel 10485760 Jul 22 18:48 test_file > .Ed >@@ -208,18 +208,28 @@ with the same size: > .Bd -literal -offset indent > truncate -r /boot/kernel/kernel test_file test_file2 > ls -l /boot/kernel/kernel test_file* >--r-xr-xr-x 1 root wheel 31352552 May 15 14:18 /boot/kernel/kernel* >+-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 > .Ed > .Pp >-Downsize >+Increase the size of the file > .Pa test_file >-in 5 Megabytes: >+by 5 megabytes but do not create it if it does not exist: > .Bd -literal -offset indent >-# truncate -s -5M test_file >+truncate -s +5M test_file > ls -l test_file* >--rw-r--r-- 1 root wheel 26109672 Jul 22 19:17 test_file >+-rw-r--r-- 1 root wheel 36595432 Sep 20 19:17 test_file >+-rw-r--r-- 1 root wheel 31352552 Sep 20 19:15 test_file2 >+.Ed >+.Pp >+Reduce the size of the file >+.Pa test_file >+by 5 megabytes: >+.Bd -literal -offset indent >+truncate -s -5M test_file >+ls -l test_file* >+-rw-r--r-- 1 root wheel 31352552 Jul 22 19:19 test_file > -rw-r--r-- 1 root wheel 31352552 Jul 22 19:15 test_file2 > .Ed > .Sh SEE ALSO
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273997
:
245092
|
258011
| 258146