Our entire code base at work is housed on an IIS Windows environment. My task was to copy the code to our new Linux Ubuntu server and go through the code to make the changes necessary to get it to run on the Linux box. It took a couple months but it works. In the meantime, code updates were made
Under Linux, can recv ever return 0 on UDP?
I’m just cleaning up some code we wrote a while back and noticed that for a udp socket, 0 is being treated as the connection closed. I’m quite sure this was the result of porting the same recv loop from the equivalent tcp version. But it makes me wonder. Can recv return 0 for udp? on tcp it signals the
how to intercept calls to the file systems
I am interested in intercepting all system calls related to the file system and instead having my own code run. For example, calls to creat, write, close, lseek, getcwd, etc. My goal is to create a function like execve that captures all file I/O from the spawned program to an in memory filesystem managed by the calling process. This way
Get file from ubuntu server
I have an Ubuntu server running with DB backups. How to get the backups? I am using a *.pem file to login. I have been trying mail with mailx. I execute the command but without success. I get no error messages I am aware of that this is without attachments. How to get this working? With wget do I need
Is there any way I can use ‘nmap’ port scanner, to generate and output result on my Django App
I’m trying to create some network app in Django, and what I would like to ask: Is it possible to do something like this: Client type IP address, than server scans it with ‘nmap’, after that the result passed to the Django app, and than I do whole bunch of stuff with it. Just want to know is it possible
error in clone system call sentence in c++
I am trying to to run c code in c++ which uses clone inside , I got an error which I couldn’t solve it , anyone used clone in c++ before , and can help . my code: and i got the errors: dell@ubuntu:~$ g++ n.cpp -o n n.cpp: In function ‘int main()’: n.cpp:40:62: error: invalid conversion from ‘int ()()’
what does $* mean in a shell script
What does $* exactly mean in a shell script? For example consider the following code snippet Answer It means all the arguments passed to the script or function, split by word. It is usually wrong and should be replaced by “$@”, which separates the arguments properly.
Reading username and password from file
I’m looking at a away of reading the username and password of a file and inputing those to either add user or delete user. EG: I have a file named ‘userlist’ with the following content with this format: What I don’t understand completely is how to use BASH script to add these accounts. What I have so far is this:
java application and x11 forwarding
I need to start jperf on virtual server. I configured X11 forwarding via ssh. xclock – is working. But if I start jperf I get: user@client-32:~/sandbox/jperf-2.0.2$ sh jperf.sh Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77) at net.nlanr.jperf.JPerf.(Unknown Source) java version: java version “1.7.0_03” OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3) OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
How to recover after deleting the symbolic link libc.so.6?
In our server the symbolic link to libc.so.6 has been deleted. Now none of the binaries in the system work. To fix this, I tried: which, as expected, gives me: I also tried: with the same result. Further unsuccessful attempts include cp, mv, cat. I’m connected via ssh and I believe I will not be able to open another session