每次双击想打开后缀txt的文件,提示它是可执行文本文件。
Tofloor
poster avatar
星罗秋旻
deepin
2018-06-24 20:34
Author

如题,用右键 将其打开方式默认为-文本编辑器。但是,下次双击,仍然会出现,该文件为可执行文本文件的提示。

以前我没有用过deep liunx。
请教,大家的系统与是这样的还是我的系统有问题。
Reply Favorite View the author
All Replies
2 / 2
To page
avatar
ckurobac
deepin
2018-10-24 20:06
#21
fmask,dmask了解一下……
Reply View the author
avatar
johnmy
deepin
2019-12-14 16:03
#22
所有目录下的txt都改为直接显示,用chmod a-X *.txt  提示:无法访问'*.txt': 没有那个文件或目录
怎么解决
Reply View the author
avatar
i8520
deepin
2019-12-15 00:28
#23
https://bbs.deepin.org/post/159297
所有目录下的txt都改为直接显示,用chmod a-X *.txt  提示:无法访问'*.txt': 没有那个文件或目录
怎么解决 ...

要在文本路劲下使用,如果路劲下没有文本文件就会显示没有那个文件或目录
Reply View the author
avatar
johnmy
deepin
2019-12-15 00:32
#24
https://bbs.deepin.org/post/159297
要在文本路劲下使用,如果路劲下没有文本文件就会显示没有那个文件或目录 ...

如果想把所有已经存的txt修改,怎么搞呢?
Reply View the author
avatar
i8520
deepin
2019-12-15 03:57
#25
本帖最后由 i8520 于 2019-12-14 20:16 编辑
https://bbs.deepin.org/post/159297
如果想把所有已经存的txt修改,怎么搞呢?
find 我是路劲 -name *.txt >>${HOME}/Desktop/tmp.txt我是路径可以是分区路径,比如NTFSF分区路劲可以随便复制一个文件,新建一个文本文档打开黏贴一下就有了
  1. 我实验了一个办法很笨
  2. 在终端输入
  3. sudo apt-get install tree find
  4. 安装tree和find
  5. 然后再输入
  6. find / -name *.txt >>${HOME}/Desktop/tmp.txt
  7. 意思就是重根目录开始搜索所有路径的文本文件的路径 在桌面生成tmp.txt文件
  8. 这是可以在win虚拟机 把输出的路劲文件tmp.txt到虚拟机里
  9. 然后用虚拟机的win系统创建用记事本创建一个批处理文件 1.bat内容如下
  10. #############################################
  11. #号不要复制,批处理和tmp.txt出于同一位置
  12. @echo off
  13. set /p str=请输入你要添加的前缀内容,回车确认:
  14. for /f "delims=" %%a in (tmp.txt) do echo %str%%%~a>>file_tmp.txt
  15. pause
  16. ##############################################
  17. 在批处理输入chmod空格-R空格666空格 然后回车等提示按任意建就可以了
  18. 把file_tmp.txt复回linux 系统 该文件权限可执行作为脚本运行 这样就可以了
Copy the Code
结果就就这样的很方便了
  1. chmod -R 666 /usr/lib/python2.7/dist-packages/webencodings-0.5.egg-info/top_level.txt
  2. chmod -R 666 /usr/lib/python2.7/dist-packages/html5lib-0.999999999.egg-info/dependency_links.txt
  3. chmod -R 666 /usr/lib/python2.7/dist-packages/html5lib-0.999999999.egg-info/top_level.txt
  4. chmod -R 666 /usr/lib/python2.7/dist-packages/html5lib-0.999999999.egg-info/requires.txt
  5. chmod -R 666 /usr/lib/python2.7/dist-packages/six-1.10.0.egg-info/dependency_links.txt
  6. chmod -R 666 /usr/lib/python2.7/dist-packages/six-1.10.0.egg-info/top_level.txt
  7. chmod -R 666 /usr/lib/python2.7/dist-packages/numpy-1.12.1.egg-info/dependency_links.txt
  8. chmod -R 666 /usr/lib/python2.7/dist-packages/numpy-1.12.1.egg-info/top_level.txt
  9. chmod -R 666 /usr/lib/python2.7/dist-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
  10. chmod -R 666 /usr/lib/python2.7/dist-packages/beautifulsoup4-4.5.3.egg-info/dependency_links.txt
  11. chmod -R 666 /usr/lib/python2.7/dist-packages/beautifulsoup4-4.5.3.egg-info/top_level.txt
Copy the Code



Reply View the author
avatar
johnmy
deepin
2019-12-15 04:23
#26
https://bbs.deepin.org/post/159297
find 我是路劲 -name *.txt >>${HOME}/Desktop/tmp.txt我是路径可以是分区路径,比如NTFSF分区 ...

我的是NTFS上的txt文件,去掉可执行后也不行,它会自动打勾的。
Reply View the author
avatar
johnmy
deepin
2019-12-15 04:25
#27
https://bbs.deepin.org/post/159297
那个文件是不是在NTFS分区上?

NTFS上的还有办法吗?
Reply View the author
avatar
i8520
deepin
2019-12-15 05:25
#28
https://bbs.deepin.org/post/159297
NTFS上的还有办法吗?

我虚拟机deepin系统挂了个u盘试了试,是没办法,文件倒是可以找到,就是该不了权限,手动改也不行
ext4的可以,这个是系统决定的吧改不了,只要第一行有只要有脚本命令就会有终端执行选项
Reply View the author
avatar
johnmy
deepin
2019-12-15 05:34
#29
商店安装Disk,打开Disk,点击需要修改的NTFS分区,点击下面的齿轮-编辑选项,不用自动选项,在x-gvfs-show后面加上,fmask=133,dmask=022,uid=1000,gid=1000,确定即(可能需要运行id命令,查看当前uid和gid0。
这样就可以了
Reply View the author
2 / 2
To page