What process is listening on a certain port on Solaris?

I found this script somewhere. I don’t remember where, but it works for me: #!/bin/ksh line=”———————————————” pids=$(/usr/bin/ps -ef | sed 1d | awk ‘{print $2}’) if [ $# -eq 0 ]; then read ans?”Enter port you would like to know pid for: ” else ans=$1 fi for f in $pids do /usr/proc/bin/pfiles $f 2>/dev/null | … Read more

Random access to gzipped files?

Yes, you can access a gzip file randomly by reading the entire thing sequentially once and building an index. See examples/zran.c in the zlib distribution. If you are in control of creating the gzip file, then you can optimize the file for this purpose by building in random access entry points and construct the index … Read more

chmod: cannot read directory `.’: Permission denied [closed]

Directories need the execute permission set in order to see their contents. From http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm You can think of read and execute on directories this way: directories are data files that hold two pieces of information for each file within, the file’s name and it’s inode number. Read permission is needed to access the names of … Read more

Which systems define EAGAIN and EWOULDBLOCK as different values?

There were some… http://www.gnu.org/s/hello/manual/libc/Error-Codes.html Portability Note: In many older Unix systems, this condition was indicated by EWOULDBLOCK, which was a distinct error code different from EAGAIN. To make your program portable, you should check for both codes and treat them the same. http://lists.parisc-linux.org/hypermail/parisc-linux/9895.html On some SysV systems EAGAIN != EWOULDBLOCK. I think we inherited the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)