I need a script to identify the files opened a particular process on linux
To identify fd :
>cd /proc/<PID>/fd; ls |wc –l
I expect to see a list of numbers which is the list of files descriptors' number using in the process. Please show me how to see all the files using in that process.
Thanks.
...
Hello,
I am trying to access a samba drive over ssh. I have a windows machine with a samba drive to connect to my linux vm drive, I also run cygwin on the windows machine. What I am trying to do is from my linux vm ssh into the windows cygwin side and cd into the samba drive which connects back into my linux directory.
When I am in cyg...
Hello,
I'm working with OpenCV on a beagleboard with ubuntu and OpenCV 1.1 interfaced via Python. I'm trying to set something up to capture a feed from a UVC compatible webcam (logitech C250). I have tested the webcam with luvcview and it works but only if I set the input format to YUV. If I run it in 'normal' mode I am getting back j...
Hi all
I have a std::map< std::string, std::string> cont;
I want to see cont[ "some_key" ] in gdb. When I'm trying
p cont[ "some_ket" ]
I'm getting this message: One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
I'm using GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh). Thanks
...
Recently, i began developing a driver of an embedded device running linux.
Until now i have only read about linux internals.
Having no prior experience in driver devlopment, i am finding it a tad difficult to land my first step.
I have downloaded the kernel source-code (v2.6.32).
I have read (skimped) Linux Device Drivers (3e)
I rea...
Hi all
I have a std::map< std::string, std::string> which initialized with some API call. When I'm trying to use this map I'm getting segmentation fault. How can I detect invalid code or what is invalid or any detail which can help me to fix problem? Code looks like this:
std::map< std::string, std::string> cont;
some_func( cont ); //...
Hi folks,
I'm finding it to install pycurl on CentOS 5 quite the mission impossible.
This is the error I'm getting:
>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory
Some help would be beyond amazing. :|
...
I have a server which hosts mywebsite.com
If I try to send mail to [email protected], the MTA is trying to send it to a local host (the mail is managed on a different server). How can I fix this?!
Its a linux server running qmail
Any more info needed please ask
Thanks!
...
I am porting an application which runs as a background service in windows at startup, we are porting the application to linux(SUSE Enterprise server), I'am completely new to linux. Can somebody help me on how to proceed with this. Like
Should I build the linux executable
After builiding the binary, what changes should I make to linux s...
My folder at:
/usr/local/www/.ext_env_vars
has a bunch of files in it that my app needs to read. The user is 'webapp'
So, I changed the perms like so:
chmod -R 400 .ext_env_vars
chown -R webapp.webapp .ext_env_vars
The application can't read these. However, when I chmod 777, they are read by the app. So, it isn't that I have a path...
I want to find files that have "abc" AND "efg" in that order, and those two strings are on different lines in that file. Eg: a file with content:
blah blah..
blah blah..
blah abc blah
blah blah..
blah blah..
blah blah..
blah efg blah blah
blah blah..
blah blah..
Should be matched.
...
I will be writing my first daemon in php and I have a couple really basic questions that I need help with.
What packages need to be
installed on my linux server and
Does anything in PHP need to be
enabled? So far I have gotten this -
http://pear.php.net/package/System_Daemon/download
Where on server do I save my
daemon files?
I hav...
I'm writing a Linux program that currently compiles and works fine on x86 and x86_64, and now I'm wondering if there's anything special I'll need to do to make it work on other architectures.
What I've heard is that for cross platform code I should:
Don't assume anything about the size of a pointer, int or size_t
Don't make assumption...
When searching code for strings, I constantly run into the problem that I get meaningless, context-less results. For example, if a function call is split across 3 lines, and I search for the name of a parameter, I get the parameter on a line by itself and not the name of the function.
For example, in a file containing
...
someFuncti...
I have 2 PCs.
1 Windows XP Pro IP: 192.168.1.102,
2 Fedora 11 with Apache2 server IP: 192.168.1.105.
On my Fedora there is a website which i can browse using localhost/somesite. I want to access that site from my Windows XP. I tried address 192.168.1.105/, 192.168.1.105/somesite but Firefox says "Unable to Connect". I can ping Fedora fr...
I want to open html files from a shell script. I know that Ubuntu has a command x-www-browser that will open the default browser on the system. I also found via some Googling that the command is part of the debian system. I was wondering if the command is available on non debian based distros. If it isn't is there a standard way of openi...
Is there a way to detect the character encoding set in the terminal which is calling my Java program? In Windows I can call the "chcp" tool and parse the output.
But what about in Linux or Mac?
...
So I call this PHP script from the command line:
/usr/bin/php /var/www/bims/index.php "projects/output"
and its output is:
file1 file2 file3
What I would like to do is get this output and feed to the "rm" command but I think im not doing it right:
/usr/bin/php /var/www/bims/index.php "projects/output" | rm
My goal is to delete ...
Hello everybody,
I am trying to read the output of a shell command into a string buffer, the reading and adding the values is ok except for the fact that the added values are every second line in the shell output.
for example, I have 10 rows od shell output and this code only stores the 1, 3, 5, 7, 9, row .
Can anyone point out why i am...
i have made a program in C using the gcc compiler. Right now it has no GUI components. So, I am basically compiling it with makefile and running it in the terminal. I need to deploy it so that the executable is standalone. So, basically I want the executable to have an icon and when clicked start the program in the terminal. Can anyone t...