Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何在 SSH 中创建一个已经包含代码的文件?
类似于 touch filename.php >> echo "thecode here" 的内容
??
另外,任何 SSH 提示?希望变得更有效率。
你知道,工作更聪明而不是更努力。
echo "some text" > myfile.txt
将生成一个名为 myfile.txt 的文件,其中包含“一些文本”。
如果您的本地计算机上已经有一个文件要移动到远程计算机,则可以使用 scp。
scp /some/local/file.txt my.server.com:/some/remote/file.txt