如何将曾经是目录的文件更改回Linux上的目录? [英] How to change a file that used to be a directory back to directory on linux?

查看:137
本文介绍了如何将曾经是目录的文件更改回Linux上的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Apache VFS API来通过sftp在本地计算机和远程linux主机之间来回移动文件,并且它以某种方式将某些目录转换为linux主机上的文件从drw-r------rw-r-----

I was playing around with Apache VFS API to move files back and forth between my local machine and remote linux host over sftp and it converted some directories to files somehow on my linux host from drw-r----- to -rw-r-----

有人知道如何将其转换回目录吗?

Does anyone know how to convert it back to a directory?

推荐答案

您必须删除文件,然后创建一个包含文件原始名称的目录.

You have to remove the file and then make a directory containing the file's original name.

问题不在于目录已转换为文件,而是目录已被删除并创建了同名文件.

The problem is not that a directory was converted to a file, the problem was that a directory was deleted, and a file of the same name was created.

这篇关于如何将曾经是目录的文件更改回Linux上的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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