我尝试使用 CHMOD 以及文件目录,但由于某种原因它似乎无法找到它。
我尝试了以下方法:
-bash: homeec2-user: command not found
[ec2-user@_________ ~]$ chmod u+x ./home/ec2-user/presto.jar
chmod: cannot access ‘./home/ec2-user/presto.jar’: No such file or directory
[ec2-user@_________ ~]$ chmod u+x ./home/ec2-user/presto
chmod: cannot access ‘./home/ec2-user/presto’: No such file or directory
[ec2-user@_________ ~]$ chmod u+x ./home/ec2-user/
chmod: cannot access ‘./home/ec2-user/’: No such file or directory
[ec2-user@_________ ~]$ chmod u+x ~/home/ec2-user/
chmod: cannot access ‘/home/ec2-user/home/ec2-user/’: No such file or directory
[ec2-user@_________ ~]$ chmod u+x ~./home/ec2-user/
chmod: cannot access ‘~./home/ec2-user/’: No such file or directory
[ec2-user@_________ ~]$ ./presto --server localhost:8080 --catalog hive --schema default#
-bash: ./presto: No such file or directory
[ec2-user@_________ ~]$ home/
-bash: home/: No such file or directory
这也是我尝试链接到的正确目录。我做错了什么吗?
作为参考,我在教程中提到了这一点(这样您就知道我在尝试做什么)
https://prestodb.io/docs/current/installation/cli.html
答案1
领先.
看起来像是罪魁祸首:
[ec2-user@_________ ~]$ chmod u+x ./home/ec2-user/presto.jar
chmod: cannot access ‘./home/ec2-user/presto.jar’: No such file or directory
应为以下之一:
$ chmod u+x presto.jar
$ chmod u+x ./presto.jar
$ chmod u+x ~/presto.jar
编辑:要展开 - 命令假设您正在操作的文件位于当前目录中(第一个示例)。 A.
明确表示“此目录”(示例 2),并且扩展~
到您的主目录:/home/ec2-user
在本例中(示例 3)。