I would like to use the linux command line tool ack
but there is one thing stopping me from using it and that is that I cannot figure out how to tell it where to start searching from. I would like to start to replace my complex find
/xargs
/grep
commands with ack
but if I cannot tell it where to start to search from I cannot use it.
For instance I am running a simulation in one directory but I would like to tell ack
to search a code library from somewhere else without having to change to that directory to invoke ack
.
Use the "-f" switch to see a list of files that ack will search for you. If you want ack to search files that it doesn't recognize, use the "-a" switch. If you want ack to search every file, even ones that it always ignores like coredumps and backup files, use the "-u" switch.
Navigate directories. Open a window, double-click on a folder, and then double-click on a sub-folder. Use the Back button to backtrack. The cd (change directory) command moves you into a different directory.
You can use combination of ls command, find command, and grep command to list directory names only. You can use the find command too.
You can provide the directory as an argument; only if you give it zero arguments past your pattern will it look in the current directory instead of where you ask it.
ack MySymbol ../src
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With