Last active
November 2, 2017 14:56
-
-
Save jfhc/9c465a9bb6b634b7289280b726e8a60c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convenience function for cd & ls in one go | |
function cs () { | |
cd "$@" && ls | |
} | |
# Like cs above but using z.sh: https://github.com/rupa/z | |
# Adds in a pwd so you can check z has put you where you expected it to! | |
. /etc/z/z.sh | |
function zs () { | |
z "$@" && pwd && ls | |
} | |
# See the permissions for the given file (which can be specified by a relative path) and all the directories in its absolute path. | |
# Looks like: | |
# $ cd ~/scrap | |
# $ permtree blah.py | |
# f: /home/jfhc/scrap/blah.py | |
# dr-xr-xr-x / | |
# drwxr-xr-x home | |
# drwxr-xr-x jfhc | |
# drwxr-xr-x scrap | |
# -rwxr-xr-x blah.py | |
function permtree() { | |
namei -m $(readlink -f "$@") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment