10-30-2008
Please clarify what you mean by the "last file". The order of the output from "find" is not much use for operations based on the age of the file.
If you want to retain the most recently created file, "find" is not the right way.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
How can I use ls command to Delete all files with zero length in a given path using ls command (I guess awk is required!)?
Thanks. (6 Replies)
Discussion started by: GNMIKE
6 Replies
2. Shell Programming and Scripting
Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same.
Thanks in advance.
Regards
Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies
3. Shell Programming and Scripting
Hello,
Can anyone pls. provide me with the command for deleting files older then 15 days with a restriction to keep at least 5 files in a directory even if they are older then 15 days.
Any help will be highly appreciated.
Thanks,
Pulkit (4 Replies)
Discussion started by: pulkit
4 Replies
4. Shell Programming and Scripting
Hi,
I am using the command find /apps/qualdb/gpcn/scripts/cab_outbound/archive -name 'z*' -mtime +28 -exec rm {} \;
in unix command prompt
for deleting the files in my unix system under the specfied folder. It was succesfull.
But when i running this command inside a shell script name... (2 Replies)
Discussion started by: Jayaram.Nambura
2 Replies
5. Shell Programming and Scripting
Hello Friends,
Im trying to delete empty files in subdirectories with a command. I can find them checking only one directory in each step and then show them with my command like below moreover i could not add removing part:
ls -l */* | awk '{if ($5==0) printf "%3s %2d %s... (5 Replies)
Discussion started by: EAGL€
5 Replies
6. Shell Programming and Scripting
what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies
7. Red Hat
i want to remove *.req files from directory
/opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log
i executed command find . -name '*.req' -mtime +2 -exec rm {} \;
but it is running since hours and free space in /opt is same as old 7.4 GB .
why it is not removing files ? (5 Replies)
Discussion started by: rehantayyab82
5 Replies
8. UNIX for Dummies Questions & Answers
Hello out there,
Our system has a pdf generator that creates pdf files. We dont need them pas 120 days.
So I have this command in my crontab. I currently set it to "0" for testing. But normally have it set to -mtime 120 to remove files out of the folders from PDF out to several other potential... (7 Replies)
Discussion started by: vsekvsek
7 Replies
9. Shell Programming and Scripting
Hi,
I have a script similar to this
#!/bin/ksh
cd /orcl/bir/eod_badfiles
find ./ -type f -name "*.csv" -mtime +6 -exec rm -f {} \;
find ./ -type f -name "*.bad" -mtime +6 -exec rm -f {} \;
cd /orcl/bir
find ./ -type f -name "*.log" -mtime +6 -exec rm -f {} \;
This was working fine in one... (5 Replies)
Discussion started by: Gangadhar Reddy
5 Replies
10. Shell Programming and Scripting
I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation.
When I tried like below,
-bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation
-bash-4.1$ find ./ -name % Retail by State
find: paths must precede expression: Retail
Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
AGE(4) BSD Kernel Interfaces Manual AGE(4)
NAME
age -- Attansic L1 10/100/Gigabit Ethernet device
SYNOPSIS
age* at pci?
atphy* at mii?
DESCRIPTION
The age driver provides support for Ethernet interfaces based on the Attansic L1 Ethernet chipset.
The age driver supports IPv4 receive IP/TCP/UDP checksum offload and VLAN tag insertion and stripping.
The following media types are supported:
autoselect Enable autoselection of the media type and options.
10baseT Set 10Mbps operation.
100baseTX Set 100Mbps (Fast Ethernet) operation.
1000baseT Set 1000Mbps (Gigabit Ethernet) operation.
For more information on configuring this device, see ifconfig(8). To view a list of media types and options supported by the card, try
ifconfig <device> media. For example, ifconfig age0 media.
SEE ALSO
arp(4), atphy(4), ifmedia(4), intro(4), netintro(4), pci(4), ifconfig(8)
HISTORY
The age device driver first appeared in OpenBSD 4.5. It was then ported to NetBSD 5.1.
AUTHORS
The age driver was written by Pyun YongHyeon for FreeBSD, ported to OpenBSD by Kevin Lo <kevlo@OpenBSD.org> then ported to NetBSD by
Christoph Egger <cegger@NetBSD.org>.
BSD
May 5, 2009 BSD