Bash Snippets
change permission
- -R recursive
# copy user permission to group permission
chmod -R g=u <folder_name>
zip and unzip files
-c
create an archive-z
compress the archive with gzip-x
-v
verbose mode with progress-f
filename
# zip
tar -czvf name-of-archive.tgz /path/to/directory-or-file
# extract
tar -zxf name-of-archive.tgz /path/to/directory-or-file
# Check weather
> curl wttr.in/<location>
Weather report: SanFrancisco
.-. Light rain
( ). +50(44) °F
(___(__) â 9 mph
â â â â 8 mi
â â â â 0.0 in
# Check the download and upload speed
> networkQuality