V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
thenewbie
V2EX  ›  问与答

ubuntu的文本文件在mac里的打开方式?

  •  
  •   thenewbie · 2012-03-01 19:44:43 +08:00 · 3532 次点击
    这是一个创建于 4455 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在ubuntu里面建立的纯文本文件,木有扩展名的,直接gedit写的那种,貌似到mac里面双击后变成了用终端打开??

    如何批量更改成在mac下可以双击后用编辑器打开啊?除了批量更改文件名为*.txt?
    16 条回复    1970-01-01 08:00:00 +08:00
    suhetie
        1
    suhetie  
       2012-03-01 19:46:09 +08:00
    试过用textedit打开了么?
    thenewbie
        2
    thenewbie  
    OP
       2012-03-01 20:09:01 +08:00
    @suhetie 可以用textedit或其他软件打开,我想知道如何设置默认就用这些东西打开?现在默认是直接终端打开了.... 难道要一个一个指定打开方式么?有好多....
    suhetie
        3
    suhetie  
       2012-03-01 20:14:46 +08:00
    @thenewbie 文件属性(cmd+i),然后选择打开方式的那个部分下面有类似“改变所有”的选线
    zhigang1992
        4
    zhigang1992  
       2012-03-01 20:21:02 +08:00
    开终端,more [文件名]
    thenewbie
        5
    thenewbie  
    OP
       2012-03-01 20:36:53 +08:00
    @suhetie “改变所有”的话,不能完成此操作。发生意外错误(错误代码 -50)。
    thenewbie
        6
    thenewbie  
    OP
       2012-03-01 20:37:26 +08:00
    @zhigang1992 呃,有不用终端的办法么?
    zhigang1992
        7
    zhigang1992  
       2012-03-01 20:39:53 +08:00
    右键-open with-other-找到texteditor就可以了。
    thenewbie
        8
    thenewbie  
    OP
       2012-03-01 20:40:44 +08:00
    @zhigang1992 有多个的话,如何批量更改呢?
    thenewbie
        9
    thenewbie  
    OP
       2012-03-01 20:53:15 +08:00
    @suhetie @zhigang1992 多个文件的话,除了批量重命名添加 .txt 扩展名解决这个问题,还有别的方法么?
    sobigfish
        10
    sobigfish  
       2012-03-01 21:19:46 +08:00
    @thenewbie 用终端打开是因为有运行权限吧 -x
    thenewbie
        11
    thenewbie  
    OP
       2012-03-01 21:26:29 +08:00
    @sobigfish 在ubuntu下面直接用gedit写的文本文件,没有特别设置过运行权限,发给朋友的air后,他一打开就自动用终端开打开....
    就是纯文字,也不是代码脚本啥的...
    suhetie
        12
    suhetie  
       2012-03-01 21:40:46 +08:00
    http://superuser.com/questions/231854/default-editor-for-files-without-file-name-extension-in-mac-os-x

    因为没有扩展名,change all无法正常识别和设定。上面的帖子介绍了两种方法,一种转个第三方软件,另一种是直接去该plist。祝好运。
    zhensun
        13
    zhensun  
       2012-03-01 21:51:50 +08:00
    chmod -x 看看。
    wynnsyt
        14
    wynnsyt  
       2012-03-01 21:55:11 +08:00
    一个workaround就是直接拖到dock图标上打开吧..
    suhetie
        15
    suhetie  
       2012-03-01 21:57:19 +08:00
    @thenewbie 回头来看自己打错了两个错字还都在动词上。。。更正如下:上面的帖子介绍了两种方法,一种 装 个第三方软件,另一种是直接去 改 plist。
    thenewbie
        16
    thenewbie  
    OP
       2012-03-01 22:06:33 +08:00
    @suhetie 嗯!这个链接灰常给力!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4266 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:00 · PVG 09:00 · LAX 18:00 · JFK 21:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.