Search results

  1. I

    What is the best way to ensure only one copy of bash script is running (in BSD)?

    Do I have to remove the pidfile (/var/run/somepid) at the end of my script?
  2. I

    What is the best way to ensure only one copy of bash script is running (in BSD)?

    I my freebsd 7.0 box, there is no "lockfile" command $ lockfile -bash: lockfile: command not found therefore I can't use the lockfile approach. So, what is the best way to ensure only one copy of bash script is running?
  3. I

    yet another crontab question - what about program that takes long time?

    No, as far i know, but if the crontab waits my program to finish then it will wait 3 hours ...
  4. I

    yet another crontab question - what about program that takes long time?

    Hi I am going to run one heavy program that works about 3 hours from crontab. But I am not sure how exactly to run it - with regular call or like a daemon (with "&" at the and of the line)?
  5. I

    IPC: where sem_open() places object name in the actual filesystem

    Hi all, It is about IPC - where sem_open() maps its object name in the actual filesystem? I need this to list all semaphores.
  6. I

    Monitor network traffic from console

    Actually I need to know how many bytes are send and received.
  7. I

    Monitor network traffic from console

    Hi All, how can I make ifconfig to show me the network traffic from console? Or how can I check the network traffic without installing additional package like wireshark?
  8. I

    looking for binary diff tool

    Hi all Is there a command line (console) tool that make binary diff of two files (with hex output - offset & bytes)?
  9. I

    how an Application in C can get system info?

    Hi, How a C application can get system information like netstat -p tcp ? I'm looking for a system call but not for calling the real netstat and parse the stdout.
  10. I

    Pthread and timeouts question

    How to implement void * do_it_fast(void * ), so that I can wait in the main thread for the child to complete for a fixed interval of time (like software watchdog) ?
  11. I

    Is there a BSD Predefined Macros for GCC

    Hello Is there a BSD Predefined Macros for GCC? I need to recognize the OS - Linux or Unix (FreeBSD).
  12. I

    [sh] PS1 setting problem

    thanks, this is the solution:
  13. I

    [sh] PS1 setting problem

    thanks, but the problem is not in the # nor in the apostrophes. the script is OK (proved by echo $PS1). The problem is that after the execution of the script, PS1 remains the old one.
  14. I

    [sh] PS1 setting problem

    Thanks, I see, but it still doesn't work. Probably the 'export PS1' doesn't affect the parent's environment ?
  15. I

    [sh] PS1 setting problem

    Hi list, Is there a way to set the command prompt $PS1 with shell scrypt? I can't use .profile because we are few users on one account and each user prefers different PS1. I tried with file.sh: PS1=`uname -n`:'$PWD'# ; export PS1 but after the execution of file.sh, PS1 remains the same...
  16. I

    How to pipe each descriptor to different script/program

    Hi all is there a way (in sh or bash) to redirect each descriptor to different script/program e.g. pipe stdout | grep pattern1 and stderr | grep pattern2
  17. I

    before forcing question

    fstat /data gives empty line USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME but: fstat -v /data returns ... unknown file type 5 for file 13 of pid 1128 can't read vnode at 0x0 for pid 45 can't read vnode at 0x0 for pid 44 ... and do this mean that i have...
  18. I

    where is my serial port?

    Hello, Q: where are my comports ? --- according dmesg i've two com ports: sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 but in /dev I can't find sio* at all : ls /dev/ acd0...
  19. I

    before forcing question

    Hi, the problem is # umount /data umount: unmount of /data failed: Device busy And here is the question: how to find out who keeps this device busy ? Or is there another way to find what will happen if I use "-f" to unmount the device?
  20. I

    firewire (iidc) camera, libdc1394 and FreeBSD

    I've the same problem with freeBSD7.1 and 7.2, but fwcontrol works with freeBSD7.0 (I still don't know why)
Back
Top