Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
how to determine if device is busy
Name: f Date: July 29, 2003 at 10:48:52 Pacific OS: Linux CPU/Ram: Athlon/512
Comment:
I am currently writing a bash script (this is my second day into bash scripting) and I have problem figuring out how to determine if /dev/ttyX is busy. So far I have only one idea, to simply use cat which says smth like 'Device busy' if it's busy. But I don' t think it is the best way to do it. Any ideas?
David, no, who will not help, because in this case tty is a special device(Digi adapter port) wich will not show up in "who". So far I have figured out to use "lsof | grep "/dev/tty_name" in if statement test.
0
Response Number 3
Name: David Perry Date: July 31, 2003 at 05:56:24 Pacific
Summary: How to determine whether a file that you want to use exist or not using 'test' which gives return value when '$?' is typed? eg: if the file exist, then $? = 0 (true) but if the file doesn't exist...
Summary: Further, a 64-bit OS can run both 32-bit programs and 64-bit programs. To determine if "oracle" is 32-bit or 64-bit, you can: file oracle oracle: PA-RISC1.1 shared executable ... The absence of "64-b...
Summary: Situation: A remote server is FTP'ing a file to my server. Is there a command in Unix (like "test") that can be used to determine when the FTP of the file is complete? I have no control over the rem...