Create a gist now

Instantly share code, notes, and snippets.

Embed
Tricks to remember on the CL

Rename file by replacing old text pattern with new (overwrite existing)

for f in *.txt ; do echo "${f/old/new}"; done

for f in *.txt; do mv "$f" `echo $f | sed s/old/new/\`; done

Find symlink to same inode

find -L / -samefile path/to/file.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment