簡體   English   中英

如何使用jupyter編輯jupyter服務器上的文件,例如“〜/ .bashrc”

[英]How can I use jupyter to edit a file on jupyter server, such as "~/.bashrc”

我想編輯Jupyter服務器上的文件,將“ /usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim”添加到“ /.bashrc”。 但是我無法切換到bash終端窗口。 是否可以使用Jupyter直接編輯“ /.bashrc”? 謝謝!

您可以使用%%writefile myfile將當前單元格的內容保存到文件中。 使用%less myfile顯示文件內容:

In [1]: %%writefile myfile
        My file content

In [2]: %less myfile

您可以先使用%load myfile將文件內容%load myfile到單元格中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM