- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- find command problem
Operating System - Tru64 Unix
1748042
Members
4970
Online
108757
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-17-2010 03:51 AM
тАО01-17-2010 03:51 AM
Hi all
I am using tru64 unix.
I executed this command form root
and received an error message.
The command is :-
#find / -name *.sql -exec \ rm {} \;
The error is:-
#find:cannot execute rm command.
could anyone help me please.
bye.
I am using tru64 unix.
I executed this command form root
and received an error message.
The command is :-
#find / -name *.sql -exec \ rm {} \;
The error is:-
#find:cannot execute rm command.
could anyone help me please.
bye.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2010 07:34 AM
тАО01-17-2010 07:34 AM
Solution
> #find / -name *.sql -exec \ rm {} \;
Try something like:
find / -name '*.sql' -exec rm {} \;
You need to protect the "*" from the shell.
I don't know what that first "\" was supposed
to do for you.
But I'd run it once without the "rm" stuff,
to make sure that it will find and delete
only what you wish to have deleted. Or,
add "-i" to the "rm" command:
find / -name '*.sql' -exec rm -i {} \;
Try something like:
find / -name '*.sql' -exec rm {} \;
You need to protect the "*" from the shell.
I don't know what that first "\" was supposed
to do for you.
But I'd run it once without the "rm" stuff,
to make sure that it will find and delete
only what you wish to have deleted. Or,
add "-i" to the "rm" command:
find / -name '*.sql' -exec rm -i {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2010 06:54 PM
тАО01-17-2010 06:54 PM
Re: find command problem
try
find / -name *.sql -exec rm {} \;
or
find / -name *.sql | xargs rm
be lil careful you using * which mean everything ;)
BR,
Kapil+
find / -name *.sql -exec rm {} \;
or
find / -name *.sql | xargs rm
be lil careful you using * which mean everything ;)
BR,
Kapil+
I am in this small bowl, I wane see the real world......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2010 10:36 PM
тАО01-17-2010 10:36 PM
Re: find command problem
> try
> find / -name *.sql -exec rm {} \;
Not quoting the "*" wildcard here is a Really
Bad Idea (tm). For example:
urtx# pwd
/root
urtx# ls -l *.tar
-rw-r--r-- 1 root system 20480 Jun 5 2007 tt_gnu.tar
-rw-r--r-- 1 root system 10240 Jun 5 2007 tt_t64.tar
urtx# find /root -name *.tar -ls
find: missing conjunction
urtx# find /root -name '*.tar' -ls
2507 20 -rw-r--r-- 1 root system 20480 Jun 5 2007 /root/tt_gnu.tar
2506 10 -rw-r--r-- 1 root system 10240 Jun 5 2007 /root/tt_t64.tar
2322 13 -rwxr-x--- 1 nobody nobody 12800 Jun 6 2007 /root/tt2/tt_gnu_x.tar
> You need to protect the "*" from the shell.
Still true, in general. Although you may get
lucky from time to time, you need to decide
how much you wish to depend on luck.
> find / -name *.sql -exec rm {} \;
Not quoting the "*" wildcard here is a Really
Bad Idea (tm). For example:
urtx# pwd
/root
urtx# ls -l *.tar
-rw-r--r-- 1 root system 20480 Jun 5 2007 tt_gnu.tar
-rw-r--r-- 1 root system 10240 Jun 5 2007 tt_t64.tar
urtx# find /root -name *.tar -ls
find: missing conjunction
urtx# find /root -name '*.tar' -ls
2507 20 -rw-r--r-- 1 root system 20480 Jun 5 2007 /root/tt_gnu.tar
2506 10 -rw-r--r-- 1 root system 10240 Jun 5 2007 /root/tt_t64.tar
2322 13 -rwxr-x--- 1 nobody nobody 12800 Jun 6 2007 /root/tt2/tt_gnu_x.tar
> You need to protect the "*" from the shell.
Still true, in general. Although you may get
lucky from time to time, you need to decide
how much you wish to depend on luck.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP