bash
echo "$PWD"Navigate Linux paths efficiently with cd, pushd/popd, globbing, basename, dirname, and canonical path tools.
echo "$PWD"basename /var/log/nginx/access.logdirname /var/log/nginx/access.logrealpath --relative-to=/var/log /var/log/nginx/access.logls *.txtshopt -s globstar && ls **/*.logmkdir -p project/{src,tests,docs}Change directory and push previous one onto stack.
pushd /etc/nginxPop top directory from stack and change to it.
popddirs -cUse NUL delimiters for filenames with spaces/newlines.
find . -type f -print0 | while IFS= read -r -d '' f; do printf '%s
' "$f"; doneResolve a relative path from current directory.
realpath ./scripts/deploy.sh[[ -e /etc/hosts ]] && echo exists