Operating System - HP-UX
1833792 Members
1849 Online
110063 Solutions
New Discussion

How to delete a Symbolic link

 
Steve Tang
Occasional Advisor

How to delete a Symbolic link

Good day!

after the fail of NFS remote directory mounting the directory "/cdrom" it changed to Symbolic link like that:

"lrwxrwxrwx 1 root root 20 Aug 22 02:42 cdrom"


then I want to see the cdrom by "cd /cdrom"
it prompt out
"NFS readlink fail for server (pid939@/cdrom): RPC Unable to receive."

how to delele the Symbolic link "cdrom" now ?
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: How to delete a Symbolic link

Not quite sure I understand.

root user should be able to delete anything. If its on the remote box, log on that box as root. If you don't have root priv on the box, inform the admin.

I think the problem may be a state NFS link, which means you may need to umount and then mount the remote filesystem. If that server is back up.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
twang
Honored Contributor

Re: How to delete a Symbolic link

# ln -s /dev/null temp
# ll temp
lrwxr-xr-x 1 root sys 9 Aug 22 12:47 temp -> /dev/null
# rm temp
# ll temp
temp not found
#
Umapathy S
Honored Contributor

Re: How to delete a Symbolic link

Steve,
I dont see any problem in deleting a soft link. Its is a stale NFS link. If you restart the NFS service then this will go away. Is automount turned on for this?

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
Ravi_8
Honored Contributor

Re: How to delete a Symbolic link

Hi,

#fuser -k /cdrom

restart the NFS services
never give up
Steve Tang
Occasional Advisor

Re: How to delete a Symbolic link

yes automount turned on
Steve Tang
Occasional Advisor

Re: How to delete a Symbolic link

so, now I need to restart the NFS ? what will happen when restart NFS? will other the process in the server will affect ?
Steve Tang
Occasional Advisor

Re: How to delete a Symbolic link

I done the
"#fuser -k /cdrom"
it prompt out

"/cdrom: stat: NO such file or directory"
"fuser: could not find or access the file /cdrom."

but when i use "ls -l"
I can see that

"lrwxrwxrwx 1 root root 20 Aug 22 02:42 cdrom"
..?
Steve Tang
Occasional Advisor

Re: How to delete a Symbolic link

push please help
Steve Tang
Occasional Advisor

Re: How to delete a Symbolic link

I solve the problem . when I turn off the automount.
thanks UmapathyS.