Lines 27-33
Link Here
|
27 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
27 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 |
.\" SUCH DAMAGE. |
28 |
.\" SUCH DAMAGE. |
29 |
.\" |
29 |
.\" |
30 |
.Dd August 19, 2021 |
30 |
.Dd September 21, 2023 |
31 |
.Dt TRUNCATE 1 |
31 |
.Dt TRUNCATE 1 |
32 |
.Os |
32 |
.Os |
33 |
.Sh NAME |
33 |
.Sh NAME |
Lines 190-196
Link Here
|
190 |
.Pa test_file |
190 |
.Pa test_file |
191 |
to 10 Megabytes but do not create it if it does not exist: |
191 |
to 10 Megabytes but do not create it if it does not exist: |
192 |
.Bd -literal -offset indent |
192 |
.Bd -literal -offset indent |
193 |
truncate -c -s +10M test_file |
193 |
truncate -c -s 10M test_file |
194 |
.Ed |
194 |
.Ed |
195 |
.Pp |
195 |
.Pp |
196 |
Same as above but create the file if it does not exist: |
196 |
Same as above but create the file if it does not exist: |
Lines 213-221
Link Here
|
213 |
-rw-r--r-- 1 root wheel 31352552 Jul 22 19:15 test_file2 |
213 |
-rw-r--r-- 1 root wheel 31352552 Jul 22 19:15 test_file2 |
214 |
.Ed |
214 |
.Ed |
215 |
.Pp |
215 |
.Pp |
|
|
216 |
Incrase the size of the file |
217 |
.Pa test_file |
218 |
by 5 Megabytes but do not create it if it does not exist: |
219 |
.Bd -literal -offset indent |
220 |
# truncate -s +5M test_file |
221 |
ls -l test_file* |
222 |
-rw-r--r-- 1 root wheel 36595432 Sep 20 19:17 test_file |
223 |
-rw-r--r-- 1 root wheel 31352552 Sep 20 19:15 test_file2 |
224 |
.Pp |
216 |
Downsize |
225 |
Downsize |
217 |
.Pa test_file |
226 |
.Pa test_file |
218 |
in 5 Megabytes: |
227 |
by 5 Megabytes: |
219 |
.Bd -literal -offset indent |
228 |
.Bd -literal -offset indent |
220 |
# truncate -s -5M test_file |
229 |
# truncate -s -5M test_file |
221 |
ls -l test_file* |
230 |
ls -l test_file* |