10-19-2017
No one's mentioned lock files and race conditions yet. Go us!
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I unable to open any file using Vi editor,constantly getting the following error,
vi log.log
*** glibc detected *** malloc(): memory corruption: 0x081af510 **
uname -a
Linux sekac092 2.6.5-7.244-bigsmp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 athlon i386 GNU/Linux
Also Note
ls... (8 Replies)
Discussion started by: ennstate
8 Replies
2. Shell Programming and Scripting
Hi all,
I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions.
I later have redone the changes and saved the file-
Just curious to know if there was any command wherein... (5 Replies)
Discussion started by: Pankajakshan
5 Replies
3. UNIX for Advanced & Expert Users
helo
I install my product for koren language
I m uisng RHEL -4 operating system
now problem is whenever I open any file
vi filename
I got following error on the screen
E557: Cannot open termcap file
'vt100' not known. Available builtin terminals are:
builtin_ansi
... (1 Reply)
Discussion started by: amitpansuria
1 Replies
4. UNIX for Dummies Questions & Answers
i have following query
e.g i want the VI Editor cursor at line number N instead of 0 while opening the file from unix prompt.
vi filename ??????
Can anyone help? (4 Replies)
Discussion started by: skyineyes
4 Replies
5. Shell Programming and Scripting
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
Discussion started by: jimmy_y
4 Replies
6. Solaris
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies
7. UNIX and Linux Applications
Hi,
I would like to ask about the notepad++ text editor application, Although there are alternative and more great text editor in linux (gedit, geany, jedit) im still using the notepad++ sometimes cause for some of my own reason one of those is the minimalist text(what i mean is notepad++ has a... (2 Replies)
Discussion started by: jao_madn
2 Replies
8. UNIX for Dummies Questions & Answers
vi: syntax error at line 1: `)' unexpected
when I try to vi into the /etc/vfstab, the return gives me the above error.
how can resolve this so that I can have access into vi. (6 Replies)
Discussion started by: dovestar
6 Replies
9. Shell Programming and Scripting
Hi,
I am facing a problem regarding .csv file, my script does not read .csv file and if i open this file in vi editor and perform :wq option then only my script reads the .csv file.
Thanks (5 Replies)
Discussion started by: ranabhavish
5 Replies
10. Shell Programming and Scripting
Hello Experts,
I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this.
while true; do echo `date` >>abc.txt; done
then I checked
lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies
LPRM(1) General Commands Manual LPRM(1)
NAME
lprm - remove jobs from the line printer spooling queue
SYNOPSIS
lprm [ -Pprinter ] [ - ] [ job # ... ] [ user ... ]
DESCRIPTION
Lprm will remove a job, or jobs, from a printer's spool queue. Since the spooling directory is protected from users, using lprm is nor-
mally the only method by which a user may remove a job.
Lprm without any arguments will delete the currently active job if it is owned by the user who invoked lprm.
If the - flag is specified, lprm will remove all jobs which a user owns. If the super-user employs this flag, the spool queue will be emp-
tied entirely. The owner is determined by the user's login name and host name on the machine where the lpr command was invoked.
Specifying a user's name, or list of user names, will cause lprm to attempt to remove any jobs queued belonging to that user (or users).
This form of invoking lprm is useful only to the super-user.
A user may dequeue an individual job by specifying its job number. This number may be obtained from the lpq(1) program, e.g.
% lpq -l
1st: ken [job #013ucbarpa]
(standard input) 100 bytes
% lprm 13
Lprm will announce the names of any files it removes and is silent if there are no jobs in the queue which match the request list.
Lprm will kill off an active daemon, if necessary, before removing any spooling files. If a daemon is killed, a new one is automatically
restarted upon completion of file removals.
The -P option may be usd to specify the queue associated with a specific printer (otherwise the default printer, or the value of the
PRINTER variable in the environment is used).
FILES
/etc/printcap printer characteristics file
/usr/spool/* spooling directories
/usr/spool/*/lock lock file used to obtain the pid of the current
daemon and the job number of the currently active job
SEE ALSO
lpr(1), lpq(1), lpd(8)
DIAGNOSTICS
``Permission denied" if the user tries to remove files other than his own.
BUGS
Since there are race conditions possible in the update of the lock file, the currently active job may be incorrectly identified.
4.2 Berkeley Distribution October 22, 1996 LPRM(1)