How to print absolute path of a file with ‘ls’?

Use the ‘-d’ option of the ‘ls’ command.


For just the directory: ls –d /var/log

For everything in the directory: ls –d /var/log/*

For recursive listing of everything in the directory: ls –d /var/log/*/*



How do I turn off wildcard expansion in Unix (BASH) Shell permanently?

Have you ever been annoyed by the the auto expansion of wildcards by Shell?

The wildcard expansion is a fantastic feature, but sometimes it turns out to be very pesky especially when shell expands the wildcards in an argument passed to some other program and your requirement was not to expand the them.

When we ask a Linux/UNIX user on how to turn off the ‘wildcard’ expansion in BASH Shell, an immediate reply would be use single quotes.

Are there any facilities provided by BASH Shell to turn off wildcard expansion permanently?