I was wondering about a simple event that occurred while I was installing node version manager on my 64bit Amazon Linux 2014.09 Web Server. When I executed this install script
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash
NVM installed onto my filesytem at ~/.nvm/
What is the significance of the ~/.nvm as opposed to ~/nvm ? Specifically, what does the ' . ' mean before nvm?
This is especially important because when I execute " ll " in the ~/ folder, I do not see any files. However, when I execute cd ~/.nvm , I am taken to the ~/.nvm folder.
Also, in order to get nvm working in the terminal, I had to "source" the nvm.sh file in this way
source ~/.nvm/nvm.sh
What did this source command accomplish?
Note: everything is working, this is just a curiosity I would like to understand better so that I feel more comfortable with server configurations etc.
Thanks a bunch!
cp -Rf ~/.file/ ~/file/you will copy the directory named.fileand all hidden or not subdirectories in the directory namedfileif it exists, else in your home (~). Instead iffileis a file you will receive as answer an errorcp: impossible .... .file/ is not a directory– Hastur Feb 18 '15 at 15:17cp -Rf ~/.nvm/ ~/nvm/Would this change the functionality of nvm if you "source" it after this move? – deusofnull Feb 18 '15 at 15:35sourceis like to execute all the script as you were writing that commands in the present shell. You question should be: what will it happens if I change the name in which is installed a script? ;) The answer is it depends from the script. It's possible you will have problem. I cannot know it from here, but for example each call with absolute path will search it in~/.nvm/whateverelse... and not in you new directory~/nvm/whateverelse. – Hastur Feb 18 '15 at 15:47ln -s ~/.nvm ~/nvm. Note that there are two implications of hidden files: as well as not appearing in a default directory list, they also do not get expanded for*. To show all files in the current directory you needecho .* *, orecho .[^.]* *if you want to exclude.and... – AFH Feb 18 '15 at 16:30nvm), it usual loads some basic settings that are part of the program (compiled into it). Then it reads a file (something like/etc/nvm) that the system admin (root) can use to make changes for all users on the system. Lastly the program reads configs for the user, that overrides all others (usually~/.nvm). Notice that the namen is important. And it's nothing special with the., it is just not printed byls. – Anders Feb 18 '15 at 17:18.just means ls doesn't print it, that's fine. I might do that sym link solution though, just for visibility if it wouldn't impact functionality. Is there a command for listing hidden files or do you just have to make note of it somewhere? – deusofnull Feb 18 '15 at 17:36ls -a,ls -A,echo .*,echo .[^.]* *... ;-) and manlsfor all the options... I forgettree -aif you have the commandtreeinstalled. – Hastur Feb 18 '15 at 17:59