Category Archives: Linux
check raid status using hpacucli
sudo hpacucli ctrl all show config
crontab restart tomcat8 every 2 hours
* */2 * * * /usr/sbin/service tomcat8 restart > /dev/null
curl witsml GetVersion
checksum file with sha256sum
sha256sum telo.txtoutput : string checksum256nya telo.txt
add ssh key to ubuntu server
ssh-keygen scp /home/system/.ssh/id_rsa_box_contoh user@servertujuan:/home/system di server tujuan :cat /home/system/.ssh/id_rsa_box_contoh > /home/system/.ssh/authorized_keys
ubuntu sudo no need enter password
sudo adduser telosudo usermod -aG sudo telo #check sudo exists on user telogroups telo sudo visudotelo ALL=(ALL) NOPASSWD: ALL
ip tx rx traffic ubuntu
ip -s -h link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 RX: bytes packets errors dropped overrun mcast 251k 1.82k 0 0 0 0 TX: bytes packets errors dropped carrier collsns 251k 1.82k 0 0 0 0 2: ens32: mtu 1500 qdisc noop state… Read More »
gzip file
Compress :gzip nama-fileakan terbuat nama-file.gz, file yg asli terdelete, gunakan -k jika ingin file yg lama tetap ada Compress setiap file didalam folder : gzip -r foldername Decompress :gunzip nama-file.gzorgzip -dk nama-file.gz
running app as service ubuntu
sudo vi /etc/systemd/system/coba.service [Unit] Description=aplikasi coba [Service] User=system WorkingDirectory=/home/system/coba ExecStart=/home/system/coba/coba.sh Restart=always [Install] WantedBy=multi-user.target Reload the service files to include the new service.sudo systemctl daemon-reload Start your servicesudo service coba start To check the status of your servicesudo service coba status To enable your service on every rebootsudo systemctl enable coba To disable your service on… Read More »