Skip to content

Instantly share code, notes, and snippets.

@phase7
Last active August 13, 2020 08:54
Show Gist options
  • Save phase7/3246665bab403fccf190ad661ed179d6 to your computer and use it in GitHub Desktop.
Save phase7/3246665bab403fccf190ad661ed179d6 to your computer and use it in GitHub Desktop.
This function goes to the ~/.bashrc file, and enables copying of absolute path of a folder/file to the clipboard. (requires xclip)
copy_abspath() { realpath $1 | tr -d '\n' | xclip -selection clipboard; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment