Search notes:

Shell command: truncate

truncate resizes a file to a given size.

Options

-c --no-create Do not create any files
-o --io-blocks Treat SIZE as number of IO blocks instead of bytes.
-r --reference =FILE resize to size of FILE
-s --size =SIZE Resize to SIZE.

SIZE

SIZE can be prefixed with
+, - Relative resizing (i. e. extend by or shrink by)
<, > At most, at least
/, % round down/up to multiple of
SIZE can be suffixed with the standard suffixes KB, K, MB, MYB and Y

See also

Shell commands such as dd or touch

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1758200620, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/truncate(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78