integrosys
asked on
Unix command to count number of files in a directory
Could anyone kindly assist, I would need a unix command to list a count of the number of files in a directory.
ls - <which parameter> ???
ls - <which parameter> ???
ASKER
I need to list the number of files obmitting subdirectories....???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So i found if i did the following it picks the vLUN's up. Is there an easier way? there has to be a better way than this
# luxadm -e port
Found path to 0 HBA ports
# ls /dev/cfg
c0 c1 c2
Your HBA vLUN connections are
/pci@1d,700000/QLGC,qlc@2, 1 c4
/pci@1d,700000/QLGC,qlc@2 c3
# cd /dev/cfg
# ls -atl
total 70
drwxr-xr-x 15 root sys 31744 Apr 24 06:43 ..
drwxr-xr-x 2 root root 512 Apr 9 01:23 .
lrwxrwxrwx 1 root root 38 Apr 3 02:42 c0 -> ../../devices/pci@1e,60000 0/ide@d:sc si
lrwxrwxrwx 1 root root 39 Apr 3 02:42 c1 -> ../../devices/pci@1f,70000 0/scsi@2:s csi
lrwxrwxrwx 1 root root 41 Apr 3 02:42 c2 -> ../../devices/pci@1f,70000 0/scsi@2,1 :sc
# cd devices
# ls -al
total 20
drwxr-xr-x 6 root sys 512 Apr 3 07:35 .
drwxr-xr-x 24 root root 512 Apr 24 06:41 ..
crw------- 1 root sys 194, 0 Apr 3 02:42 memory-controller@0,0:mc-u s3i
crw------- 1 root sys 109, 0 Apr 3 02:42 pci@1c,600000:devctl
drwxr-xr-x 6 root sys 512 Apr 7 07:19 pci@1d,700000
crw------- 1 root sys 109, 1 Apr 3 02:42 pci@1d,700000:devctl
drwxr-xr-x 4 root sys 512 Apr 3 02:42 pci@1e,600000
crw------- 1 root sys 109, 2 Apr 3 02:42 pci@1e,600000:devctl
drwxr-xr-x 3 root sys 512 Apr 3 02:42 pci@1f,700000
crw------- 1 root sys 109, 3 Apr 3 02:42 pci@1f,700000:devctl
crw------- 1 root sys 205, 0 Apr 3 02:42 ppm@1c,0:jbus-ppm
crw------- 1 root sys 205, 1 Apr 3 02:42 ppm@1e,0:jbus-ppm
drwxr-xr-x 2 root sys 5120 Apr 4 19:35 pseudo
so add the following
# cd /dev/cfg
ln -s ../../devices/pci@1d,70000 0/QLGC,qlc @2,1 c4
ln -s ../../devices/pci@1d,70000 0/QLGC,qlc @2 c3
> reboot -- -r
> devfsadm
# luxadm -e port
Found path to 0 HBA ports
# ls /dev/cfg
c0 c1 c2
Your HBA vLUN connections are
/pci@1d,700000/QLGC,qlc@2,
/pci@1d,700000/QLGC,qlc@2 c3
# cd /dev/cfg
# ls -atl
total 70
drwxr-xr-x 15 root sys 31744 Apr 24 06:43 ..
drwxr-xr-x 2 root root 512 Apr 9 01:23 .
lrwxrwxrwx 1 root root 38 Apr 3 02:42 c0 -> ../../devices/pci@1e,60000
lrwxrwxrwx 1 root root 39 Apr 3 02:42 c1 -> ../../devices/pci@1f,70000
lrwxrwxrwx 1 root root 41 Apr 3 02:42 c2 -> ../../devices/pci@1f,70000
# cd devices
# ls -al
total 20
drwxr-xr-x 6 root sys 512 Apr 3 07:35 .
drwxr-xr-x 24 root root 512 Apr 24 06:41 ..
crw------- 1 root sys 194, 0 Apr 3 02:42 memory-controller@0,0:mc-u
crw------- 1 root sys 109, 0 Apr 3 02:42 pci@1c,600000:devctl
drwxr-xr-x 6 root sys 512 Apr 7 07:19 pci@1d,700000
crw------- 1 root sys 109, 1 Apr 3 02:42 pci@1d,700000:devctl
drwxr-xr-x 4 root sys 512 Apr 3 02:42 pci@1e,600000
crw------- 1 root sys 109, 2 Apr 3 02:42 pci@1e,600000:devctl
drwxr-xr-x 3 root sys 512 Apr 3 02:42 pci@1f,700000
crw------- 1 root sys 109, 3 Apr 3 02:42 pci@1f,700000:devctl
crw------- 1 root sys 205, 0 Apr 3 02:42 ppm@1c,0:jbus-ppm
crw------- 1 root sys 205, 1 Apr 3 02:42 ppm@1e,0:jbus-ppm
drwxr-xr-x 2 root sys 5120 Apr 4 19:35 pseudo
so add the following
# cd /dev/cfg
ln -s ../../devices/pci@1d,70000
ln -s ../../devices/pci@1d,70000
> reboot -- -r
> devfsadm
ls -1 | wc -l
Cheers!
sunnycoder