Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

clear log file space linux

find /var/log -type f -delete
Comment

linux bash clear log file space

# Run as root, of course.
# For sh shells:
cd /var/log
: > messages
: > wtmp
echo "Log files cleaned up."

# For bash shells:
cd /var/log
> messages
> wtmp
echo "Log files cleaned up."

# This is a better version, does the same thing, less redundancy.

# visit this link for detailed explanation:
https://superuser.com/questions/849413/why-would-you-cat-dev-null-var-log-messages
Comment

clear log file space linux

find /var/log -type f -regex ".*.gz$"
find /var/log -type f -regex ".*.[0-9]$"
Comment

PREVIOUS NEXT
Code Example
Shell :: git pull from another branch 
Shell :: linux file path 
Shell :: create new branch without losing changes 
Shell :: find unix 
Shell :: substring in shell script 
Shell :: yarn add @materialui 
Shell :: bash script getopts no argument 
Shell :: ubuntu spotify 
Shell :: env npm 
Shell :: how to use zsh on mac 
Shell :: apt install xfce 
Shell :: send giphy on slack 
Shell :: src refspec main does not match any 
Shell :: zsh fzf plugin 
Shell :: how to create a group in linux 
Shell :: virtualbox guest additions ubuntu 20.04 install 
Shell :: how to kill local server in ubuntu by command 
Shell :: install pandas 
Shell :: bash kill all terminal 
Shell :: multi line comment in bash shell 
Shell :: chokidar npm 
Shell :: git remove folder from repository 
Shell :: how to pull from original repository upstream 
Shell :: psycopg2-binary install for M1 
Shell :: unrachive .tar.gz 
Shell :: wine ubuntu 
Shell :: install yarn fedora 
Shell :: remove spaces from file names bash 
Shell :: how to rename origin in git 
Shell :: vendor/autoload.php download 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =