I have a directory that contains a lot of files/sub-directorys as following.
drwxr-xr-x 2 dbl users 512 Aug 21 13:58 80
drwxr-xr-x 2 dbl users 512 Aug 21 14:19 81
-rwxr-xr-x 1 dbl users 116004 Aug 21 14:27 DEMO.sh
drwxr-xr-x 2 dbl users 512 Aug 21 14:28 Logs
-rw-r--r-- 1 dbl users 53 Aug 21 14:28 fmn_list_f.dat
-rw-r--r-- 1 dbl users 1245015 Aug 21 14:28 ppm.dat
-rw-r--r-- 1 dbl users 2093 Aug 21 14:28 ppm.log
-rw-r--r-- 1 dbl users 98980 Aug 21 14:28 XML_4aFORM.dat
-rw-r--r-- 1 dbl users 325805 Aug 21 14:28 XML_aFORM.xml
drwxr-xr-x 2 dbl users 512 Aug 21 14:28 [red]82[/red]
-rw-r--r-- 1 dbl users 90799 Aug 21 14:28 pdcs_4aform.dat
-rw-r--r-- 1 dbl users 17980 Aug 21 14:32 product.dat
I wanted to get the last sub-directory, in my sample data, [red]82[/red]. How can I do it with a simple cmd, such as
ls -d -ltr ???
Thanks all in advance for any suggestions/inputs.
-David
drwxr-xr-x 2 dbl users 512 Aug 21 13:58 80
drwxr-xr-x 2 dbl users 512 Aug 21 14:19 81
-rwxr-xr-x 1 dbl users 116004 Aug 21 14:27 DEMO.sh
drwxr-xr-x 2 dbl users 512 Aug 21 14:28 Logs
-rw-r--r-- 1 dbl users 53 Aug 21 14:28 fmn_list_f.dat
-rw-r--r-- 1 dbl users 1245015 Aug 21 14:28 ppm.dat
-rw-r--r-- 1 dbl users 2093 Aug 21 14:28 ppm.log
-rw-r--r-- 1 dbl users 98980 Aug 21 14:28 XML_4aFORM.dat
-rw-r--r-- 1 dbl users 325805 Aug 21 14:28 XML_aFORM.xml
drwxr-xr-x 2 dbl users 512 Aug 21 14:28 [red]82[/red]
-rw-r--r-- 1 dbl users 90799 Aug 21 14:28 pdcs_4aform.dat
-rw-r--r-- 1 dbl users 17980 Aug 21 14:32 product.dat
I wanted to get the last sub-directory, in my sample data, [red]82[/red]. How can I do it with a simple cmd, such as
ls -d -ltr ???
Thanks all in advance for any suggestions/inputs.
-David