General
cancel
Showing results for 
Search instead for 
Did you mean: 

Unix "ls -al" command HP-UX B.11.23 U ia64

 
SOLVED
Go to solution
Highlighted
Advisor

Unix "ls -al" command HP-UX B.11.23 U ia64

When I do an 'ls -al' on my itanium server (UX11.23) as a non-superuser, the output lines contain a forward slash and the dates are not correct. Is this a user profile issues? Thanks for any help.
total 32
2 drwxr-xr-x 7 sidpers sidpers 1024 Oct 30 00:23 ./
16 drwxr-xr-x 32 root root 8192 Oct 30 00:20 ../
8 -rw------- 1 sidpers sidpers 3380 Oct 30 12:41 200
0 drwxrwxrwx 2 sidpers sidpers 96 Oct 30 00:23 local/
0 drwxrwxrwx 2 root root 96 Oct 30 00:15 lost+found/
0 drwxrwxrwx 3 sidpers sidpers 96 Oct 30 00:18 reports/
2 drwxrwxrwx 11 sidpers sidpers 1024 Oct 30 00:20 sysadm/
4 drwxrwxrwx 8 sidpers sidpers 2048 Oct 30 05:35 ups/
5 REPLIES 5
Highlighted
Honored Contributor

Re: Unix "ls -al" command HP-UX B.11.23 U ia64

> [...] HP-UX [...]

Some would say that an HP-UX forum would be a
better place for this question than this
Linux forum.

> [...] Is this a user profile issues?

Most likely. Try "man ls", and look for
"-F" and/or "-p" (for the slash).

Ask the shell what "ls" is. Depending on the
shell, this might be something like "type
ls", "which ls", ...

"man ls" should also explain various options
which affect the date-time data displayed
("-c", "-u", ...).

Or just specify "/usr/bin/ls" instead of
(plain) "ls".
Highlighted
Honored Contributor

Re: Unix "ls -al" command HP-UX B.11.23 U ia64

Could u do the same from a super user and post the output?

There is no harm with a forward slash at the end..that is default with "ls -al"


check the date and TZ from the non super user to confirm if it is showing different than required.

#date
#echo $TZ

Highlighted
Acclaimed Contributor
Solution

Re: Unix "ls -al" command HP-UX B.11.23 U ia64

Hi Julie:

If you do:

# whence -v ls

...I think you will find that 'ls' has been aliases to include the '-p' switch. This enables the trailing slash in the display of directories.

You can unalias 'ls' or use '/usr/bin/ls' to override the behavior.

Regards!

...JRF...
Highlighted
Acclaimed Contributor

Re: Unix "ls -al" command HP-UX B.11.23 U ia64

Hi (again) Julie:

...and for your "incorrect" timestamps, verify that your TZ (timezone) is set to your expectations:

# echo ${TZ}

You can see the difference by doing something like:

# TZ=UTC ls -l
# TZ=EST5EDT ls -l

Remember, every '.profile' can alias commands to its taste. As well, every '.profile' (user) can set the timezone that he/she wants to see.

Regards!

...JRF...
Regards!

...JRF...
Highlighted
Acclaimed Contributor

Re: Unix "ls -al" command HP-UX B.11.23 U ia64

>JRF: You can unalias 'ls' or use '/usr/bin/ls' to override the behavior.

You can also quote the command to remove the alias: \ls -al

I alias ls and ll to add -F. And I quote it if there are particular NFS files/symlinks that make it too slow.