Linux 板


LINE

※ 引述《soem (流水)》之铭言: : ※ 引述《flied (libertines)》之铭言: : : lee@lee-X402CA:~$ which talys : : /usr/bin/talys : 这应该就是可以直接call得到talys指令了 : 这是之前的文章 : : lee@lee-X402CA:~/physics/talys/samples$ ./verify : : bash: ./verify: 拒绝不符权限的操作 : 这是後来你执行的状况 : : lee@lee-X402CA:/bin$ chmod +x verify : : chmod: 无法存取 ‘verify’: 没有此一档案或目录 : : lee@lee-X402CA:/bin$ ./verify : : bash: ./verify: 没有此一档案或目录 : 请注意你现在的所在目录, : 比对两次结果,你是不是该去 ~/physics/talys/samples 寻找你的verify : 虽然不知道为甚麽你会在/bin里面,姑且推论一下你的想法好了: : 1. 你可能认为执行档要在/bin底下才能跑? : => 实际上不用,跟档案权限有关系 : 但要注意的是,如果你要执行的不是在系统$PATH里面的程式, : 要用相对或绝对路径的方式去呼叫。 : 像是你在 ~/physics/talys/samples里面呼叫相对路径 "./": : ~/physics/talys/samples$ ./verify : 或是绝对路径 : /home/你的帐号/physics/talys/samples/verify : 若是你直接呼叫verify,就是呼叫到系统预先有的那只verify工具。 : 2. 你可能不确定chmod的功能以及"bash: ./verify: 拒绝不符权限的操作"的成因 : => 首先无论是script或程式一般来说都需要档案权限才能执行; : 这边的权现有两个面向:你的权限,和设定给档案的权限。 : 我们先来看看一般权限的呈现方式: : $ ls -ld /bin/bash : -rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash : 第一组rwx是这个档案的拥有者root所能做的事情 : read, write, execute : 第二组rwx是这个档案的拥有者群组,root群组所能做的事情 : 所以有在root群组且非使用者root则会参考这组设定 : 第三组rwx则是除此以外的人的权限。 : 所以说,我们可以看到/bin/bash这个档案, : - 拥有者root具有所有权限; : - 拥有者群组root没有修改(写入)的权限,但可以读取和执行; : - 剩下的人亦是没有修改、有读取执行的权限。 : 一般的文字档案类型往往是644,例如: : $ ls -ld /etc/hosts : -rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts : 我想你的~/physics/talys/samples/verify应该也是类似的情形, : 因此你需要的是帮他加上execute : ~/physics/talys/samples/$ chmod +x verify : sudo 可以帮你取得不同使用者的权限,但针对x这项设定通常需要用chmod来调整。 谢谢 我执行了这行成功 lee@lee-X402CA:~/physics/talys/samples$ ./verify bash: ./verify: 拒绝不符权限的操作 lee@lee-X402CA:~/physics/talys/samples$ chmod +x verify lee@lee-X402CA:~/physics/talys/samples$ ./verify /home/lee/physics/talys/samples/17/a/new /home/lee/physics/talys/samples/17/b/new /home/lee/physics/talys/samples/17/c/new /home/lee/physics/talys/samples/11/new /home/lee/physics/talys/samples/10/a/new /home/lee/physics/talys/samples/10/b/new /home/lee/physics/talys/samples/20/new /home/lee/physics/talys/samples/1/f/new /home/lee/physics/talys/samples/1/g/new /home/lee/physics/talys/samples/1/e/new /home/lee/physics/talys/samples/1/h/new /home/lee/physics/talys/samples/1/a/new /home/lee/physics/talys/samples/1/b/new /home/lee/physics/talys/samples/1/d/new /home/lee/physics/talys/samples/1/i/new /home/lee/physics/talys/samples/1/c/new /home/lee/physics/talys/samples/8/new /home/lee/physics/talys/samples/21/new /home/lee/physics/talys/samples/3/a/new /home/lee/physics/talys/samples/3/b/new /home/lee/physics/talys/samples/3/d/new /home/lee/physics/talys/samples/3/c/new /home/lee/physics/talys/samples/22/new /home/lee/physics/talys/samples/9/new /home/lee/physics/talys/samples/6/a/new /home/lee/physics/talys/samples/6/b/new /home/lee/physics/talys/samples/19/new /home/lee/physics/talys/samples/16/a/new /home/lee/physics/talys/samples/16/b/new /home/lee/physics/talys/samples/16/d/new /home/lee/physics/talys/samples/16/c/new /home/lee/physics/talys/samples/2/new /home/lee/physics/talys/samples/24/new /home/lee/physics/talys/samples/25/new /home/lee/physics/talys/samples/12/new /home/lee/physics/talys/samples/23/new /home/lee/physics/talys/samples/14/new /home/lee/physics/talys/samples/5/new /home/lee/physics/talys/samples/15/new /home/lee/physics/talys/samples/18/a/new /home/lee/physics/talys/samples/18/b/new /home/lee/physics/talys/samples/4/a/new /home/lee/physics/talys/samples/4/b/new /home/lee/physics/talys/samples/13/new /home/lee/physics/talys/samples/7/new 似乎成功 但readme如下 Verification ------------ - cd samples - verify Under Linux/Unix, this should run all sample cases (about 1 hour on a fast PC). 我这大概3秒就结束 所以应该还没有装好 : : lee@lee-X402CA:/bin$ verify : : Verify CIE values, Version 1.4.0 : 这边就只是你的系统有安装一个叫做verify的指令, : 但这你的使用经验看来,那个指令并不是你这次安装的步骤中需要呼叫到的。 Your own calculations --------------------- - talys < input > output where you can make your own input file starting from the many sample cases we provide. 我试着计算执行 错误如下 lee@lee-X402CA:~/physics/talys/test$ talys input output5 TALYS-error: Structure database not installed: change path in machine.f 我的machine.f 在 /home/lee/physics/talys/source https://www.dropbox.com/s/zmbhzustk6hnp6v/2014-01-26%2021%3A39%3A35.png
内容如下 https://www.dropbox.com/s/yq6o4hbraqftuf6/2014-01-26%2021%3A32%3A21.png
c ********************* Set directory for structure data *************** c c path : directory containing structure files to be read c lenpath: length of pathname c c The maximum length of the path is 60 characters c home='/home/lee/physics/talys/' (我改这行) lenhome=0 do 10 i=1,60 if (home(i:i).eq.' ') goto 100 lenhome=lenhome+1 10 continue 100 path=home(1:lenhome)//'structure/' lenpath=lenhome+10 c c Test to check accessibility of structure files c inquire (file=path(1:lenpath)//'abundance/z001',exist=lexist) if (lexist) return write(*,'(" TALYS-error: Structure database not installed:", + " change path in machine.f")') stop end Copyright (C) 2013 A.J. Koning, S. Hilaire and S. Goriely 我改的只有这部份 原本是 home='.' 不能执行後,我改成 home='/home/lee/physics/talys/' 这样改对吧? --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 101.3.47.52







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:e-shopping站内搜寻

TOP