大約一年前,我想編輯.bash_profile來添加一些文本,當我打開終端(我在Mac上使用最新的操作系統)。今天,我想改變那些文字,只是發現我找不到我編輯的原始文件。看起來MacPorts移動了一些東西,因爲我可以在.bash_profile文件上添加文本,但去年我創建的文本不在文件中,我無法刪除它。尋找缺少的.bash_profile
這是我目前的.bash_profile:
export PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
##
# Your previous /Users/nathanielhoffman/.bash_profile file was backed up as /Users/nathanielhoffman/.bash_profile.macports-saved_2015-10-11_at_12:31:11
##
# MacPorts Installer addition on 2015-10-11_at_12:31:11: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
你問之前,是的,我的.profile和.bashrc中進行檢查。空空如也。 MacPorts表示它也沒做任何備份配置文件。在這個文件的末尾添加諸如「echo」hello world「'這樣的文本將在神祕文本源下添加文本。
有沒有一種方法可以找出我的電腦在第一次打開shell時讀取的文件?提前致謝!
的MacPorts通常會備份你的.bash_profile製作的文件進行任何更改,如'之前.bash_profile.macports-saved_2015-01-20_at_19:08:40' –
問題是,該文件中的唯一行是: –
PATH =「/ Library/Frameworks/Python.framework/Version/3.5/bin:$ {PATH}」 export PATH –