07-03-2019
Delete all files created in specific year
I have more than 200K files created in year 2017 under directory having size of 50GB.
I want to all these files in one shot.
Is there any faster option available with find command to delete all these file ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to delete files that were created/modified in the year 2005 that we compressed and have the .Z extension on them. I tried using the awk utility but the syntax is incorrect. I don't know how to use a wildcard to capture all the compressed files. Here's the code I used
( ls -lR |... (5 Replies)
Discussion started by: igidttam
5 Replies
2. Filesystems, Disks and Memory
Hi,
Would like to ask, which command is used to list all the files for specific date (says 1st May) and its size, for all files (including its subdirectory), in a mounted NFS disk to HP-UX.
I would like to check for the total files came into my disk on 1st May.
Very much appreciating your... (2 Replies)
Discussion started by: Draculla
2 Replies
3. Shell Programming and Scripting
There is a system logging a huge amount of data and we need to delete some of the older logs .I mean the files that are created before one week from today. Here is a listing of files that are sitting there:
/usr/WebSphere/AppServer/logs
# ls -l
-rw-r--r-- 1 root system 3740694 May... (5 Replies)
Discussion started by: moustafashawky
5 Replies
4. UNIX for Dummies Questions & Answers
can someone provide a command to delete files by year? I have several files created last year 2009.
Im trying to list first ls -lrt | grep '/2009/ {print $10}' by it returns no result.
Pls advise (2 Replies)
Discussion started by: lhareigh890
2 Replies
5. Shell Programming and Scripting
Hi
I have lot of files and subdirectories inside a directory which are created in the years 2006, 2007, 2008, 2009 and 2010.
I want to delete all the files and subdirectories belonging to the year 2006 alone.
How can I do that ? (5 Replies)
Discussion started by: samsungsamsung
5 Replies
6. Shell Programming and Scripting
Hi All,
I want to login to a remote server using FTP command and then check for files older than 1 year and delete those files.
Please let me know how can i achieve this using Unix Commands.
Thanks in Advance, (10 Replies)
Discussion started by: HemaV
10 Replies
7. 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
8. Shell Programming and Scripting
Hi All,
how can i delete files from my Unix directory on the basis of year, i have files from 2001 to till 2014, but from their, i have to delete only 2013 file.Below is my file name
rwxrwxrwx 1 guopt users 5169 Jul 12 00:30 grt592_20130712003000.SAP
Thanks
Kki (2 Replies)
Discussion started by: kki
2 Replies
9. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
10. Shell Programming and Scripting
Hello Gurus,
I am facing one issue to get a file for a specific time. There are about 300 files created between 6.30 pm to 7.15 pm everyday.
Now I wanted only the file which is created on 6.45pm. No other files required.
I have used "find" command to get the files, but not getting the expected... (3 Replies)
Discussion started by: pokhraj_d
3 Replies
LEARN ABOUT DEBIAN
xcalev
XCALEV(1) General Commands Manual XCALEV(1)
NAME
xcalev - load xcal calendar files with regular dates
SYNTAX
xcalev [ -r ][ -x ][ -f file ][ -d dir ][ year ]
DESCRIPTION
Xcalev is used to preload the calendar files for the xcal program with regular events in your life. It reads lines from a file (usually
called regular stored in your Calendar directory. Each line in the file contains three fields separated by spaces or tabs, these are: a
month name, a day in the month and some text. For example:
December 25 Christmas
Dec 31 New Year's Eve
The order of the month and the day are optional, the program deduces the day by looking whether the string contains an initial numeric
character or not. The year defaults to the current year unless the program is given a year number as an argument. This year cannot be
abbreviated to two digits because xcal
deals with years from year zero. There's a rough validity check on this.
The string from the data line is inserted in the appropriate file and will appear in your xcal date strip. Nothing will happen if the
string already exists in the file for that day. This means that it's safe to run xcalev at any time, only the strings that have altered in
the regular file will be updated.
To help with entering the same event for a number of days in one month, you can give a day range with a hyphen
Jan 16-21 Usenix SF
If you supply the -r option, xcalev will delete all the matching strings that it finds in the appropriate daily file. So, if you want to
make radical changes to the regular file, you should run xcalev with the -r option to remove all the current entries from one year, edit
the regular file and run xcalev to reload things.
OPTIONS
The -r option makes xcalev delete rather than append entries.
The -x option makes xcalev operate with Calendar files that are compatible with the xcalendar program.
The -f switch is followed by a filename gives an alternative name for the regular file. If the filename does not start with a slash or a
dot, then the name of your Calendar directory will be prepended to it.
The -d switch is followed by a directory name and specifies an alterative location for your Calendar directory. Your home directory is
prepended if the name doesn't start with a slash or a dot.
FILES
$HOME/Calendar/*
xc<dd><Mon><Year> A data file is day, Month in three letter format and the year.
xy<Year> A year directory.
xw<Day> A data file for the weekly code, one per day.
SEE ALSO
xcal(1), xcalpr(1), xcal_cal(1)
AUTHOR
Copyright 1993 by Peter Collinson, Hillside Systems All rights reserved.
X Version 11 R5 October 1993 XCALEV(1)