Sponsored Content
Top Forums Shell Programming and Scripting Need last month files after 10th of every month Post 302909464 by rbatte1 on Thursday 17th of July 2014 06:02:57 AM
Old 07-17-2014
Hello nani1984,
  • What have you tried so far?
  • What errors/output are you getting?
  • What OS and version are you using?
  • What shell or other tools would you prefer to code in?
  • How do you think you can identify the files? (file name embedded date or last update time?)
Most importantly, What have you tried so far?

There are probably many ways to achieve what you want but you need to be clear about what you want and what you have. Showing some effort and therefore the specific thing that you are stuck with is likely to get a better response. Can you help us to help you?

For a given date (tell us which one you are basing it on), please show a sample with ls -l the range of files you are likely to have, showing us which you want to process and which to ignore. It will focus the discussion.

When you are discussion files based on the 10th or later of the month, it would be good to know what differences there will be with running the process before or after 10th. Does it make a difference?

Do you have any concerns over scheduling the work?


Thanks, in advance,
Robin
UK
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find all files by month

Hi, I am trying to do achieving of files by months. find /test -name \*.* -mtime +30 will give me the result of all modified files after 30 days. But lets say i want to list all files that is modified in last months... what is the command to do it? Thanks! (13 Replies)
Discussion started by: maldini
13 Replies

2. Shell Programming and Scripting

How to get previous month files

Hi, My task to to delete files which are of previous months. I have files named as follows *CCYYMMDD.xls. on a particular day i have delete previous months files i.e in Dec i have delete all nov files which look like 200511DD.XLS in Jan i have to delete all Dec files 200512DD.xls ... (7 Replies)
Discussion started by: savitha
7 Replies

3. HP-UX

deleting files for a particular month

Hi, I want to delete files of a particular month in a particular directory. Please tell me a script for this so that it will search a particular kind of file in that directory and delete them.I am using HP-UX. (1 Reply)
Discussion started by: adityam
1 Replies

4. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

5. Shell Programming and Scripting

How to delete1 month old files?

Hi, I need to create a script which should delete all the log files which are 1 month old or older than that. For ex: Today's date -- > 09/30/2010 Directory --> /user/work/log/ Files--> log.07182010 created on 07/18/2010 log.08182010 created on 08/18/2010 log.09182010 ... (4 Replies)
Discussion started by: ustechie
4 Replies

6. Shell Programming and Scripting

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

7. HP-UX

Removing files from a particular month

Hi All I am trying to remove files from february, only using the following commands: find . -mtime 70 -exec rm {} \;, but I dont seem to get them deleted. But I am confused, now, because I have been told to use -atime, like find . -atime 75 -exec rm {} \;Please can you help! FR (8 Replies)
Discussion started by: fretagi
8 Replies

8. Shell Programming and Scripting

Convert From Month Number to Month Name

Hi, I have a script that accepts an input date from the user in yyyy-mm-dd format. I need to get the mm-dd part and convert it to month name. example: 2011-11-15 I want that to become "Nov 15" I don't have the GNU date, I am using an AIX os. Thanks. (1 Reply)
Discussion started by: erin00
1 Replies

9. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

10. UNIX for Advanced & Expert Users

Get last month files

Hi All, How to get last month files. Ex : 1st Jan i have to get Dec 31 days files and on Feb 1st i have to get Jan 31 days files and on Mar 1st i have to get Feb 28 days files. Below are the example files with date and timestamp. aaa.txt.timestamp aaa.txt.timestamp aaa.txt.timestamp Please... (7 Replies)
Discussion started by: kiranparsha
7 Replies
DPKG-DEPCHECK(1)                                                      DEBIAN                                                      DPKG-DEPCHECK(1)

NAME
dpkg-depcheck - determine packages used to execute a command SYNOPSIS
dpkg-depcheck [options] command DESCRIPTION
This program runs the specified command under strace and then determines and outputs the packages used in the process. The list can be trimmed in various ways as described in the options below. A good example of this program would be the command dpkg-depcheck -b debian/rules build, which would give a good first approximation to the Build-Depends line needed by a Debian package. Note, however, that this does not give any direct information on versions required or architecture-specific packages. OPTIONS
-a, --all Report all packages used to run command. This is the default behaviour. If used in conjunction with -b, -d or -m, gives additional information on those packages skipped by these options. -b, --build-depends Do not report any build-essential or essential packages used, or any of their (direct or indirect) dependencies. -d, --ignore-dev-deps Do not show packages used which are direct dependencies of -dev packages used. This implies -b. -m, --min-deps Output a minimal set of packages needed, taking into account direct dependencies. Using -m implies -d and also -b. -C, --C-locale Run command with the C locale. --no-C-locale Don't change locale when running command. -l, --list-files Also report the list of files used in each package. --no-list-files Do not report the files used in each package. Cancels a -l option. -o, --output=FILE Output the package diagnostics to FILE instead of stdout. -O, --strace-output=FILE Write the strace output to FILE when tracing command instead of using a temporary file. -I, --strace-input=FILE Get strace output from FILE instead of tracing command; strace must have be run with the -f -q options for this to work. -f, --features=LIST Enable or disabled features given in the comma-separated LIST as follows. A feature is enabled with +feature or just feature and disabled with -feature. The currently recognised features are: warn-local Warn if files in /usr/local or /var/local are used. Enabled by default. discard-check-version Discards execve when only a --version argument is given to the program; this works around some configure scripts that check for binaries they don't actually use. Enabled by default. trace-local Also try to identify files which are accessed in /usr/local and /var/local. Not usually very useful, as Debian does not place files in these directories. Disabled by default. catch-alternatives Warn about access to files controlled by the Debian alternatives mechanism. Enabled by default. discard-sgml-catalogs Discards access to SGML catalogs; some SGML tools read all the registered catalogs at startup. Files matching the regexp /usr/share/sgml/.*.cat are recognised as catalogs. Enabled by default. --no-conf, --noconf Do not read any configuration files. This can only be used as the first option given on the command-line. -h, --help Display usage information and exit. -v, --version Display version and copyright information and exit. CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. Command line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently recognised variable is: DPKG_DEPCHECK_OPTIONS These are options which are parsed before the command-line options. For example, DPKG_DEPCHECK_OPTIONS="-b -f-catch-alternatives" which passes these options to dpkg-depcheck before any command-line options are processed. You are advised not to try tricky quot- ing, because of the vagaries of shell quoting! SEE ALSO
dpkg(1), strace(1), update-alternatives(8) and devscripts.conf(5). COPYING
Copyright 2001 Bill Allombert <ballombe@debian.org>. Modifications copyright 2002,2003 Julian Gilbey <jdg@debian.org>. dpkg-depcheck is free software, covered by the GNU General Public License, version 2 or (at your option) any later version, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for dpkg-depcheck. dpkg-depcheck March 2002 DPKG-DEPCHECK(1)
All times are GMT -4. The time now is 02:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy