2019. 9. 30.

remove leading zero in bash

remove leading zero in bash

leading=“000100”
no_leading=$((10#$leading))

## no_leading —> 100





September 30, 2019 at 11:03AM

2019. 9. 19.

find by size

find by size

find ./ -type file -size +500M 

option: 
b - 512 block
c - byte
w - two bytes words
k - kilo
M - mega
G - giga

# find and display size. human readable

find ./ -type file -size +500M -exec ls -lh {} \;


September 19, 2019 at 02:22PM

2019. 9. 15.

UFW config ( ubuntu firewall config )

firewall config 

## install 
sudo apt-get install ufw 

## add port 
sudo ufw allow 22
sudo ufw allow 8081
sudo ufw allow 8082

## enable ufw
sudo ufw enable 

## check status
sudo ufw status

## delete allow port

Sudo ufw delete allow 2022   # 2022 allow를 삭제함.