- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find: cannot get 'pwd' script error
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
01-26-2004 06:09 AM
01-26-2004 06:09 AM
find: cannot get 'pwd' script error
Here is the problem...
I have an HP 11.00 system.
I am running into this problem that when I run a script it returns an error...
find: cannot get 'pwd'
This is from the command...
find /home/ac/log -name "archbu.log.*" -type f -mtime +7 -exec /bin/rm -r {} ";"
I have tried it with \; at the end as well, and still no go.
The funny thing is, is that I have this identicle script on another identicle server, and it works perfect. All permission's are the same.
This script is being run from roots crontab...
su acadmin -c /home/ac/scripts/backup/d2t_archbu.sh
I know if I cd to the directory first, I know it will work, but why can't it work with cd'ing to the directory, like the other server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:17 AM
01-26-2004 06:17 AM
Re: find: cannot get 'pwd' script error
Is /home/ac/log linked to another directory?
If so try using -follow in that command.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:19 AM
01-26-2004 06:19 AM
Re: find: cannot get 'pwd' script error
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:20 AM
01-26-2004 06:20 AM
Re: find: cannot get 'pwd' script error
Do you use the automounter ? If so the homedir is not mounted before you use the cd command.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:21 AM
01-26-2004 06:21 AM
Re: find: cannot get 'pwd' script error
I changed the permissions on /rootuser, since root was running the crontab, and everything works fine.
WOW, what alitte gotcha!
Thank you all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:34 AM
01-26-2004 06:34 AM
Re: find: cannot get 'pwd' script error
the problem is really that find tries to read in the CURRENT directory, no matter whether this is relevant for the action to be taken or not. The outcome of your command will depend on the directory from which you execute the command. If you cd to any directory in which your user has read access the error will not appear.
I have just tried thie:
#
# ls -ld .
d-wx--x--x 2 jxk users 96 Jan 26 20:09 .
# find /tmp -type f -name "btmp.stat"
find: cannot get 'pwd'
# cd ..
# ls -ld .
drwxr-xrwx 23 jxk users 2048 Jan 26 20:09 .
# find /tmp -type f -name "btmp.stat"
find: cannot open /tmp/.AgentSockets
find: cannot open /tmp/syslogtp
find: cannot open /tmp/tp-sc
find: cannot open /tmp/hp11templ
find: cannot open /tmp/fbatp
find: cannot open /tmp/shitp
find: cannot open /tmp/oper
find: cannot open /tmp/msg
find: cannot open /tmp/app
find: cannot open /tmp/opcmsg13
find: cannot open /tmp/shi
find: cannot open /tmp/wnt
/tmp/btmp.stat
as can be seen it is not relevant for the find command whether it can read the current dir or not. But to explain why this is so... well, that is a challenge.
regards,
John K.
p.s. I still think you should finish your find command by the escaped semicolon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 06:42 AM
01-26-2004 06:42 AM
Re: find: cannot get 'pwd' script error
# pwd
/home/jxk/newdir