Sponsored Content
Top Forums Shell Programming and Scripting Script to count files on daily basis Post 302949635 by fretagi on Tuesday 14th of July 2015 05:37:41 AM
Old 07-14-2015
Script to count files on daily basis

Hi all

I need to count files on a daily basis and send the output via email, what I am currently doing its simply running the following:
Code:
ls -lrt *.cdr | awk '{if(($6 == "Jul") && ($7 == "13")) print $0}' | wc -l

, which in this case it will count all files with extension "cdr" from the month of july, today the 13th of july.
I also use the same code to count files with extension "tap"
 

9 More Discussions You Might Find Interesting

1. HP-UX

HPUX printers & plotters disable on a daily basis

HI all, I've been having issues with printers and plotters disabling with no reason at all...It could happen to the same workstation once a day or once a week..There is nothing consistant..I stop and restart the spooler, only then can I re-enable the disabled printer.... If anyone is... (0 Replies)
Discussion started by: Shutdown
0 Replies

2. Shell Programming and Scripting

Zip all the files within a directory on a daily basis

I need to zip all the files within a directory on a daily basis and store them as a zip file within that directory with the date in its naming convention I have file extentions .log .lst and .out's within that directory How do i do this task zip -mqj mydir/allzip$YYMMDDDD.zip mydir/*.* ... (5 Replies)
Discussion started by: ramky79
5 Replies

3. Shell Programming and Scripting

Count first column on the basis of two other columns

Hello, I have a file ================= 12 SRV1 GRP1 19 SRV1 GRP1 19 SRV1 GRP2 3 SRV1 GRP1 3 SRV1 GRP2 30 SRV1 GRP2 7 SRV1 GRP1 8 SRV1 GRP3 =========== I want output like =============== 41 SRV1 GRP1 52 SRV1 GRP2 8 SRV1 GRP3 (1 Reply)
Discussion started by: kaustubh137
1 Replies

4. Shell Programming and Scripting

Moving files on first in first out basis

suppose in a directory there are over 20 files. I need to move the first 10 files(first in first out basis, which ever files comes first) into a separate directory. i have an idea but not sure how far this is correct, can anyone guide me on this? find /opt/logs -name "cor*" -mtime 2... (6 Replies)
Discussion started by: venkatesht
6 Replies

5. Shell Programming and Scripting

Creating directory daily basis...

Need help on this script. the month is not changing to February... #!/bin/bash for X in `seq 1 100` do DATE=`date +%Y-%m-%d "--date=${X} day ago"` Y=`date +%Y` M=`date +%m` D=`date +%d "--date=${X} day ago"` DIR=/home/LogBackup for i in `seq 1 ` do if ;then # ... (1 Reply)
Discussion started by: alelee
1 Replies

6. UNIX for Dummies Questions & Answers

Tracking the script(.sh) files triggered on daily or monthly basis from source

Hi Gurus, Is there any solution for tracking the script(.sh) files triggered on daily or monthly basis from source - Datastage (Routines) Needs to find out if this scripts are running on daily just want to know that is there anything to track Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies

7. Shell Programming and Scripting

Script to move file on a daily basis

Hi! Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Discussion started by: fretagi
7 Replies

8. Shell Programming and Scripting

Error files count while coping files from source to destination locaton as well count success full

hi All, Any one answer my requirement. I have source location src_dir="/home/oracle/arun/IRMS-CM" My Target location dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct" my source text files check with below example.text file content $fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies

9. Shell Programming and Scripting

Shell script for field wise record count for different Files .csv files

Hi, Very good wishes to all! Please help to provide the shell script for generating the record counts in filed wise from the .csv file My question: Source file: Field1 Field2 Field3 abc 12f sLm 1234 hjd 12d Hyd 34 Chn My target file should generate the .csv file with the... (14 Replies)
Discussion started by: Kirands
14 Replies
SADC(8) 							Linux User's Manual							   SADC(8)

NAME
sadc - System activity data collector. SYNOPSIS
/usr/lib/sa/sadc [ -I ] [ -V ] [ -x pid ] [ -X pid ] [ interval [ count ] ] [ outfile ] DESCRIPTION
The sadc command samples system data a specified number of times ( count ) at a specified interval measured in seconds ( interval ). It writes in binary format to the specified outfile or to the standard output. If outfile is set to -, then sadc uses the standard system activity daily data file, the /var/log/sa/sadd file, where the dd parameter indicates the current day. When the count parameter is not specified, sadc writes its data endlessly. When both interval and count are not specified, a dummy record, which is used at system startup to mark the time when the counter restarts from 0, will be written. For example, one of the system startup script may write the restart mark to the daily data file by the command entry: /usr/lib/sa/sadc - The sadc command is intended to be used as a backend to the sar command. Note: The sadc command reports only local activity. OPTIONS
-I Tell sadc to report statistics for all system interrupts. By default, sadc only reports statistics for the total number of inter- rupts. -V Print version number and usage then exit. -x pid Tell sadc to report statistics for the process whose PID is pid. -X pid Tell sadc to report statistics for the child processes of the process whose PID is pid. The SELF keyword indicates that statistics are to be reported for the child processes of the sadc process itself. EXAMPLES
/usr/lib/sa/sadc 1 10 /tmp/datafile Write 10 records of one second intervals to the /tmp/datafile binary file. BUGS
/proc filesystem must be mounted for the sadc command to work. All the statistics are not necessarily available, depending on the kernel version used. FILES
/var/log/sa/sadd Indicate the daily data file, where the dd parameter is a number representing the day of the month. /proc contains various files with system statistics. AUTHOR
Sebastien Godard <sebastien.godard@wanadoo.fr> SEE ALSO
sar(1), sa1(8), sa2(8), mpstat(1), iostat(1), vmstat(8) http://perso.wanadoo.fr/sebastien.godard/ Linux DECEMBER 1999 SADC(8)
All times are GMT -4. The time now is 03:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy