Operating System - HP-UX
1834150 Members
2268 Online
110064 Solutions
New Discussion

Re: strange problem: "file cannot access: No such file or directory"

 
SOLVED
Go to solution
yyghp
Super Advisor

strange problem: "file cannot access: No such file or directory"

I just backup my system using make_tape_recovery, there's a warning inside:

...
pax: home/oracle/D:\iasm8home/oracle/verisign_cert.sh : No such file or directory
WARNING: The pax command returned a non-zero exit status (exit status 1)
WARNING: The pax command returned a non-zero exit status (exit status 1)
* Creation of system archive complete
...

I check the folder '/home/oracle', it did have a strange file:

#ll
...
-rw-r----- 1 oracle oinstall 74 Jul 24 11:58 D:\iasm8\click\log\clickstreamAgent.log
...

then i tried:
# mv D:\iasm8\click\log\clickstreamAgent.log abc
mv: D:iasm8clicklogclickstreamAgent.log: cannot access: No such file or directory

# rm D:\iasm8\click\log\clickstreamAgent.log
rm: D:iasm8clicklogclickstreamAgent.log non-existent

So, how can i get rid of that file ?
Thanks!
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: strange problem: "file cannot access: No such file or directory"

I would do a rm -i D*. This will prompt you for a y/n before unlinking the file. After your file has been listed and removed, hit Ctrl-C (or whatever your INTR is set to) to terminate the rm command.
If it ain't broke, I can fix that.
Michael Schulte zur Sur
Honored Contributor

Re: strange problem: "file cannot access: No such file or directory"

Hi,

rm -i *iasm*
or ls -li *iasm*
first col is inode
find ./ -inum ... -exec rm -i "{}" ";"

greetings,

Michael

Bill Hassell
Honored Contributor

Re: strange problem: "file cannot access: No such file or directory"

The problem is that the filename contains \ characters which have special meaning to shells. In this case, each \ means that the next character is to be interpreted without special processing. And the rm command never sees the \ character. The secret is remove the special meaning of \ by adding another \ as in:

rm D:\\iasm8\\click\\log\\clickstreamAgent.log

Ont the other hand, you could let the shell use pattern matching to find the file. Try:

echo D:*
echo *Agent.log

If either of these returns just the require filename, change echo to rm and the file will be gone. This file exists because you are likely sharing files with PC users.


Bill Hassell, sysadmin