Sponsored Content
Top Forums Shell Programming and Scripting Script to find files on a given input date Post 302131818 by jim mcnamara on Monday 13th of August 2007 10:07:51 PM
Old 08-13-2007
Code:
#!/bin/ksh
# $1 = date in the following format %y%m%d
touch -t "$1"0000:01 ~/dummy
find /path/to/folder -newer ~/dummy -type f

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find files and using them as input arguements for another command

I need to do the following: 1) find files in certain directories that have todays date stamp 2) use these files as input arguements into another command (1 Reply)
Discussion started by: bobbygrep
1 Replies

2. UNIX for Dummies Questions & Answers

shell script to find files by date and size

Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory. I don't know how to implement this shell script using ''find''. appreciate any... (1 Reply)
Discussion started by: dadadc
1 Replies

3. Shell Programming and Scripting

Can I know find syntax to find given date files

Hi All, Can i use find command to know given date files? If yes, then please let me know the syntax for the same. Thanks in advance for your postive responses Regards, Bachegowda (3 Replies)
Discussion started by: bache_gowda
3 Replies

4. Shell Programming and Scripting

shell script to find latest date and time of the files

Hi everyone, Please help:) I have a list of 1000 different files which comes daily to the directory.Some of the files are not coming to the directory now. I need to write a shell script to find the latest date and time of the files they came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies

5. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

6. Shell Programming and Scripting

Find Files with a input in directories

So i have directories that store logs, 1 directorie for each day, with the name like this : 2012_07_01/ 2012_07_02/ and for each directorie we have the logs, inside them lives the logs for that day, and every log have this name pattern : ... (2 Replies)
Discussion started by: drd0spt
2 Replies

7. Shell Programming and Scripting

Input date on script

How can I allow users to change the date and time in a script? Say the user1 wil login and he will be inputting the desired date (example format below). I will need this script so the user can login and change the date anytime during the day. I will not allow him to use any command except the date... (2 Replies)
Discussion started by: lhareigh890
2 Replies

8. UNIX for Advanced & Expert Users

Help with ksh script to list, then cp files from a user input date range

Hi, I'm quite new to ksh scripting, can someone help me with this. Requirements: I need to create a script that list the files from a user input date range. e. g. format of file: *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00*... (1 Reply)
Discussion started by: chococrunch6
1 Replies

9. Shell Programming and Scripting

Script to get previous date for the given input date..

hi all, need a script or command to get the previous date for the given input date... like in my script i will pass date as input parameter like 2014-12-01 and i want the output as previous date.. ie.. 2014-11-30 (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

10. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies
PACKF(1)							     [nmh-1.5]								  PACKF(1)

NAME
packf - pack messages in nmh folder into a single file SYNOPSIS
packf [+folder] [msgs] [-file name] [-mbox] [-mmdf] [-version] [-help] DESCRIPTION
Packf will pack copies of messages from a folder, into a single file. If the -mbox switch is given (the default), then the messages are separated using mbox (uucp) style delimiters. This is the format used by most mail clients (elm, mailx, etc.). If the -mmdf switch is given, then the messages are separated by mmdf style delimiters. Each message in the file is separated by four CTRL-A's and a newline. You may specify the name of the file in which to use with the -file name switch. If you do not specify the name of the file, it will default to "msgbox". If the given file name points to an existing file, then the specified messages will be appended to the end of the file, otherwise the file will be created and the messages appended. packf makes an mbox-style delimiter by examining the first line of the message. If the first line is a "Return-Path" field, its address and the current date and time are used. Otherwise, if the first line has an "X-Envelope-From" field, its contents (which should already be in the correct format) are used. Otherwise, a dummy address and the current date and time are used. Messages that are packed by packf can be unpacked using inc. FILES
$HOME/.mh_profile The user profile .msgbox.map A binary index of the file PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Msg-Protect: To set mode when creating a new `file' SEE ALSO
inc(1), msh(1) DEFAULTS
`+folder' defaults to the current folder `msgs' defaults to all `-mbox' `-file ./msgbox' CONTEXT
If a folder is given, it will become the current folder. The first message packed will become the current message. MH.6.8 11 June 2012 PACKF(1)
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy