linux

unix utility that reads files into memory?

I am using Ruby's net-ssh library to remotely execute shell commands. I would like to read a few files into memory rather than simply transfer them via SCP/SFTP. Can can I do this? ...

Determine IP address of CONNECTED interface (linux) in python

On my linux machine, 1 of 3 network interfaces may be actually connected to the internet. I need to get the IP address of the currently connected interface, keeping in mind that my other 2 interfaces may be assigned IP addresses, just not be connected. I can just ping a website through each of my interfaces to determine which one has co...

LDAP authenticating partially. Password being replaced

After a week of struggling to find out why some of our machines are Authenticating off of our LDAP servers and some are not I noticed that after PAM binds to see if the uid exists it then sends the users password. At the packet level, I can see that when I auth on the machines that are working that I see my password come through. When I ...

Making /home folders private in Ubuntu 10.4

How do I stop one user account from being able to read files in another user account. Right now once i log in, I can easily navigate to /home/[username] and copy/read any file. How do I make it thus that only /home/[username]/shared is allowed to be read/copied. I would also like to prevent listing of directories. ...

How do I list one filename per output line in Linux?

I'm using ls -a command to get the file names in a directory, but the output is in a single line. Like this:. .. .bash_history .ssh updator_error_log.txt Is there a built-in alternative to get filenames, each on a new line, like this: . .. .bash_history .ssh updator_error_log.txt ...

Why would connect() give EADDRNOTAVAIL?

I have in my application a failure that arose which does not seem to be reproducible. I have a TCP socket connection which failed and the application tried to reconnect it. In the second call to connect() attempting to reconnect, I got an error result with errno == EADDRNOTAVAIL which the man page for connect() says means: "The specifie...

How to develop Android Apps using a Samsumg Galaxy 5 device?

Hi, I am developing my first Android App. I have an application already running on emulator (Eclipse + Android dev. tools) on Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010. I have already tryied the steps provided on Android Developers Portal on this link, but whenever I try to list my already connected device using ./adb d...

rlwrap: Could not open master pty: No such file or directory

When trying to run rlwrap tclsh I am getting this error message: rlwrap: Could not open master pty: No such file or directory What causes this? How to fix this issue? P.S. I am running 64 bit CentOS. ...

Available properties for a WnckWindow

There are .get_property, .set_property, .get_properties and .set_properties available in the wnck.Window (WnckWindow) class, but what are the available properties one can use here? ...

@ sign after a symbolic link directory in puTTy

in puTTy, what does the @ sign signify when it's right after a directory? ex. pdf/ public_html/ video@ It is a symbolic link, however on another server, the same symbolic link does not have an @ sign after it. ...

usbserial.ko for linux kernel 2.6.29.6

I need usbserial.ko for my linux 2.6.29.6. Anyone knows where to download it and how to integrate it into my current kernel? Thanks. ...

bash script writing shell commands

Why is that some commands require the echo statement but others can simply be written without: #!/bin/bash aptitude upgrade echo "mysql-server-5.1 mysql-server/root_password password $DB_PASSWORD" | debconf-set-selections ...

Linking with --whole-archive flag.

Hi, This problem is related to This question I asked yesterday. Now it seems that the linker flag --whole-archive forces the test object to be included in the binary. However, in linking with, g++ main.cpp -o app -Wl,--whole-archive -L/home/dumindara/intest/test.a -Wl,-no--whole-archive I get the following error: /usr/lib64/gcc/x8...

Upstart init is leaking memory, how do you debug it?

I've got a memory leak in Upstart init process (pid 1), what options I have on debugging it? EDIT: Suggest me some real tools for this, manually putting printfs or calculating memory allocations by hand isn't gonna cut it. Also dumping init core and poking around that is not really an option. UPD1: valgrind doesn't work. Replacing /sbi...

How do I list the output of ps -U root -u root -eo pid in a single line seperated by comma's

when I execute the cmd ps -U root -u root -eo pid I get the output in multiple lines Eg: 1 2 3 4 I would like to see the output in one line as 1,2,3,4,5 ... ...

How to create Package in mono 2.8 its need 'mono.exe'

Hi, I am using "Mono Tools for Visual Studio - 2.8". When I am creating Package of mono it requires 'mono.exe' but it does not exist on my system. How can I get mono.exe OR there is any other way to make Package for the Linux. I want to run my windows application on Linux and Mac. ...

777 permissions for public_html - Internal Server Error on some servers, but not others?

I have a few different servers, and on some servers, I can chmod the public_html folder to 777 permissions without problems - but on other servers, I get error messages. When trying to access the domain I get an Internal Server Error, and in my cpanel error_log on one server I get messages like the following: Fri Oct 08 09:55:39 2010] [...

Linker driving me mad! Please help.

Hi, I have 3 tiny files which I use to make a static library and an app: test.h #ifndef TEST_H #define TEST_H class Test { public: Test(); }; extern Test* gpTest; #endif test.cpp #include "test.h" Test::Test() { gpTest = this; } Test test; main.cpp #include "test.h" #include <iostream> using namespace...

Environment variables in symbolic links

Can we use $HOME or other environment variable in symbolic links? I know about using relative paths ../../.config but sometimes are to many ../ :) something like ~/.config would be more comfortable, or use of $HOME. Edit: habbie's answer with psmears's comment is the answer, sorry my question was incomplete. While (as other answers ...

Linker question..... again.

Possible Duplicate: ld linker question: the --whole-archive option So, What does this linker flag do? --whole-archive And has anyone had trouble with this? If so how to solve it? Thanks for any help. ...