Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
Loop through results of find
find | while read directory; do $directory; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment