09-12-2004
If the file does not contain the search pattern I would like to delete the file.
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Can some one please tell me how to find out the proccess ID that is holding up a file.
I am attempting to remove a file and I am getting a message stating that it is busy.
i.e
rm filename
filename: 777 mode ? (y/n) y
rm: filename not removed. Text file busy
Thanks in advance. (1 Reply)
Discussion started by: jxh461
1 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone
I have a small problem i cant find a soloution to...
I'm using digital unix and have to find out all the files which have a certain string inside them and i dont know how to do it.
*This search is done as root.
*All files from '/' to the last directory should be searched for... (3 Replies)
Discussion started by: dindan100
3 Replies
3. UNIX for Dummies Questions & Answers
How do i find text string in a file if i have no idea where the file is?
What I am trying to do is find an email address in a file and have no idea where the file is.
Thanks (5 Replies)
Discussion started by: §ynic
5 Replies
4. Shell Programming and Scripting
Hi All,
I am tring to insert a newline with "/" in a text file whenever there is the text "end;"
right now I have inside file:
.
.
end;
I want to have:
.
.
end;
/
I tried doing the following within the file
:g/^end;/s//end; \/ / (4 Replies)
Discussion started by: jxh461
4 Replies
5. Shell Programming and Scripting
Hello,
Please help me with this.
I have two files. file1.txt and file2.txt
File1 contains text as below
txt1 txt2
txt3 txt4
txt5 txt6
txt7 txt8
File2 contains text as below
$1 $2 $3 $4 $5 $6 $7 $8 $9
-----------------------------
txt1 txt2 - - - 0 2 8 -*-
txt0 txt7 - - - 1 4 8... (3 Replies)
Discussion started by: tenderfoot
3 Replies
6. Shell Programming and Scripting
What would be the most succinct way of doing this (preferably in 1 line, maybe 2):
searching the first 10 characters of every line in a text file for a specific string, and if it was found, print out characters 11-20 of the line on which the string was found.
In this case, it's known that there... (13 Replies)
Discussion started by: busdude
13 Replies
7. Shell Programming and Scripting
Hi,
I need to find out the last column value from a text file which is delimited by a tab.
The issue here is the last column# for each record can be different i.,e, 1st record can have the last column as 15 and the second record can have the last column as "17".
I have to search a string... (3 Replies)
Discussion started by: naveen_sangam
3 Replies
8. Shell Programming and Scripting
Can any one tell me how to get the second last column value from the text file, which has different record size for each record.
I know how to get the last column using awk and print statements, but I am unable to get the second last column value from the file. (4 Replies)
Discussion started by: naveen_sangam
4 Replies
9. Shell Programming and Scripting
HI ,
There are more than 100 zip files in a directory and i wanted to see if there is a max1157.txt file in any of the zip files without actually unzipping them. Could you please help. Thanks in Advance.
Karthik. (6 Replies)
Discussion started by: karthikk0508
6 Replies
10. Shell Programming and Scripting
Dear All,
assume that we have a text file or a folder of files,
I want to find this pattern followers*.csv in the text file , and get * as the output.
There are different matches and * means every character.
Thank you in advance.
Best,
David (1 Reply)
Discussion started by: davidfreed
1 Replies
STICKY(8) System Manager's Manual STICKY(8)
NAME
sticky - persistent text and append-only directories
DESCRIPTION
The sticky bit (file mode bit 01000, see chmod(2)) is used to indicate special treatment for certain executable files and directories.
STICKY TEXT EXECUTABLE FILES
While the `sticky bit' is set on a sharable executable file, the text of that file will not be removed from the system swap area. Thus the
file does not have to be fetched from the file system upon each execution. Shareable text segments are normally placed in a least-fre-
quently-used cache after use, and thus the `sticky bit' has little effect on commonly-used text images.
Sharable executable files are made by the -n and -z options of ld(1).
Only the super-user can set the sticky bit on a sharable executable file.
STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is
restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and
the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as
/tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files.
Any user may create a sticky directory. See chmod(1) for details about modifying file modes.
BUGS
Since the text areas of sticky text executables are stashed in the swap area, abuse of the feature can cause a system to run out of swap.
Neither open(2) nor mkdir(2) will create a file with the sticky bit set.
4th Berkeley Distribution May 26, 1986 STICKY(8)