How Do I Create a Zero File Size in Linux?
Contents How Do I Make a File Size Zero in Linux? 5 Ways to Empty or Delete a Large File Content in Linux Empty File Content by Redirecting to Null. … Empty...
Contents
How do I make a file size zero in Linux?
5 Ways to Empty or Delete a Large File Content in Linux
- Empty File Content by Redirecting to Null. …
- Empty File Using ‘true’ Command Redirection. …
- Empty File Using cat/cp/dd utilities with /dev/null. …
- Empty File Using echo Command. …
- Empty File Using truncate Command.
Must Read
How create 1Mb file in Linux?
When You Don’t Care At All About The Contents Of The File
- it is blazingly fast taking around 1 second to generate a 1Gb file (dd if=/dev/zero of=file. txt count=1024 bs=1048576 where 1048576 bytes = 1Mb)
- it will create a file of exactly the size that you specified.