07-06-2006
When you drive a car and come to a traffic light - and the light is green - you go thru the intersection. If the light is red, you stop. The traffic light works because everyone agrees to stop on red, well most of the time.
A system without mandatory locking works just like the traffic light. Every program accessing the file has to agree to check the lock and abide by it.
A not-very-good option:
1. mv the file to a directory you own while your program accesses it.
2. mv the file back to where it belongs when you are done.
What problem are you trying to solve?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device?
thanks (7 Replies)
Discussion started by: dianayun
7 Replies
2. UNIX for Dummies Questions & Answers
Hi,
We have a lock file being created called lck8c0001 created in Unixware 2.1.2. This is locking a printer.
According to some websites, 8c0001 relates to the device name.
How does one link 8c0001 to those devices listed in the /dev folder?
I have done a ps -lp for all printers and have... (4 Replies)
Discussion started by: canman
4 Replies
3. Shell Programming and Scripting
Hi,
My requirement is to service a process and below is the script which i wrote for that and works fine, I have kept it in a crontab and running this everyminute, how do I lock this if its already running and i dont want to open if its running and not completed yet.
The crontab need to run... (4 Replies)
Discussion started by: strunz
4 Replies
4. Shell Programming and Scripting
hi
how can I Lock an account, by prepending ”*LK*” to the password field in /etc/shadow.
I dont want to use passwd -l .
Any idea? (3 Replies)
Discussion started by: tjay83
3 Replies
5. Solaris
Hi,
I am working with Sun-Solaris 9 and in our application I need to connect the UPS with Serial port,after that I need to monitor it..but before stating communication,It should lock that port,To check it,first i am trying to make sure the lock directory exists and I am able to find it(/var/lock)... (0 Replies)
Discussion started by: smartgupta
0 Replies
6. Red Hat
Hello all,
If anyone has time, I have a few questions:
How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too.
1. How to lock the account after a few (like 3) invalid password attempts?
2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies
7. UNIX for Advanced & Expert Users
Hi all,
I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...).
I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message.
Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies
8. Shell Programming and Scripting
Hi,
I want to write a code where in the file once taken genrates a lock number and other developer/user cannot take the file to make any changes in it. He gets the file only as read only. (2 Replies)
Discussion started by: rac
2 Replies
9. Ubuntu
Hi All!
I am not able to lock my Ubuntu 12.04 LXDE.
Can anybody tell me the shortcut to lock the system.
I have tried all conventional keyboard shortcuts as well as buttons. (2 Replies)
Discussion started by: nixhead
2 Replies
10. Shell Programming and Scripting
Requirement:First i need to unlock the directory which i had a script for it.If i select app1 it should unlock the directory and after chnages in the script once need to lock the directory with lock command
The below highlighed variables in lock and unlock has to be changed according... (2 Replies)
Discussion started by: bhas85
2 Replies
LEARN ABOUT DEBIAN
caca_black
libcaca attribute definitions(3caca) libcaca libcaca attribute definitions(3caca)
NAME
libcaca attribute definitions -
Enumerations
enum caca_color { CACA_BLACK = 0x00, CACA_BLUE = 0x01, CACA_GREEN = 0x02, CACA_CYAN = 0x03, CACA_RED = 0x04, CACA_MAGENTA = 0x05,
CACA_BROWN = 0x06, CACA_LIGHTGRAY = 0x07, CACA_DARKGRAY = 0x08, CACA_LIGHTBLUE = 0x09, CACA_LIGHTGREEN = 0x0a, CACA_LIGHTCYAN =
0x0b, CACA_LIGHTRED = 0x0c, CACA_LIGHTMAGENTA = 0x0d, CACA_YELLOW = 0x0e, CACA_WHITE = 0x0f, CACA_DEFAULT = 0x10, CACA_TRANSPARENT
= 0x20 }
enum caca_style { CACA_BOLD = 0x01, CACA_ITALICS = 0x02, CACA_UNDERLINE = 0x04, CACA_BLINK = 0x08 }
Detailed Description
Colours and styles that can be used with caca_set_attr().
Enumeration Type Documentation
enum caca_color libcaca colour keyword
Enumerator:
CACA_BLACK
The colour index for black.
CACA_BLUE
The colour index for blue.
CACA_GREEN
The colour index for green.
CACA_CYAN
The colour index for cyan.
CACA_RED
The colour index for red.
CACA_MAGENTA
The colour index for magenta.
CACA_BROWN
The colour index for brown.
CACA_LIGHTGRAY
The colour index for light gray.
CACA_DARKGRAY
The colour index for dark gray.
CACA_LIGHTBLUE
The colour index for blue.
CACA_LIGHTGREEN
The colour index for light green.
CACA_LIGHTCYAN
The colour index for light cyan.
CACA_LIGHTRED
The colour index for light red.
CACA_LIGHTMAGENTA
The colour index for light magenta.
CACA_YELLOW
The colour index for yellow.
CACA_WHITE
The colour index for white.
CACA_DEFAULT
The output driver's default colour.
CACA_TRANSPARENT
The transparent colour.
enum caca_style libcaca style keyword
Enumerator:
CACA_BOLD
The style mask for bold.
CACA_ITALICS
The style mask for italics.
CACA_UNDERLINE
The style mask for underline.
CACA_BLINK
The style mask for blink.
Author
Generated automatically by Doxygen for libcaca from the source code.
Version 0.99.beta18 Fri Apr 6 2012 libcaca attribute definitions(3caca)