I have a very simple modulefile: And here is my command line: According to the modulefile man page unload module command was supposed to turn all setenv’s to unsetenv but it doesn’t seem to be working. Does anyone know what I might be doing wrong here? More information: For those unfamiliar with m…
How can I exclude directories from grep -R?
I want to traverse all subdirectories, except the “node_modules” directory. Answer 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 exclu…
Why does xargs -L yield the right format, while xargs -n doesn’t?
Consider the following: Why does the -n option yield an incorrect formatting? Just in case, I’m using bash under Ubuntu. Thanks. Answer -L splits by lines; echo doesn’t separate its output by lines but by spaces, so a single ls -l is run and that formats all the columns as a group. -n splits by pa…
ssh-keygen – how to set an rsa key with a certain username
I just installed ubuntu and would like to set its rsa keys up with bitbucket/github. When I ssh-keygen the keys are generated as they should be which is perfectly usable except the username part. In every rsa key I’ve generated previously, the username section read my email address: No, it’s not a…
Does epoll(), do its job in O(1)?
Wikipedia says unlike the older system calls, which operate at O(n), epoll operates in O(1) [2]). http://en.wikipedia.org/wiki/Epoll However, the source code at fs/eventpoll.c on Linux-2.6.38, seems it is implemented with an RB tree for searching, which has O(logN) In fact, I couldn’t see any man page s…
Combining two files in different folders in Linux
I have two set of folders that have files with the same filenames and structure. The folder structure is something like this: So what I need to do is to combine (append) all the files with the same name in these folders (file1.txt with file1.txt etc.) into another file inside the outputfolder. After getting t…
How to connect from USB port to RJ45 console device?
In my Linux laptop, the USB port is connected to an external router with console port (RJ45, Juniper SRX210). This is the cable i am using: I used cuteCom And i used minicom To connect using 9600 but it does not recognize /dev/ttyS0. Also tested with USBViewer (http://www.kroah.com/linux-usb/) which gives err…
How to extract process hierarchy information in linux? [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. I want to write a p…
What do these strace system calls mean?
I need to profile the performance of an application for which I am using strace. However, I do not really know how to interpret the various system calls the strace emits. Examples of a few of them are below: I would be grateful if someone could briefly explain in plain English what these lines from (A) to (F)…
How to clean a data file from binary junk?
I have this data file, which is supposed to be a normal ASCII file. However, it has some junk in the end of the first line. It only shows when I look at it with vi or less –> grep is also saying that it’s a binary file: Binary file data.dat matches This is causing some trouble in my parsing