简体   繁体   English

如何在Linux中保存Withou扩展名文件?

[英]How do I save a file Withou extension in linux?

Recently i was trying to save a file as "ssh" for my raspberry pi, with which i'm having trouble configuring. 最近,我试图为树莓派将文件另存为“ ssh”,但配置时遇到问题。 the only way i can save a file without extension is on windows. 我可以保存不带扩展名的文件的唯一方法是在Windows上。 is there any way i can do that on linux so i won't need to keep changing OS all the time? 有什么办法可以在linux上做到这一点,所以我不需要一直在更改操作系统?

Not sure what you're using but unix (and linux by extension (no pun intended)) don't even have the concept of an extension on a filename. 不确定您使用的是什么,但unix(和linux的扩展名(无双关))甚至没有文件名扩展名的概念。 It's all just a filename and there can be dots in them. 全部都是文件名,并且其中可能包含点。 The 8.3 thing came from MS-DOS ... 8.3的东西来自MS-DOS ...

So to create a file called "ssh" just name it that, no dot no extension and you're done. 因此,要创建一个名为“ ssh”的文件,只需将其命名为“ no,no,扩展名”就可以了。

Eg: 例如:

$ echo "hello world" > ssh

or 要么

$ vi ssh

etc. all are capable of creating a file called ssh (take care with the first one, it'll overwriting existing files). 等等。所有这些功能都可以创建一个名为ssh的文件(请注意第一个文件,它将覆盖现有文件)。

Also if you have a file salled let's say "ssh.whatever", you can rename it with 另外,如果您有一个已售出的文件,比如说“ ssh.whatever”,则可以使用

$ mv ssh.whatever ssh

If you have a tool that's not allowing you to create a file without an extension on a unix system, odds are it's not something that was made by somebody who knows what they were doing. 如果您使用的工具不允许您在Unix系统上创建没有扩展名的文件,那么很有可能不是知道自己正在做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM