c在linux os中 [英] c in linux os

查看:67
本文介绍了c在linux os中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

i来了解linux操作系统.exe文件是不允许的。但是必须在c .exe文件中形成。那么如何在liux os中运行ac文件?请解释Linux中允许使用

hello,
i came to know the in linux operating system .exe files is not allowed.but in c .exe file must be formed.so how will a c file run in liux os?please explain

推荐答案

.exe文件,它只是不需要的。在Linux中,OS可以通过检查内容来告诉它文件是可执行的,其中Windows依赖于具有正确扩展名的文件。


在Windows和Linux上,您可以构建可执行映像它只是在Linux上然后没有(通常)以.exe扩展名命名。
.exe files are allowed in Linux, it is just unrequired. In Linux the OS can tell it a file is executable by examining the contents, where as Windows it relies on the file having the correct extension.

On Windows and Linux you can build executable images it is just on Linux then are not (normally) named with a .exe extension.


哇!


在Linux下,文件被认为是如果设置了适当的权限,则可执行。


Linux文件名中只有两个非法字符。这些是NUL字符(''\ 0'')和笔画字符(''/'')。 NUL,因为它用于文件名字符串的标记。笔画字符,因为它是路径分隔字符。


严格来说,文件名只是一个任意的字符序列。


话虽如此,存在文件名的约定,例如.c等。最后表示C表示C。文件或.o最后表示一个可链接的对象模块。然而,这些惯例就是这样,仅此而已。


因此,如果文件被标记为可执行文件,并且您尝试通过在命令行中提及其名称来执行它(或通过将其存储在GUI中等等来执行...) ,操作系统将尝试为您执行该文件。


有很多方法可以执行文件。不仅有ELF类型的二进制可执行文件,还有脚本语言。有关Linux如何确定如何执行的定义明确的方法。一份文件。


再说一遍,我怀疑你有一个简单的程序,比如我的小Hi.c,这里:

Woah!

Under Linux, a file is considered executable if the appropriate permission is set.

There are only two illegal characters in Linux filenames. Those are the NUL character (''\0'') and the stroke character (''/''). NUL, as it is used for the sentinel for file name strings. The stroke character, as it is the path separation character.

Strinctly speaking, a file name is just an arbitrary sequence of characters.

Having said that, there are conventions for file names, like a ".c" on the end signifying a "C" file, or a ".o" on the end signifying a linkable object module. However these conventions are just that, and nothing more.

So, if a file is marked as executable, and you try to execute it by mentioning its name on the command line (or by mousing it in the GUI, etc...), the operating system will try to execute the file for you.

There are a whole bunch of ways of executing a file. Not only are there the ELF type binary executables, but there are scripting languages, as well. There are well-defined methods for how Linux determines how to "execute" a file.

Again, all that said, I suspect that you have a simple program like my little Hi.c, here:

展开 < span class =codeDivider> | 选择 | Wrap | Line数字


@jeyshree


为什么你说Linux中不允许使用.exe文件?
@jeyshree
Why do you say that .exe files are not allowed in Linux?


这篇关于c在linux os中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆