I am often asked how to locate certain strings in a directory path. Most of the time, the user is looking for a string they saved into a file in their home directory. But often they forget which file the string was saved to and only remember parts of the string. I had one user who forgot he saved a control sequence to a hidden file. He only remembered a few characters of the string.
This is only an example and for illustration purposes.
# cd $HOME
# find . -type f | xargs grep -i 43Y
./.futureref:43YJJI16
./mydir1/.controlstrings:43Y1ZHFE
./saved/future/.futureref:43YTHI14
Note: More info on hidden files (Find, Copy or Delete Hidden Files)
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment