Hi my task is to show the percentage of files accessed in /home in one week.
I have got as far as displying the files, kind of. I am not sure how to format them into a list. I've tried using awk but hasn't worked yet.
any help would be fantastic.
this is what i have got so far
the result ends up like this
I would like to know how to list them, Normally I would use awk and print $, But with the outcome changing every time how do I do it?
One other question is how do i count them?, again I can do it when they remain static using
Pusdo code.
count all files in the dir
say this is how many files are in a dir in %
say these are the files that have accessed
I'm sorry is using pusdo code is against the rules of the forum, I didn't know how else to explain what i needed to know.
Yeah that does work thankyou. I get the total of the files.
Though I still have the problem with the output of the files. How do I list them
something like
nb: tried above code and does not work
The whole section of code looks like this.
I understand that it is a bit messy atm and that I have repeated myself a little. bah! noggin turning to mush right now. =)
Thanks.
Jade.
---------- Post updated at 07:21 PM ---------- Previous update was at 07:19 PM ----------
Im looking for an awk script that will take the unique values in column 5, then print and count the unique values in column 6.
CA001011500 11111 11111 -9999 201301 AAA
CA001012040 11111 11111 -9999 201301 AAA
CA001012573 11111 11111 -9999 201301 BBB
CA001012710 11111 11111 -9999 201301... (4 Replies)
hi, does any one know how to compare a file1 with many files and have to count a number (i.e. 1) like the following ..Thanx in advance
input
file1 file2 file3 filen
1 1 1 1
1 1 1 1
1 1 1 1
0 1 1 1
1 0 0 0
1 0 0 0
0 0 0 0
1 0 1 0
output
instances in file1 only - 2
instances in... (3 Replies)
Hi,
I have the following input in a file & need output as mentioned below(need counter of every occurance of field which is to be increased by 1).
Input:
919143110065
919143110065
919143110052
918648846132
919143110012
918648873782
919143110152
919143110152
919143110152... (2 Replies)
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
I have a input.txt file which have 3 fields separate by a comma
place, os and timediff in seconds
tampa,win7, 2575
tampa,win7, 157619
tampa,win7, 3352
dallas,vista,604799
greenbay,winxp, 14400
greenbay,win7 , 518400
san jose,winxp, 228121
san jose,winxp, 70853
san jose,winxp, 193514... (5 Replies)
Hi ,
HOW DO I COUNT THE NO of fields in a particular line of a file using awk
EX:
If file name is Pravee
a|2|3|4|y
the command shid display the result as 4
Please advise (2 Replies)
Hi,
I've a fixed width file where I need to count the number of patterns from each line between characters 1 to 15 . so can we sort them and get a count for each pattern on the file between 1 to 15 characters.
65795648617522383763831552 410828003265795648 6175223837... (5 Replies)
hey everybody ..
I have a problem when I use this command to count the Max number by awk it give to me 99 while there are numbers bigger than 99
awk 'NR==0 { temp = $0 ;next}
{ if ( $0 >= temp ) { temp=$0 } }
END{ print "Maximum Number:"temp""}' file
thank you for your help... (9 Replies)