Meaning of .files and when to use ./filename
This may have been asked before but I dont even know how to search the forum for this question
Its really two questions. 1) What does it mean when a filename (or directory name?) is starts with a . (dot). Are these supposed to be hidden files? E.g. .myFile will not be shown by "ls" but only "ls -a" 2) Why do I see many times references to filenames in commands preceded by the ./ instead of just the filename in the current directory E.g: #cat ./someFile instead of #cat someFile I am guessing so its to force to use the file from the current directory to avoide searching environment paths. P.S. I know the meaning of . and .. If there is a link somewhere where these things are discussed I would appreciated. |
1) Yes it is used to hide files - like the hidden file attreibute in windows.
2) With cat there should be no need to use "./" This should really only be used for running executeables in hte current directory. When you cat a file it won;t look in your path. |
Quote:
Is there some tutorial I can read on this stuff? WHat would I search under. |
The bash will only search the directoies in the path variable - to see your paths:
echo $PATH|sed s/\:/\\n/g The bash howto probably has most of this in it: http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html |
All times are GMT -5. The time now is 06:43 AM. |