I‘ve configured my Apache in chrooted jail at /jail/apache directory. However, my syslogd is not working and nothing gets logged using /dev/log and /jail/apache/dev/log. How do I fix this problem under CentOS 5.x AMD64 with SELinux?
Q. How do I find out which service is listening on a specific port? How do I find out what program is listening on a specific TCP Port?
Continue reading “Linux / UNIX Find Out What Program / Service is Listening on a Specific TCP Port”
Q. I’ve custom compile kernel and I’d like to upgrade my system to latest stable release. How do I upgrade FreeBSD to new release without using freebsd-update binary tool?
Q. Iâ€™m new to Linux and how do I examine filesystem and identify regular files or directories?
A. Both Linux and UNIX comes with ls command for examining the filesystem. You can use ls command to look at the filesystem. ls command can display:
=> Character devices
=> Regular files
=> Sym links (symbolic links)
=> Block devices
ls command examples
Display /etc directory files, enter:
$ ls /etc
When invoked without any arguments, ls lists the files in the current working directory:
Use -l (long option) to lists filenames, sizes, permissions, type and all other information:
$ ls /etc/passwd
-rw-r--r-- 1 root root 2453 Jul 17 16:25 /etc/passwd
A directory is marked with a d as the first letter of the permissions field:
ls -ld /etc
drwxr-xr-x 88 root root 12288 Aug 5 23:46 /etc
A symbolic link is marked with an l (lower case L) as the first letter of the permissions string:
ls -l /bin/nisdomainname
lrwxrwxrwx 1 root root 8 Jul 10 08:50 /bin/nisdomainname -> hostname
- A named pipe is marked with a p as the first letter of the permissions string.
- A socket is marked with a s as the first letter of the permissions string.
- A character device is marked with a c as the first letter of the permissions strings. (ls -l /dev/console)
- A block device is marked with a b (ls -l /dev/sdb1).