tag 10342 notabug thanks On 12/21/2011 09:27 AM, RANJITH REDDY KOMANLA wrote: > ls -l : Nothing within the directory !! > But when i tried using -----> dirname xyz > it gave output as <.> { output states , present directory This is the correct behavior. It is required by POSIX - dirname is a completely textual operation that pays no attention to what exists or does not exist in your file system, and the dirname of a string that resembles a relative file name is the string '.' (the current directory is the correct dirname of a relative file name, if that relative name was indeed a file; but the algorithm works even if there is no file by that name). http://pubs.opengroup.org/onlinepubs/9699919799/utilities/dirname.html I'm closing this bug report, as there is no bug here. However, feel free to make further comments if you need more clarification, or help in determining if 'dirname' really is the best fit for the shell scripting task you were really attempting to solve. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org