Hi all,
To listing the files in the directory , am using the following command along with the absolute path .
Code:
$ls -lt /home/zamo/test/* |grep -v total
-rw-r--r-- 1 zamo zamo 7736 Oct 7 12:54 /home/zamo/test/mytestfile
The output is good as i need , but i need the output as
Code:
-rw-r--r-- 1 zamo zamo 7736 Oct 7 12:54 mytestfile
How can I get it? I use ls -lt|awk -F\/ '{print $NF}' which gives me the file name only. I want the complete output as i shown above excluding the absolute path.
Thanks