Sponsored Content
Top Forums Shell Programming and Scripting Counting Number of times a File is accessed Post 69072 by RishiPahuja on Monday 11th of April 2005 09:49:34 AM
Old 04-11-2005
Tools Try logging the count

Try logging the count in a temporary file.
When you next access, read the count, increment and overwrite to temporary file.

Regds,
Rishi
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Counting The Number Of Duplicate Lines In a File

Hello. First time poster here. I have a huge file of IP numbers. I am trying to output only the class b of the IPs and rank them by most common and output the total # of duplicate class b's before the class b. An example is below: 12.107.1.1 12.107.9.54 12.108.3.89 12.109.109.4 12.109.6.3 ... (2 Replies)
Discussion started by: crunchtime
2 Replies

2. Programming

maximum number of times - a file can be opened

Hi All, We can find the maximum of open file descriptors in hold with respect to a process. As default size was 256 (with getrlimit) and the hard limt was 65536 I tried changing the limit to 1024(with setrlimit) successfully changed the limit but still I couldnt have as many open file... (3 Replies)
Discussion started by: matrixmadhan
3 Replies

3. UNIX for Dummies Questions & Answers

Counting the number of times a character appears

I am looking for a bash command that counts the number of times a character appears in a file. For example "I am a newbie, trying to learn shell script". Then the command counts the number of e and gives them as 4. Also I want one that counts the number of times a character in a string is replaced.... (2 Replies)
Discussion started by: #moveon
2 Replies

4. UNIX for Dummies Questions & Answers

Number of files accessed this week

I have looked around on the internet and still i am no wiser as to how to show the number of files in a directory that have been accessed this week and also that as a percentage. Any help would be much appreciated. (5 Replies)
Discussion started by: RAFC_99
5 Replies

5. Shell Programming and Scripting

Counting script how many times it run?

i should use this script runs how many times before ? how can i do_? (3 Replies)
Discussion started by: utoptas
3 Replies

6. Shell Programming and Scripting

Counting number of files that contain words stored in another file

Hi All, I have written a script on this but it does not do the requisite job. My requirement is this: 1. I have two kinds of files each with different extensions. One set of files are *.dat (6000 unique DAT files all in one directory) and another set *.dic files (6000 unique DIC files in... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

7. UNIX for Dummies Questions & Answers

how to count number of times each word exist in a file

I'm trying to count the number of times each word in the file exist for example if the file has: today I have a lot to write, but I will not go for it. The main thing is that today I am looking for a way to get each word in this file with a word count after it specifying that this word has... (4 Replies)
Discussion started by: shnkool
4 Replies

8. Solaris

Dtrace-counting the number of read access to a file

Hi, I want to write a script with dtrace to count the number of read and write from and to a file. I use this for reading: dtrace -n 'syscall::read:entry { @ = count(); }' but it doesn'f give me a single answer. The result is always increasing. :wall: Please use next time code tags... (0 Replies)
Discussion started by: golabi
0 Replies

9. Homework & Coursework Questions

Accepting a phrase and counting the number of times that it is repeated in a specific website

1. The problem statement, all variables and given/known data: Develop a shell script that accepts a phrase and counts the number of times that it is repeated in a specific website. Note: Im not sure if it's the whole website, or just a specific page but im guessing its thewhole website. ... (2 Replies)
Discussion started by: Zakerii
2 Replies

10. Shell Programming and Scripting

Counting number of times content in columns occurs in other files

I need to figure out how many times a location (columns 1 and 2) is present within a group of files. I figured using a combination of 'while read' and 'grep' I could count the number of instances but its not working for me. cat file.txt | while read line do grep $line *08-new.txt | wc -l... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
VM_PAGE_HOLD(9) 					   BSD Kernel Developer's Manual					   VM_PAGE_HOLD(9)

NAME
vm_page_hold, vm_page_unhold -- update a page's hold count SYNOPSIS
#include <sys/param.h> #include <vm/vm.h> #include <vm/vm_page.h> void vm_page_hold(vm_page_t m); void vm_page_unhold(vm_page_t m); DESCRIPTION
The vm_page_hold() function increases the hold count on a page. This prevents the page daemon from freeing the page. vm_page_hold() should only be used for very temporary wiring of a page, as that page will not be considered for paging or reallocation for as long as its hold count is greater than zero. Also note that while wired pages are removed from whatever queue they are on, vm_page_hold() does not affect the location of the page. If it is on a queue prior to the call, it will still be there afterward. If the page needs to be held for a long period of time, vm_page_wire(9) should be used. vm_page_unhold() function reduces the hold count on a page. If the hold count is zero it is possible that the page will be freed by the page daemon. SEE ALSO
vm_page_unwire(9), vm_page_wire(9) AUTHORS
This manual page was written by Chad David <davidc@acns.ab.ca>. BSD
July 13, 2001 BSD
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy