Skip to content

Tag: linux

What is the best practice for kdump disk size

We have a redhat 6 servers and memory is around 64GB, we are planing to configure kdump and I am confused about disk size I should set. Redhat suggest it would be memory + 2% more (that means around ~66GB Disk space). I need your suggestion what would be the best size I should define for kdump. Answer First, …

How to get the .config from a Linux kernel image?

I have a Linux kernel image in elf format and I want to find out what .config file was used to build this kernel. When I do an objdump of the image, I see a section called kernel_config_data that contains text but does not look like the config file. Is there a way to retrieve this information? Answer Assuming…

What’s the correct way of installing jdk on linux

I am running the debian based Crunchbang linux system and i want to install the Oracle JDK (not openjdk) on my system. I’ve spent some time to google for it, but i was not able to find a clear description of how to install (and configure) it. So here are my questions: WHERE is the correct/best location …

Advantage of $PATH over alias

I am relatively new to Linux and Unix. With the help of the internet I finally figured out how $PATH and aliases in my .bashrc work. But I really couldn’t find anything that describes when to use which. Let’s say I installed Python3.3 in Library/Frameworks and the executable is /Library/Frameworks…

Mutex lock threads

Am new to multi threaded/processs programming. So here’s what I need to clarify. Process A code With the above pseudo code, is process B able to access sharedResource if mutex is not unlocked? How can I access the sharedResource from process B correctly? Any there any clear visual diagram that explains …

Build .so file from .c file using gcc command line

I’m trying to create a hello world project for Linux dynamic libraries (.so files). So I have a file hello.c: How do I create a .so file that exports hello(), using gcc from the command line? Answer To generate a shared library you need first to compile your C code with the -fPIC (position independent c…

How to get file creation date/time in Bash/Debian?

I’m using Bash on Debian GNU/Linux 6.0. Is it possible to get the file creation date/time? Not the modification date/time. ls -lh a.txt and stat -c %y a.txt both only give the modification time. Answer Unfortunately your quest won’t be possible in general, as there are only 3 distinct time values …