Skip to content

  • Welcome!
  • Courses
  • Login
  • Sign Up

How to empty a large file quickly?

May 11, 2020May 12, 2020 by GET, posted in Linux

Deleting the contents of a large file is a similar task. All we need to do is utilize the /dev/null and direct it’s contents to the large file.

The following command delete all the contents of the file largefile.img

cat /dev/null > largefile.img 

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
Like Loading...

Related

Tagged featured

Post navigation

Previous postHow to install Oracle VirtualBox on Ubuntu 16.04?
Next postZen of Python
Website Powered by WordPress.com.
  • Reblog
  • Subscribe Subscribed
    • blog.codinggears.io
    • Already have a WordPress.com account? Log in now.
    • blog.codinggears.io
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d