Hi,
I read the man page in Ubuntu Server 10.04 for flock, but I still have questions. The man page gives an example:
(
flock -s 200
-- code to execute under lock ---
) 200>/var/lock/mylockfile
The man page says -s is a shared lock, or read lock, but the default is a write lock. Does the...
I knew this would introduce me to some new things... :-)
I'm confused by wrapped commands and file descriptors. What lock file is used with a wrapped command ? If the writing program uses one locking method, do the reading programs have to use the same method ? If I use file descriptors, do the...
TO: Feherke
Thank you for the many suggestions. I'm running bash 4.1.5. Since I'm running a version that supports mapfile, how should I use locks with mapfile ?
How do I use locks to write files ? Do I use a loop that atomically checks and sets the lock, waits until it's not locked, then...
TO: feherke
Thank you for your help.
I need to process every file, of which there can be tens of thousands, in a folder. I get the file names with:
ls $readPath -1 -S -r -all --time-style=long-iso --group-directories-first > $listFileName
-- snip --
I then read that file into an array...
TO: Mike
Thank you for your reply.
How do I lock and unlock a file in Ubuntu 10.04 Server bash while I read it ? What do I do in the other program that may need to write to a locked file so no data is lost ? Does the other program have to check for a lock, buffer the data if locked, then...
I'm not sure if this is the right place for this question. I'm running Ubuntu Server 10.04 LTS. This machine is continuously acquiring data in real time and adding snippets of data to various of tens of thousands of files. From time to time, I have a bash program read all the files in turn and...
There's an /etc/X11 folder, but it only has xkb and Xsession.d in it.
This is an embedded machine, so the graphics capability is built in. I works fine under Ubuntu 10.04. 'lspci' says it's a VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller...
Forgot to mention...
I turned on verbose in grub. The screen goes blank the instant it finishes booting.
I tried uninstalling acpid -- which I need -- but it didn't make any difference, so I reinstalled it.
I'm going bananas ! I did a clean installation of Ubuntu 12.10 SERVER. I get the initial screen, but then it says "entering power save" and the screen goes black / blank. I can't turn on the screen for love or money. I know the machine is running because I can SSH into it. I tried changing the...
I have a bash script that is supposed to process the ten last lines, or fewer in files with fewer than ten lines, of a text file. I use 'tail' to read these lines into a new text file, which I then read into an array. There's a problem when the file being read has fewer than ten lines. The...
I'm building a wireless access point using Ubuntu Server 10.04 LTS and an Atheros AR9287 wireless network interface card. I want to detect when mobile devices scan for wireless access points and I want to maximize the frequency with which they do so. I do not want to allow them to communicate...
OK... Traceroute does not do what I wanted it to do.
So how do I get my public dynamic IP address without using an outside agent unless I can get into the DHCP client on my router ?
Hi Chris,
I checked the manual for tracert (Laurie: tracert on Ubuntu is supposed to be the same as traceroute -I), but I still don't understand why it does not report my public IP address in the 15 or so hops it takes to get to the destination. I don't even see an IP address where the...
Hi Laurie,
Yes, I get the correct public IP address when I go to the site.
And yes, I get a file with the proper IP address when I do a simple wget.
Cheers,
Hi tarn,
Here's my OS (Ubuntu Server 8.04 LTS):
root@xxxx:~# uname -a
Linux xxxx 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 GNU/Linux
tracert works for me:
root@xxxx:~# tracert google.com
traceroute to google.com (74.125.113.147), 30 hops max, 40 byte packets
1 192.168.192.1...
Thank you, but there's more to the story...
The problem is that I must assume any public IP address can come under DDoS attack. Hopefully, the larger the site, the more likely they can withstand the attack. But not mine, so I must avoid the attack.
That rules out my having a static IP address...
Thank you, but it's not working for me.
I tried the wget example, using just 'wget ...' at the beginning, but I don't get anything. I touched ip.php since I did not have that file, but I still don't get anything. No errors, no data.
I tried the ping example using google.com as the target, but...
There are two subtleties to this:
...1) I can't use a dyndns provider, but maybe I can set up my own (how?).
...2) I need to know ** instantly ** that my public IP address has changed, and what the new public IP address is. I can't just run a script that somehow checks once an hour. That's why...
I can't go into details but I need to instantly perform a number of steps when the public IP address changes. So I need to instantly know when the IP address changes, and I need to know what the new public IP address is. So the question is, what can I do to instantly find out when the public IP...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.