When display hidden file and directory in terminal using ls -la it show two directory i.e. . and .. and when list the content of dot(.) directory it contain all file and directories that is in it's parent directory,are it create clone of that file, if yes then there is duplicate files ?
And while running a script we have use that dot directory if we are in directory where it reside like
./script
but not when we run it from another directory like
/Document/myscript/script
why?
./scriptrather thanscriptis that it prevents execution of an identically named script somewhere in your PATH (important if you mistype the script name)? – Chris H Apr 21 '14 at 16:00./scriptwill execute script in current directory, while justscriptwill look inPATH. I don't think it will look in current directory if it is not inPATH. – ek9 Apr 21 '14 at 16:11/Documents/./myscript) – Bogdacutu Apr 21 '14 at 20:18x/y/./zis the same asx/y/z. Double dots go up one level so, assuming that both y1 and y2 are directories inside directory x,x/y1/../y2/zis the same asx/y2/z– DoxyLover Apr 21 '14 at 20:22