Trang chủ / Chủ đề
Category: Bash
-
Git command for pulling source code of all git projects in a folder (parent)
Git command for pulling source code of all git projects in a folder (parent) ls | xargs -P10 -I{} git -C {} pull ls: liệt…
-
Add an environment variable to Bash or Zsh (MacOS)
Add to Zsh Step 1. Add to Zshrc. Step 2. Apply change Add to Bash Step 1. Add to bash profile Step 2. Apply change
-
Move all files & directories to another directory
Move all files and folders in current folder to sub-folder archives.
-
Kill multiple processes – one line command
> for pid in $(ps -aux | grep 'java' | awk {'print $2'}); do sudo kill -9 $pid; done
-
Ubuntu Crontab (Cron job)
#1. list all current cron jobs > sudo crontab -l #2. edit crontab > sudo crontab -e #3. cronjob format * * * * *…
-
Search large files in Linux
#!/bin/bash if [[ $1 == '' ]]; then echo 'missing directory' exit fi du -a $1 | sort -n -r | head -n 20
-
Some Centos 7 network utilities
Change default outgoing IP sudo ip route change default via 115.79.24.89 List all network interfaces ip a s ip link show ip addr Open route…