Skip to content

Instantly share code, notes, and snippets.

@navinthenapster
Last active December 26, 2022 18:30
Show Gist options
  • Select an option

  • Save navinthenapster/ce8f7bb2e14a1697074e9b3a4f5d91cd to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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
Copy Markdown
Author

Don't Forget to delete the history

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

@Mashmeyti
Copy link
Copy Markdown

Hey

@navinthenapster
Copy link
Copy Markdown
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