Adding some functions. Port list and compress files

This commit is contained in:
Brad Ganley 2023-11-02 01:05:55 -05:00
parent 514dd44858
commit db7a01f58e

View File

@ -213,3 +213,13 @@ tere() {
local result=$(command tere "$@") local result=$(command tere "$@")
[ -n "$result" ] && cd -- "$result" [ -n "$result" ] && cd -- "$result"
} }
# Compress files. Like the name says.
function compress_files() {
if [ -z "$1" ]; then
echo "Usage: compress_files <archive_name.zip> <file1> <file2> ..."
else
zip -r "$1" "${@:2}"
fi
}
# See open ports
alias ports='netstat -tuln '