Can't view directory content - SUNOS

Hi,

The app I support has a directory used for debugg files. It has just come to light there are no files in there. Or is there :confused:

Changing into the directory and completing an ls -lta you get no files. This is truly not right for the application. If I go up one directory the directory size is
drwxrwxr-x 2 user bin 71168 Jun 26 00:03 logdebug

If you cat ./logdebug you get the following nonsense (actually not nonsense these are the names of the files I should be able to see. I can link the name PID to other logs, the yare new), This just stream for pages as there a lot of log files.
cftp-19517-trans.log@cftp-25712-trans.log cftp-21911-trans.log¬dcs_cftp_flx-19487.logŒcftp-1897-trans.log cftp-22
468-trans.log cftp-10589-trans.log0cftp-11166-trans.log.logans.log.............

If you do a file logedug it comes up as a directory. I can't figure out how this one directory has totally screwed up.

SunOS prod002 5.8 Generic_117350-13 sun4u sparc SUNW,Sun-Fire-15000

Any idea where the files really are?

Cheers,
Neil

Well, the cat command should not be working on directories. Check below:

/$ uname -a
SunOS xxxxxx 5.8 Generic_117350-24 sun4u sparc SUNW,Ultra-Enterprise
/$ cat /tmp
cat: input error on /tmp: Invalid argument
/$ less /tmp
/tmp is a directory
/$ more /tmp

*** /tmp: directory ***

Also, don't go by the size field for a directory. The directory size increases as more files are added (this is the size field in the directory that I am talking about and not 'size of directory'='total size of all files'), but it may not decrease if you remove files.

Are you using wildcards for the "ls"? The fact that you have a large amount of files inside, could affect the use of wildcards.

Try to "cd" to the directory and give:

find . -ls

Chek perms also :slight_smile:

Regards.