admin管理员组文章数量:1333451
I have a Python script that initiates deletion of files in a folder on a remote SFTP server.
The deletion is indicated in the log.
Upon check on the remote directory and when I list with ls
I get empty line and no files present:
sftp> cd PATH/
sftp> ls
sftp>
However when I list with ls -al
:
sftp> ls -al
drwxrwxr-x 2 6055 6052 4096 Nov 20 05:23 .
drwxrwxr-x 4 6055 6052 4096 Oct 24 11:07 ..
-rw-r--r-- 1 6055 6052 6742 Nov 15 20:10 .file1.csv
-rw-r--r-- 1 6055 6052 6742 Nov 18 19:23 .file2.csv
-rw-r--r-- 1 6055 6052 6743 Nov 19 19:21 .file3.csv
-rw-r--r-- 1 6055 6052 7179 Nov 15 18:52 .file4.csv
-rw-r--r-- 1 6055 6052 7178 Nov 18 18:03 .file5.csv
-rw-r--r-- 1 6055 6052 7182 Nov 19 18:03 .file6.csv
The files listed using ls -al
all begin with a .
(dot), indicating that they are hidden files. The default ls
command in SFTP does not show hidden files. Does it mean that I need to modify the script to include hidden files in the deletion process? Or are they indeed deleted /masked as deleted and won't be copied/transferred from other scripts?
本文标签: Deleting files on remote server via python script indicated as hiddenStack Overflow
版权声明:本文标题:Deleting files on remote server via python script indicated as hidden - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742353541a2458965.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论