- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- testing failed..
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
05-27-2002 06:09 PM
05-27-2002 06:09 PM
testing failed..
cd ${WKDIR}
find s* -mtime +90 -exec rm -f {} \;
echo "###gzip files###"
gzip `find $WKDIR -mtime +30 -print||more`
if [ -z *gz ]; then
echo "###tar files###"
tar -cvf Archive_${DATE}.tar *gz
fi
echo "###move all tar files to $FINDIR###"
mv *tar ${FINDIR}
echo "###$FINDDIR deleting tar files that is more than three months###"
cd ${FINDIR}
find *tar -mtime +90 -exec rm -f {} \;
echo "###end of removing file .. done###"
i tested it .. but it failed. what can be the prblem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 06:12 PM
05-27-2002 06:12 PM
Re: testing failed..
on 21 May 2002
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 07:33 PM
05-27-2002 07:33 PM
Re: testing failed..
The error messages will be able to give you some clues. What are the error messages?
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 07:35 PM
05-27-2002 07:35 PM
Re: testing failed..
cd ${WKDIR}
find s* -mtime +90 -exec rm -f {} \;
I suspect that you really meant something like this:
find . -name 's*' -mtime +90 -exec rm -f {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 07:46 PM
05-27-2002 07:46 PM
Re: testing failed..
The first thing that you do is to add !/usr/bin/ksh -x so that it will run in debug mode and will echo after every coomand as to what is going right or wrong .That way oit becaome very convieneint to solve the issue.
Also just try running the find command alone , I think that is the problem .
find . -name s* -print should be the format .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 12:53 AM
05-28-2002 12:53 AM
Re: testing failed..
Now that I have got the time to take a look at your code, your two find statements are using the wrong syntax. Clay has already pointed out one:
find s* -mtime +90 -exec rm -f {} \;
The other one that has not been pointed out is:
find *tar -mtime +90 -exec rm -f {} \;
which should be phrased correctly as:
find $DIR -name *tar -mtime +90 -exec rm -f {} \;
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 04:33 AM
06-01-2002 04:33 AM
Re: testing failed..
find $DIR -name *tar -mtime -print;
but there is this error msg:
"Find: missing conjunction"
whats wrg with this statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 05:17 AM
06-01-2002 05:17 AM
Re: testing failed..
your "find s* ..." is fine if your really intend to only traverse subdirectories which names begin with an "s", do you?
Then you should always use quoting around wildcards, that's the reason for the failure your mentioned just above this reply.
And finally I am quite certain you did not want to use a double-pipe in the "gzip" line...
Run the script after executing "set -x ; set -v; exec > out.txt 2>&1" and attach the output.
Just my $0.02,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 06:50 AM
06-01-2002 06:50 AM
Re: testing failed..
the last error you have to remove is the following:
--> find: missing conjunction, if you use variables with this command, you have to quote them:
find "$DIR" -name *tar -mtime +90 -exec rm {};
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 07:37 AM
06-01-2002 07:37 AM
Re: testing failed..
sorry, once again, typo in last posting...
the command line has to look so:
find "$DIR" -name *tar -mtime +90 -exec rm {}\;
Allways stay on the bright side of life!
Peter