Unix :/usr/local/bin/date: No such file or directory

HI ,
when I tried to run /usr/local/bin/date +%s in my unix(SUNOS) I am getting “bash: /usr/local/bin/date: No such file or directory” but in other unix machine it is working.

Below things done by me:

  1. compared the PATH in both the machines and found they have same.
  2. date +%s is not showing the output but in other machine it is showing output.

When entered :which date
output:/usr/bin/date (not working machine)
output:/usr/local/bin/date(working machine)

How can we add date in /usr/local/bin.

Request you to help me out. Thanks in advance

shell search and find commands depend on content of PATH variable
either date command removed under /usr/local/bin
or did not copy before…
normally /usr/local/bin is used for local command written by
staffs …
you can execute
1)type date and find location of date command
2)copy date command to /usr/local/bin if you have permission…

In a terminal type:

whereis date

You will receive path to date binary file. Make symlink of that file in the directory where you want to load it from.