Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  2. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  3. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  4. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  5. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  6. NewtownGuy

    How do I avoid problems when a file I'm reading changes ?

    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...
  7. NewtownGuy

    How do I disable entering power save on boot in Ubuntu 12.10 SERVER ?

    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...
  8. NewtownGuy

    How do I disable entering power save on boot in Ubuntu 12.10 SERVER ?

    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.
  9. NewtownGuy

    How do I disable entering power save on boot in Ubuntu 12.10 SERVER ?

    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...
  10. NewtownGuy

    Problem with tail command in bash script in Ubuntu Server 10.04 with tfiles with fewer than 10 lines

    I found a dumb error in the surrounding code. Sigh...
  11. NewtownGuy

    Problem with tail command in bash script in Ubuntu Server 10.04 with tfiles with fewer than 10 lines

    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...
  12. NewtownGuy

    Logging scans received by wireless access point in Ubuntu server

    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...
  13. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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 ?
  14. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...
  15. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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,
  16. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...
  17. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...
  18. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...
  19. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...
  20. NewtownGuy

    how can I get a message when my public dynamic ip address changes ?

    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...

Part and Inventory Search

Back
Top