- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- writing a script not going well
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
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
08-08-2002 07:29 AM
08-08-2002 07:29 AM
writing a script not going well
The format is filename.yymmdd and I am having problems getting it to pick up the date in this format and compare it to the file name.
Any help out there?
thanks
-DH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 07:45 AM
08-08-2002 07:45 AM
Re: writing a script not going well
I have attached a script that you can modify to fit your needs the format is very easy you can make it clear out or delete any files or logs and it will always keep the date stamp of the file and even compress them.
I got it from the following ftp site.
ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/
Hope this helps
~ Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 07:46 AM
08-08-2002 07:46 AM
Re: writing a script not going well
If you just want to delete files which are 3 days old, use the find command:
# cd dir_path
# find . -xdev -type f -mtime +3 -exec rm {} \;
hth,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 07:55 AM
08-08-2002 07:55 AM
Re: writing a script not going well
check the following thread.
Rgds,
Jean-Luc
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc8294b3ef09fd611abdb0090277a778c,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 08:22 AM
08-08-2002 08:22 AM
Re: writing a script not going well
I answered a request rather similar to this yesterday where the mtime might not be reliable and you want to use the date encoded in the filename.
Here is one solution just change the target directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 08:24 AM
08-08-2002 08:24 AM
Re: writing a script not going well
Regards, Clay