How to exclude a directory in find . command

Use the -prune primary. For example, if you want to exclude ./misc: To exclude multiple directories, OR them between parentheses. And, to exclude directories with a specific name at any level, use the -name primary instead of -path.

How can I exclude directories from grep -R?

SOLUTION 1 (combine find and grep) The purpose of this solution is not to deal with grep performance but to show a portable solution : should also work with busybox or GNU version older than 2.5. Use find, for excluding directories foo and bar : Then combine find and the non-recursive use of grep, as a portable solution : SOLUTION 2 (using the –exclude-dir option of grep): … Read more

Curl command for https ( SSL )

if you’re using a self signed certificate on the server, you can use: but be aware that then it’s no better than using non SSL connection to the server, as your communication won’t be secure anymore, enabling all sorts of man in the middle attacks. Though my advice to you is to download the .pem from the … Read more

Python virtualenv questions

Normally virtualenv creates environments in the current directory. Unless you’re intending to create virtual environments in C:\Windows\system32 for some reason, I would use a different directory for environments. You shouldn’t need to mess with paths: use the activate script (in <env>\Scripts) to ensure that the Python executable and path are environment-specific. Once you’ve done this, the command prompt changes to indicate the … Read more

connect Error: “No route to host”

Simply put, a ” No route to host”” would mean that there is no route for the server IP address in the client’s routing table. Are you able to ping the server’s IP address? Most likely you should not be able to and ping should say that the server is not reachable. If so, then … Read more

Why am I getting “undefined reference to main”

Your compiler’s command line contains -I -c sequence. This -I option “swallows” your -c option. -I requires an additional argument, which is an include directory name. You failed to supply that argument, which is why -I assumes that -c that follows it is the directory name. So that -I consumes that -c. The compiler never sees that -c. Without -c it assumes that you want to compile and link your program. Since Gladius.cpp does not have main in it, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)