Skip to content

Instantly share code, notes, and snippets.

@navinthenapster
Last active December 26, 2022 18:30
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save navinthenapster/ce8f7bb2e14a1697074e9b3a4f5d91cd to your computer and use it in GitHub Desktop.
Save navinthenapster/ce8f7bb2e14a1697074e9b3a4f5d91cd to your computer and use it in GitHub Desktop.
To remove the USB Logs files in Ubuntu
# Ubuntu
dmesg
sudo dmesg --clear
sudo cat /var/log/kern.log | grep usb
sudo rm -rf /var/log/kern*
#old log files
sudo zcat /var/log/kern.log.2.gz | grep usb
sudo cat /var/log/syslog | grep usb
sudo rm -rf /var/log/syslog*
cat /dev/null > ~/.bash_history && history -c
@navinthenapster
Copy link
Author

navinthenapster commented Apr 25, 2019

To delete all the log system

sudo rm -rf /var/log/kern* && sudo rm -rf /var/log/syslog*

@navinthenapster
Copy link
Author

Don't Forget to delete the history

cat /dev/null > ~/.bash_history && history -c

@Mashmeyti
Copy link

Hey

@navinthenapster
Copy link
Author

Hey

Hi .. any queries regarding gist post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment