Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Msg : Del

Status
Not open for further replies.

KOG

MIS
Jan 31, 2002
303
GB
Hi folks

Has this ever happened to any of you? This is really odd error message and I do not know how to solve it? I can only use rm but not del command.

$ ls
ora_20330.aud
$ pwd
/opt/oracle/product/8.1.7/rdbms/audit
$ del *.*
ksh: del: not found.
$ whoami
oracle

Any idea why? Thanking you all in advance.

Katherine
 
[tt]del[/tt] is not a AIX or unix command.

If it exists on a particular system or for a particular user, it's because someone has chosen to implement it, usually as an alias.

Assuming you're using ksh, the easiest way to do this is by running this command: [tt]alias del=rm[/tt]
You can also put that in your .profile so it's always there.
 
Many thanks for your tip, I seem to be learning something new with AIX every day !

Cheers

Katherine
 
The other thing you should know is that, assuming you use rm instead of del (which would presumably be an alias anyway and work the same), is this

#rm *.*

would remove only files with a dot somewhere in them. You can do this

#rm *

which will remove all files in the current directory.

Neither of those methods will remove a file that begins with a dot, such as .profile since those are considered slightly special. You must do this

#rm .*

to get those with the star wildcard. The shell should complain that it cannot remove '.' or '..'.

Be aware that the wildcards used in the shell are not the same as the symbols used in regular expressions, which can cause confusion when using egrep, awk, vi, perl and such. IBM Certified -- AIX 4.3 Obfuscation
 
And be very careful with rm * in the / directory, it will delete all your symlinks causing a system hang at reboot.

Use rm -r very cautiously too...it will delete all directories as well, no recycle bin to save you. IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
Yegolev, won't rm .* remove everything that's in the directory one level up from where you are? Or is that rm -r .*?

I seem to recall someone waxing an newly installed system by doing a rm .*.

Just wondering.


 
bi,

No, it won't do that, because otherwise I'd have an empty home dir right now. =) I made a temp dir in my home and touched .test in it. I then did `rm .*` in that dir and my home dir survived but .test did not. I expect that is because the ksh expands * using the current dir listing but does not follow '.' or '..'. Other shells may differ, I only use ksh.

There is the -r option that lets rm recursively remove stuff, but I don't think there is an upward-looking function. Can't think of a reason to have that, but I'm a bit afraid to test `rm -r .*` now that you have said that. =) IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top