How to give single common address space for all tasks. IF its happening like this can we avoid virtual to physical memory mapping. I f all task sharing common address space then how can we avoid virtual to physical memory mapping. Answer I’m not sure why you would want to disable virtual memory mapping – it’s a built in function
Linux process memory consumption in bytes (not Kbytes)
In Linux is there any way to check processes memory measured on bytes (using top or ps for example). Not in kbytes, but bytes. Thanks in advance! Answer Beyond the obvious answer of multiplying by 1024 (or 1000 if you want to be SI-correct)? AFAIK top, ps etc. get their info from reading /proc/[PID]/status or something equivalent. Which reports info
How to find which type of system call is used by a program
I am working on x86_64 machine. My linux kernel is also 64 bit kernel. As there are different ways to implement a system call (int 80, syscall, sysenter), i wanted to know what type of system call my machine is using. I am newbie to linux. I have written a demo program. getpid() does one system call. Can anybody give
Converting jiffies to milli seconds
How do I manually convert jiffies to milliseconds and vice versa in Linux? I know kernel 2.6 has a function for this, but I’m working on 2.4 (homework) and though I looked at the code it uses lots of macro constants which I have no idea if they’re defined in 2.4. Answer As a previous answer said, the rate at
How to install the program depending on libstdc++ library
My program is written in C++, using GCC on Ubuntu 9.10 64 bit. If depends on /usr/lib64/libstdc++.so.6 which actually points to /usr/lib64/libstdc++.so.6.0.13. Now I copy this program to virgin Ubuntu 7.04 system and try to run it. It doesn’t run, as expected. Then I add to the program directory the following files: libstdc++.so.6.0.13 libstdc++.so.6 (links to libstdc++.so.6.0.13) Execute command: Now
How do I get Ctrl-Backspace to delete a word in vim within gnome-terminal?
I’d like Ctrl-Backspace to delete the current word in vim insert mode. From within xterm I can pull this off via but in gnome-terminal I cannot figure out a way to make it happen. When in vim insert mode, if I type control-v and then press backspace, I get ^H in xterm, and ^? in gnome-terminal. Unfortunately, doesn’t do the
The conventional location for storing my Java libraries and applications in UNIX based systems
I usually store the Java applications and JAR files that I download from the Web in the ~/Java folder on my computer (an OS X machine). I have been doing this since the days when I was a Windows user. However I think in UNIX based systems user local apps are conventionally stored in another directory. I have a feeling
Parsing result of Diff in Shell Script
I want to compare two files and see if they are the same or not in my shell script, my way is: Basically, if they are the same ${diff_output} should contain nothing and the above test would evaluate to true. But when I run my script, it says [: too many arguments On the if [….] line. Any ideas? Answer
How to tell binary from text files in linux
The linux file command does a very good job in recognising file types and gives very fine-grained results. The diff tool is able to tell binary files from text files, producing a different output. Is there a way to tell binary files form text files? All I want is a yes/no answer whether a given file is binary. Because it’s
Installing a Python program on Linux
I wrote a Python program. I would like to add to it an installation script that will set up everything necessary – like desktop icon, entry in the menu, home directory file, etc. I’m working on Linux (ubuntu). When a Python program is installed, what needs to happen in general? I know that it probably depends on the nature of