When I Ctrl C my program on linux I often get output that looks similar to a stack-dump (a crash).
Can I catch the Ctrl-C signal and exit gracefully?
Thanks!
I'm trying to connect to a mobile host connected over a 3G cell router from linux with
ssh [email protected] -p 2200
and all I immediately get is (doesn't even seem to run into a timeout)
ssh: connect to host 74.198.25.220 port 2200: Network is unreachable
However, when I try the same IP on port 2200 with putty on Windows, it presents my with the password prompt just fine as I'd expect.
What's going on here, do I need to increment my ssh timeout period to get this going or what?
Thank you,
Ron
I'm trying to do something like this:
mysqldump --user c1bt3 --password=blah c1bt3 > c1bt{date}.sql
where date is replaced with the current date, i.e. c1bt5-11-10.sql, and I'm trying to do it from a linux shell script.
Any ideas how I can do this?
Hi,
How to properly construct regular expression for "grep" linux program, to find all email in, say /etc directory ?
Currently, my script is following:
grep -srhw "[[:alnum:]]*@[[:alnum:]]*" /etc
It working OK - a see some of the emails, but when i modify it, to catch the one-or-more charactes before- and after the "@" sign ...
grep -srhw "[[:alnum:]]+@[[:alnum:]]+" /etc
.. it stops working at all
Also, it does't catches emails of form "[email protected]"
Help !
Is there a maximum number of inodes in a single directory?
I have a directory of 2 million+ files and can't get an the ls command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit?
*I have two Linux Machine,1st is machine X ,other is machine Y i want to write a java program which will run in machine X..eq test.java ..and when i run that java program it should ask for login credential of machine Y and will execute some command for example
ls -l in machine Y automatically after login. and it should display the output of ls -l
in machine X.
How to do it please help me????*
Is there a way to get DVD region code from command line (linux/ubuntu 9.10)?
I want to script this action and store the region code (and other data about DVD) in a log.
I'm implementing an FTP like protocol in Linux (homework) and I came upon the following problem: the client may be able to connect() and write() before the other side managed to do accept() (but after it did listen()). How can I prevent the write operation from working without relying on passing messages like "accept succeeded, you can write now" in a different communication channel?
Hi, we are doing a flash boot, with an NFS driver from a host
machine mapped as the root directory. How to have that file system in the
flash (flash memory ) itself in linux environment ?
If I use send() on a non-blocking tcp socket in Linux will it return EAGAIN for anything other than a send buffer full condition?
I basically need to decide if I want to use the socket send buffer as the only buffer for my app or if I need my own user space buffer to feed the socket buffer.
Hi everyone,
I've playing around with linux and noticed that for some mysterious reason commands like '/bin/sh ' just will not work. Each time I'm trying to start a process it yields 'cannot execute binary file' error message.
m@sanctuary:~$ sh sed
/bin/sed: /bin/sed: cannot execute binary file
When I first launch sh and try to execute sed, it succeeds.
I'm starting to loose my wits. It would be just great, if somebody could help me.
Thank you.
I'm writing a program to be run from the Linux user space which spawns another process. How can it determine which files were modified by the spawned process after it completes?
I have program that runs fast enough. I want to see the number of threads created by the program.
ldd test
shows use of library pthread. but how to find out number of threads created by the program. I only have command line access to the PC on which the program is run.
The platform is linux.
Hi
I am working with telecom company.I am familiar with java programming language.But now I have a task to write a script , with linux operating systems.I have to write a script for fetching data from other computer and check some conditions. How can I do that using Java. Plz help me.
Thanks.
What are the best practices on writing a cross platform library in C++?
My development environment is Eclipse CDT on Linux, but my library should have the possibility to compile natively on Windows either (from Visual C++ for example).
I see that if we change the HOME(linux) or USERPROFILE(windows) environmental variable and run a python script, it returns the new value as the user home when I tried,
os.environ['HOME']
os.exp
Is there any way to find the real user home directory without relying on the environmental variable?. Thanx.
If the java program is compiled as
javac t1.java a //error contents redirecedt to a,file a.But a doesnt have the error contents
The contents of t1.java is as:
class t1{
public static void main(String[] args) {
System.out.printn("Hello World!"); // Display the string.
}
}
So now there is a error i.e, println is written as print n ,how to capture this error in file a
The command is executed from linux command prompt
Thanks....
The term has several definition according to Wikipedia, however what I'm really interested in is creating a program that has all its needed dependencies included within the source folder, so the end user doesn't need to install additional libraries for the app to install. For example, how Mac apps has all its dependencies all within the program itself already...
or is there a function that autotools does this? I'm programming in the Linux environment...
in windows (using apache as server), my file path directory will be C:\xampp\htdocs\mysvn\PhpDocumentor\phpdoc.php. But what happen with other OS such as linux on APACHE, or IIS on windows, Or other OS i don't know and never use ?
i would like to know to make sure i wrote the bullet proof, file reading via PHP.
Are there any working packages to change a linux user passwords using PHP?
I've tried using PECL:PAM but theres an error when it tries to change the password.
Hello,
I'm using a linux server that display directories in a bold font, and files in a normal font.
e.g. $ ls produces
afile.txt afolder anotherfile.txt anotherfolder
I'd like to use this feature on some other servers. How can it be done? with the .bash_profile?
If anyone has other ideas on how to differentiate folders from file, they'd be good to know?
Hi,
I am using linux, gcc, c.
I have a make file.
I want to debug my module.
How can I do it?
I don't want to debug a single file, I want to debug the whole module.
I'm implementing an FTP-like protocol in Linux kernel 2.4 (homework), and I was under the impression that if a file is open for writing any subsequent attempt to open it by another thread should fail, until I actually tried it and discovered it goes through.
How do I prevent this from happening?
PS: I'm using open() to open the file.
Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window.
Edit
Looking for a solution that works on Linux