- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting help required
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 04:13 PM
03-11-2004 04:13 PM
I need help , in writing a script, that will identify the files created by a particular date under a directory.
******************************************
Eg:
/oracle/PRD/saparch
for Eg: for date 3/11/04 and then rcp them over to another server. Again tomorrow I need the files that were generated only for that date ie 3/12/04 and then rcp them alone.
What I am asking may be pretty basic, but the thing is I dont have much time to write the script as I need it by tomorrow. Any ideas or suggestions? I would really appreciate.
Thnks
SK
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 04:36 PM
03-11-2004 04:36 PM
Re: Scripting help required
eval find ${TmpDirList} -type f -mtime +${OLDEST} -print | \
sed -f ${ExceptSed} > ${RemoveList} 2>/dev/null
Important variables:
TmpDirList where to write temp file
OLDEST number of days, in this case probably zero.
You might want to use the caljd.sh script from http://www.hpux.ws/merijn to translate dates into information your script can use.
The script is well documented and can help with all kinds of date calculations.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 05:44 PM
03-11-2004 05:44 PM
Re: Scripting help required
you can retrieve information about last modification or access time of a file, or when the inode for a file was changed, but unix does not store any information about file creation time.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 01:10 AM
03-12-2004 01:10 AM
Solution#!/bin/sh
TODAY=`date |awk '{print $2, $3}'`
for i in `ll |grep "$TODAY"|awk '{print $9}'`
do
rcp $i otherserver:/somedir
done
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 04:43 AM
03-12-2004 04:43 AM
Re: Scripting help required
Thnks a lot for the scripts, 100% points to all of you.
Thnks
SK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 05:01 AM
03-12-2004 05:01 AM
Re: Scripting help required
as this is SAP environment, why not use what is available ?
Do your standard "brarchive -s" on 00:00 each day to tape. This saves a copy of your archive files to the tape.
Anytime later, do a
brarchive -cd -d disk_copy
This saves all already saved archives to a configured destination, and deletes them afterwards. br-tools can even use scp with Rel. 6.20 and current patchlevel.
No need for script at all, and fully supported SAP Software at work :-)
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2004 07:35 AM
03-13-2004 07:35 AM
Re: Scripting help required
We have issues with our tape library. So we are unable to backup to tape.