In tcsh, I have the following script working: What is the equivalent to the tcsh setenv function in Bash? Is there a direct analog? The environment variables are for locating the executable. Answer export VAR=value will set VAR to value. Enclose it in single quotes if you want spaces, like export VAR=’my val’. If you want the variable to be
Tag: unix
ELF file headers
A quick question about elf file headers, I can’t seem to find anything useful on how to add/change fields in the elf header. I’d like to be able to change the magic numbers and to add a build date to the header, and probably a few other things. As I understand it the linker creates the header information, but I
Combining values from different files into one CSV file
I have a couple of files containing a value in each line. EDIT : I figured out the answer to this question while in the midst of writing the post and didn’t realize I had posted it by mistake in its incomplete state. I was trying to do: and was getting a weird output. I later realized that was happening
How to generate a core dump in Linux on a segmentation fault?
I have a process in Linux that’s getting a segmentation fault. How can I tell it to generate a core dump when it fails? Answer This depends on what shell you are using. If you are using bash, then the ulimit command controls several settings relating to program execution, such as whether you should dump core. If you type then
How do you kill all Linux processes that are older than a certain age?
I have a problem with some zombie-like processes on a certain server that need to be killed every now and then. How can I best identify the ones that have run for longer than an hour or so? Answer If they just need to be killed: If you want to see what it’s matching The -i flag will prompt you