質問

Anyone know why 'Not a directory' is being output preventing me from changing timezone?

[root@server etc]# cat localtime 
cat: localtime: Not a directory
[root@server etc]# ls localtime 
ls: localtime: Not a directory
[root@server etc]# ln -sf /usr/share/zoneinfo/Eire localtime 
ln: accessing `localtime': Not a directory
[root@server etc]# ln -sf /usr/share/zoneinfo/America/Nome localtime 
ln: accessing `localtime': Not a directory
[root@server etc]# date
Thu Apr 24 09:58:44 UTC 2014
役に立ちましたか?

解決

'Not a directory error' is coming because here localtime is a symbolic link not a directory.

using command:ls -l localtime gives: lrwxrwxrwx. 1 root root 27 Oct 31 19:00 localtime -> /usr/share/zoneinfo/Etc/UTC

as output. Here 'l' in the begining means that localtime is a symbolic link.

For the command : ln -sf /usr/share/zoneinfo/Eire localtime to work,

delete the existing symbolic link localtime as : rm localtime

then use command : better see This link

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top