在子目录中创建文件,但无法打开文件 [英] created file in subdirectory but cannot open file

查看:78
本文介绍了在子目录中创建文件,但无法打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了

但是现在我在基本目录中有无法打开的大小为

But now I have files, with size, in the base directory that cannot be opened and are named

.\output_files\error_log.txt

如果我双击该文件,则会被告知找不到该文件,并被告知尝试使用其他路径.如果我使用notepad ++打开,系统会询问我是否要创建文件.在.\ output_files

if I double click the file, I am told the file cannot be found and told to try a different path. if I open with notepad++ I am asked if I want to create the file. The an empty file is created in .\output_files

这些文件是由我的大学linux集群在大学共享服务器空间中创建的,然后我通过Windows笔记本电脑上的AFS链接查看了文件.

The files are created by my university linux cluster in the university shared server space, then I am viewing the file through an AFS link on my windows laptop.

推荐答案

问题是您使用的是反斜杠,而不是斜杠.

The problem is that you are using backslashes, not slashes.

UNIX上的路径组件定界符为/,而不是\.

The path component delimiter on UNIXes is /, not \.

并且由于/在C字符串中不是特别特殊,因此您不需要使用反斜杠对其进行转义.因此:不是\\,不是\/,当然也不是//.

And because / is not particularly special in a C string, you do not need to escape it with a backslash. So: not \\, not \/ and certainly not //.

这篇关于在子目录中创建文件,但无法打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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