I have a linux server has an ad-hoc wireless network for clients to connect to. Once connected I want users to always be redirected to it’s own web server no matter what URL they type in. The large solution would be to set up a full DNS server (with BIND or equivalent) but that seems like overkill. All I need
In Linux, how do I find find directory with the most subdirectories or files? [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question How can I find the directory with the largest number of files/subdirectories in it on the system? Obviously the clever answer is /, but that’s not what I’m
How to programmatically check for connection?
In Linux (Ubuntu), I want to programmatically check if there is Internet connection (or if eth0 is connected). I’m doing this because I am writing a program that requires network connection on a system that is highly prone to lose connection. So I was thinking maybe a script that I can run periodically to check. Can you give me good
How to add a cron job in linux [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question I am using sphinx for searching. I get new data everyday which is added in the database. I have to add this data into the sphinx search index
Teamcity build agent in disconnected state
I am running teamcity on Linux server, and it was working completely fine. Once I reboot the server machine and it stopped working. I managed to start the teamcity server using runAll.sh command, but the build agent stays in “disconnected” state. The inactivity reason is being shown as ‘server shutdown’. I tried to start the agent using ‘agent.sh stop’ and
How to print the address of a function?
I let gcc compile the following example using -Wall -pedantic: I get: Line 5 made my change the code like in line 6. What am I missing to remove the warning when printing a function’s address? Answer This is essentially the only portable way to print a function pointer.
How to debug the network stack in linux
I am trying to inject a packet into the network using raw sockets, but somehow can’t seem to get a receiver to capture this packet. How do i check whether the packet is being dropped by the linux network stack? Could someone point out some tools for doing this? Answer I don’t know about accessing the network stack directly (not
Grep inside all files created within date range
I am on the Ubuntu OS. I want to grep a word (say XYZ) inside all log files which are created within date range 28-may-2012 to 30-may-2012. How do I do that? Answer This is a little different from Banthar’s solution, but it will work with versions of find that don’t support -newermt and it shows how to use the
Trouble on state FIN_WAIT_1
recently i’ve got some port holding on FIN_WAIT_1 state till two days later. The target port is used by one server process ever and client connect to the server process through this port. The situation is we stopped the server process, and obviously some client is still connecting with the server at that moment. From my understanding, the server process
Best program for syncing between Windows 7 Client and Linux Server
I work and develop PHP/MySQL on a Windows 7 Client. With xampp its simple to use and test. But since in my actuall project, I need some linux only features, I want to test my code in a virtualbox (Ubuntu Server). Now I am looking for a good way to keep my sourcecode in sync on both – client and