11-19-2008
Files with 0 file size and created today
hi,
I am building a script to identify those files created/modified today and with file size 0. I am able to find the files with 0 file size and created/modified in last 24 hrs as shown below but not today (current date), I tried using (touch -t time filenm) but in my version of unix at work it does not allow me to, please post if somebody has an alternative solution,
Here is my current script,
cd /usr/local/upload;
for i in *;do
if [ -f $i ];then
if [ ! -s $i ];then
find $i -type f -mtime -1;
fi
fi
done >> usr/file3.txt
Thanks for looking into it.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have recently taken on a new position and want to clean up several file locations that currently hold data back through 1999. While I need to keep this data for business reasons, I have created directories to help sort out the individual years. Is there a quick command that I can use to archive... (2 Replies)
Discussion started by: dmhammond
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Can any one tell the command to list all the files that are created as of today from all the directories?
The Command "ls -ltR" is listing all the files.
But I want the list of files that has been created as of today along with the directory path:)
Thank you in advance.:)
Regards,... (4 Replies)
Discussion started by: meetusha.b
4 Replies
3. Shell Programming and Scripting
I need to figure out how to get all the files from a certian dir ./123/*sat files
and ./230/*sat files and several other directories which have these *sat files in them. I need to calculate how many were created today and how many yesterday from 2:00 pm on the 28th to 2pm on the 29th.
It's a... (1 Reply)
Discussion started by: xgringo
1 Replies
4. UNIX for Advanced & Expert Users
I have a listener (a batch job written in shell script) that calls a perl file (say apple.pl). The listener runs at scheduled timing (say 11 pm to 6 am)&.
Owner of the listener is a common id.
My question is..
Once the listener starts running (here, Im NOT attempting to generate any reports... (1 Reply)
Discussion started by: vavjeeva
1 Replies
5. Shell Programming and Scripting
Hello experts,
I have written following script to download files which created today.
Unfortunately, it's not working.
test.ksh:
#Defining variables
USR='xxx'
PASSWD='yyyy'
HT='test.test.com'
FILE='S*.pdf'
XFILE=$(echo find . -type f -mtime 0)
ZFILE=$(echo ls -tR|grep 'Jun 8')... (14 Replies)
Discussion started by: dipeshvshah
14 Replies
6. Shell Programming and Scripting
Morning
My other issue I have seems very simple but im just not seeing it. I have a script that checks on a remote share to see if the backups for some systems have run. Its as simple as:
find /mnt/ukwcs-net-config/WLAN-Controllers/ -mtime -1 -ls | egrep '(cfg)' > wlanlog.txt
cut -c 1-92... (4 Replies)
Discussion started by: ltodd2
4 Replies
7. UNIX for Advanced & Expert Users
Hi all,
In linux how to create a directory with specified size, so that it can be used only up to the mentioned size.
Actually my question is, whether we can do directory quota in linux.
mounting the directory in a partiton will do that, but do we have any other option... (1 Reply)
Discussion started by: anishkumarv
1 Replies
8. Shell Programming and Scripting
Dear All,
I want a Hp Ux command to find out the files created today in a particular directory or mountpoint.
Kindly help.
Thanks
Bhaskar (10 Replies)
Discussion started by: sudiptabhaskar
10 Replies
9. Linux
Hi, ALL
thanks in advance,
i listed all files using this command
ls -ltr $(date +%Y%m%d)*.xmlbut i would like to exclude the last one created ;
Best regard
MEROUAN
Use code tags, thanks. (4 Replies)
Discussion started by: merouan
4 Replies
10. Shell Programming and Scripting
Hi,
I want to display the file names and the record count for the files in the 2nd column for the files created today.
i have written the below command which is listing the file names. but while piping the above command to the wc -l command
its not working for me.
ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies
LEARN ABOUT PLAN9
yesterday
YESTERDAY(1) General Commands Manual YESTERDAY(1)
NAME
yesterday - print file names from the dump
SYNOPSIS
yesterday [ -c ] [ -date ] files ...
DESCRIPTION
Yesterday prints the names of the files from the most recent dump. Since dumps are done early in the morning, yesterday's files are really
in today's dump. For example, if today is March 17, 1992,
yesterday /adm/users
prints
/n/dump/1992/0317/adm/users
In fact, the implementation is to select the most recent dump in the current year, so the dump selected may not be from today.
With option -c, yesterday copies the dump file to the current directory.
The date option selects other day's dumps, with a format of 2, 4, 6, or 8 digits of the form dd, mmdd, yymmdd, or yyyymmdd.
Yesterday does not guarantee that the string it prints represents an existing file.
EXAMPLES
Back up to yesterday's MIPS binary of vc:
cd /mips/bin
yesterday -c vc
Temporarily back up to March 1's MIPS C library to see if a program runs correctly when loaded with it:
bind `{yesterday -0301 /mips/lib/libc.a} /mips/lib/libc.a
rm v.out
mk
v.out
FILES
/n/dump
SOURCE
/rc/bin/yesterday
SEE ALSO
fs(4)
BUGS
It's hard to use this command without singing.
YESTERDAY(1)