Author

Topic: [linux/ubuntu] looking for bash script: find & delete all *.log files (Read 356 times)

hero member
Activity: 909
Merit: 506
Code:
find /var/log/ -type f -name '*.log' -delete

You can run that on / too, but it might delete more than you expect. Stick to /var/log/, that's where logs should go

thank you so much i'm going to try it.
hero member
Activity: 576
Merit: 514
Code:
find /var/log/ -type f -name '*.log' -delete

You can run that on / too, but it might delete more than you expect. Stick to /var/log/, that's where logs should go
hero member
Activity: 909
Merit: 506
Hi, i'm looking for script to clean up the log files on whole ubuntu file system (all users) as root.
Jump to: