Open ghost opened 10 years ago
The difference is subtle and I think these two are equivalent in this scenario.
See here.
The reason is that I use .bashrc for other personal settings, and I prefer to maintain just one personal configuration file.
OK, got it. Thank you for your help and I totally solved this problem with your answer and the reference I find below:
~/.profile
and setup all the paths you added before and just execute it once, but the stuff you put in the ~/.bashrc
. Every time you prompt up a new terminal, it will be executed. At a extreme case, if you put too much new paths in /.bashrc
and every time you open a new terminal, it will update these new paths again and again. Maybe that re-loading processes could effect the speed when you are runing some big data simultaneously. However, if you put all the stuff in ~/.profile
, it will finish adding all the new path once when you just login ubuntu desktop.You are totally right. But I can hardly imagine a situation where one need to open multiple non-login shells.
For me, I always run a big data on my local computer like Tophat
, which will often spend me at least 24 hr. So during this time, I still need to do other things and still use a non-login terminal to do that. Additionally, I am an undergraduate and no one could provide me a good HPC
resources. So sometimes I need to consider my actual working efficiency. That's the reason.
You can run a process in background. You can also use screen.
Recently, I peeped your repository of
gatk_setup
, and find a question. For my taste, I always use>> ~/.profile
to set a new path instead of~/.bashrc
. My question is that why you choose add a new path at/.bashrc
rather than~/.profile
? Is there any reason for it?