I typically do:
tar -czvf my_directory.tar.gz my_directory
What if I just want to include everything (including any hidden system files) in my_
function tar.create() { local folder="${1}" local tar="$(basename "${folder}")".tar.gz cd "${folder}" && tar -zcvf "../${tar}" .; cd - &> /dev/null }
Example:
tar.create /path/to/folder
You are welcome.