sudo: ./abc.sh: command not found











up vote
2
down vote

favorite
2












Commands typed in terminal:



chmod 777 abc.sh
sudo ./abc.sh


Every shell program is giving the same error:



.sh: command not found


Including this simple abc.sh program:



#!/bin/bash
# My first script
echo "Hello World!"


Output of sudo od -c ./abc.sh:



0000000 # ! / b i n / b a s h n # M y
0000020 f i r s t s c r i p t n n e
0000040 c h o " H e l l o W o r l d
0000060 ! " n n
0000064


screenshot of terminal and abc.sh path(1)



screenshot of terminal and abc.sh path(2)










share|improve this question
























  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mitch
    Jan 25 '16 at 17:40















up vote
2
down vote

favorite
2












Commands typed in terminal:



chmod 777 abc.sh
sudo ./abc.sh


Every shell program is giving the same error:



.sh: command not found


Including this simple abc.sh program:



#!/bin/bash
# My first script
echo "Hello World!"


Output of sudo od -c ./abc.sh:



0000000 # ! / b i n / b a s h n # M y
0000020 f i r s t s c r i p t n n e
0000040 c h o " H e l l o W o r l d
0000060 ! " n n
0000064


screenshot of terminal and abc.sh path(1)



screenshot of terminal and abc.sh path(2)










share|improve this question
























  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mitch
    Jan 25 '16 at 17:40













up vote
2
down vote

favorite
2









up vote
2
down vote

favorite
2






2





Commands typed in terminal:



chmod 777 abc.sh
sudo ./abc.sh


Every shell program is giving the same error:



.sh: command not found


Including this simple abc.sh program:



#!/bin/bash
# My first script
echo "Hello World!"


Output of sudo od -c ./abc.sh:



0000000 # ! / b i n / b a s h n # M y
0000020 f i r s t s c r i p t n n e
0000040 c h o " H e l l o W o r l d
0000060 ! " n n
0000064


screenshot of terminal and abc.sh path(1)



screenshot of terminal and abc.sh path(2)










share|improve this question















Commands typed in terminal:



chmod 777 abc.sh
sudo ./abc.sh


Every shell program is giving the same error:



.sh: command not found


Including this simple abc.sh program:



#!/bin/bash
# My first script
echo "Hello World!"


Output of sudo od -c ./abc.sh:



0000000 # ! / b i n / b a s h n # M y
0000020 f i r s t s c r i p t n n e
0000040 c h o " H e l l o W o r l d
0000060 ! " n n
0000064


screenshot of terminal and abc.sh path(1)



screenshot of terminal and abc.sh path(2)







bash scripts sudo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 25 '16 at 18:42

























asked Jan 24 '16 at 11:28









Nisheet Verma

1615




1615












  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mitch
    Jan 25 '16 at 17:40


















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mitch
    Jan 25 '16 at 17:40
















Comments are not for extended discussion; this conversation has been moved to chat.
– Mitch
Jan 25 '16 at 17:40




Comments are not for extended discussion; this conversation has been moved to chat.
– Mitch
Jan 25 '16 at 17:40










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Examine the output of this (from the directory where the abc.sh resides):



$ type ./abc.sh
$ ./abc.sh


The type command will first verify that your ./abc.sh is found. If it isn't it will exit saying that it can't find the ./abc.sh file. Then we would have to find out what it is about the filename that it can't be found.



Also, what is the name of the editor you are using to create your script file. If you inadvertently used a Windows edit (through wine) this can cause problems with the line terminators in your script.



Try using and edit such as nano or gedit. You might use one of those recommended editors and create the same example file as, abc1.sh and ensure that you have the lines exactly as they are in your edited question.





By the way, the only way I can reproduce the error message that you gave in your question is by leaving out the abc part of the abc.sh file.



These commands will produce the error of your message:



$ ./.sh
$ sudo .sh


Please keep in mind that each error is unique and important in diagnosing the problem. It's important to test and exact script and give the exact error message.



For example a permission denied error could be caused by trying to execute a file that doesn't have the execution bit set. This can be set by executing the command that you reference in your question:



$ chmod 777 abc.sh


You could also get the permission denied error by trying to execute a file that that is owned by root and doesn't have the world or group bit set for reading. This can be a side effect of using sudo in your personal space when it's not necessary. The chmod 777 that you mentioned in your question would also resolve that problem by giving reading and execution permission to all users.



If you have created the file in such that it's owned by root you will have to use the elevated command to change the properties. This will give you access to execute the file:



$ sudo chmod 777 abc.sh


If you have a reason to control who can execute or access the script you might take a look at some of the other options of chmod:



$ man chmod




As suggested in the comments to your question, you shouldn't use the elevated command sudo to run scripts that you are testing. If the testing is in your personal space, you can cause areas of your personal space to have become owned by root... losing personal access to those areas. Some ill formed scripts could also cause corruption to other system files of our OS. The mistyping of your attempt to run the abc.sh script is an example that errors can happen. If you decided to remove your script or script work directory and mistakenly had a space in the wrong place it could cause serious problems where you least expect.






share|improve this answer



















  • 2




    ummm......what?
    – heemayl
    Jan 24 '16 at 11:30


















up vote
2
down vote













Well, from what you told us, it should be working perfectly... That is if the partition it's stored on supports unix/posix style permissions. I run into this error all the time if I try to run a script from a vfat or ntfs partition. Considering it's mounted in a location called work, is this on a USB drive with fat or ntfs formatted partition? If it is, you have to prefix the shell before the script. Check the partition, and that might be the issue. Move it to your home directory, and it might run easily, on a filesystem that supports unix/posix permissions.



Check if that's the case:



mount |grep nisheet



Does is say vfat, fuseblock or ntfs? If so...



Two options:




  1. Prefix the shell in front of the script to run:


bash abc.sh




  1. Move it to a filesystem that supports Unix/Posix permissions:


Ex:



mv abc.sh ~/
cd ~
chmod +x abc.sh
./abc.sh





share|improve this answer























  • vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
    – kos
    Jan 25 '16 at 15:55












  • @kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
    – darkdragn
    Jan 25 '16 at 16:11










  • You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
    – L. D. James
    Jan 26 '16 at 14:43











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f724976%2fsudo-abc-sh-command-not-found%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










Examine the output of this (from the directory where the abc.sh resides):



$ type ./abc.sh
$ ./abc.sh


The type command will first verify that your ./abc.sh is found. If it isn't it will exit saying that it can't find the ./abc.sh file. Then we would have to find out what it is about the filename that it can't be found.



Also, what is the name of the editor you are using to create your script file. If you inadvertently used a Windows edit (through wine) this can cause problems with the line terminators in your script.



Try using and edit such as nano or gedit. You might use one of those recommended editors and create the same example file as, abc1.sh and ensure that you have the lines exactly as they are in your edited question.





By the way, the only way I can reproduce the error message that you gave in your question is by leaving out the abc part of the abc.sh file.



These commands will produce the error of your message:



$ ./.sh
$ sudo .sh


Please keep in mind that each error is unique and important in diagnosing the problem. It's important to test and exact script and give the exact error message.



For example a permission denied error could be caused by trying to execute a file that doesn't have the execution bit set. This can be set by executing the command that you reference in your question:



$ chmod 777 abc.sh


You could also get the permission denied error by trying to execute a file that that is owned by root and doesn't have the world or group bit set for reading. This can be a side effect of using sudo in your personal space when it's not necessary. The chmod 777 that you mentioned in your question would also resolve that problem by giving reading and execution permission to all users.



If you have created the file in such that it's owned by root you will have to use the elevated command to change the properties. This will give you access to execute the file:



$ sudo chmod 777 abc.sh


If you have a reason to control who can execute or access the script you might take a look at some of the other options of chmod:



$ man chmod




As suggested in the comments to your question, you shouldn't use the elevated command sudo to run scripts that you are testing. If the testing is in your personal space, you can cause areas of your personal space to have become owned by root... losing personal access to those areas. Some ill formed scripts could also cause corruption to other system files of our OS. The mistyping of your attempt to run the abc.sh script is an example that errors can happen. If you decided to remove your script or script work directory and mistakenly had a space in the wrong place it could cause serious problems where you least expect.






share|improve this answer



















  • 2




    ummm......what?
    – heemayl
    Jan 24 '16 at 11:30















up vote
2
down vote



accepted










Examine the output of this (from the directory where the abc.sh resides):



$ type ./abc.sh
$ ./abc.sh


The type command will first verify that your ./abc.sh is found. If it isn't it will exit saying that it can't find the ./abc.sh file. Then we would have to find out what it is about the filename that it can't be found.



Also, what is the name of the editor you are using to create your script file. If you inadvertently used a Windows edit (through wine) this can cause problems with the line terminators in your script.



Try using and edit such as nano or gedit. You might use one of those recommended editors and create the same example file as, abc1.sh and ensure that you have the lines exactly as they are in your edited question.





By the way, the only way I can reproduce the error message that you gave in your question is by leaving out the abc part of the abc.sh file.



These commands will produce the error of your message:



$ ./.sh
$ sudo .sh


Please keep in mind that each error is unique and important in diagnosing the problem. It's important to test and exact script and give the exact error message.



For example a permission denied error could be caused by trying to execute a file that doesn't have the execution bit set. This can be set by executing the command that you reference in your question:



$ chmod 777 abc.sh


You could also get the permission denied error by trying to execute a file that that is owned by root and doesn't have the world or group bit set for reading. This can be a side effect of using sudo in your personal space when it's not necessary. The chmod 777 that you mentioned in your question would also resolve that problem by giving reading and execution permission to all users.



If you have created the file in such that it's owned by root you will have to use the elevated command to change the properties. This will give you access to execute the file:



$ sudo chmod 777 abc.sh


If you have a reason to control who can execute or access the script you might take a look at some of the other options of chmod:



$ man chmod




As suggested in the comments to your question, you shouldn't use the elevated command sudo to run scripts that you are testing. If the testing is in your personal space, you can cause areas of your personal space to have become owned by root... losing personal access to those areas. Some ill formed scripts could also cause corruption to other system files of our OS. The mistyping of your attempt to run the abc.sh script is an example that errors can happen. If you decided to remove your script or script work directory and mistakenly had a space in the wrong place it could cause serious problems where you least expect.






share|improve this answer



















  • 2




    ummm......what?
    – heemayl
    Jan 24 '16 at 11:30













up vote
2
down vote



accepted







up vote
2
down vote



accepted






Examine the output of this (from the directory where the abc.sh resides):



$ type ./abc.sh
$ ./abc.sh


The type command will first verify that your ./abc.sh is found. If it isn't it will exit saying that it can't find the ./abc.sh file. Then we would have to find out what it is about the filename that it can't be found.



Also, what is the name of the editor you are using to create your script file. If you inadvertently used a Windows edit (through wine) this can cause problems with the line terminators in your script.



Try using and edit such as nano or gedit. You might use one of those recommended editors and create the same example file as, abc1.sh and ensure that you have the lines exactly as they are in your edited question.





By the way, the only way I can reproduce the error message that you gave in your question is by leaving out the abc part of the abc.sh file.



These commands will produce the error of your message:



$ ./.sh
$ sudo .sh


Please keep in mind that each error is unique and important in diagnosing the problem. It's important to test and exact script and give the exact error message.



For example a permission denied error could be caused by trying to execute a file that doesn't have the execution bit set. This can be set by executing the command that you reference in your question:



$ chmod 777 abc.sh


You could also get the permission denied error by trying to execute a file that that is owned by root and doesn't have the world or group bit set for reading. This can be a side effect of using sudo in your personal space when it's not necessary. The chmod 777 that you mentioned in your question would also resolve that problem by giving reading and execution permission to all users.



If you have created the file in such that it's owned by root you will have to use the elevated command to change the properties. This will give you access to execute the file:



$ sudo chmod 777 abc.sh


If you have a reason to control who can execute or access the script you might take a look at some of the other options of chmod:



$ man chmod




As suggested in the comments to your question, you shouldn't use the elevated command sudo to run scripts that you are testing. If the testing is in your personal space, you can cause areas of your personal space to have become owned by root... losing personal access to those areas. Some ill formed scripts could also cause corruption to other system files of our OS. The mistyping of your attempt to run the abc.sh script is an example that errors can happen. If you decided to remove your script or script work directory and mistakenly had a space in the wrong place it could cause serious problems where you least expect.






share|improve this answer














Examine the output of this (from the directory where the abc.sh resides):



$ type ./abc.sh
$ ./abc.sh


The type command will first verify that your ./abc.sh is found. If it isn't it will exit saying that it can't find the ./abc.sh file. Then we would have to find out what it is about the filename that it can't be found.



Also, what is the name of the editor you are using to create your script file. If you inadvertently used a Windows edit (through wine) this can cause problems with the line terminators in your script.



Try using and edit such as nano or gedit. You might use one of those recommended editors and create the same example file as, abc1.sh and ensure that you have the lines exactly as they are in your edited question.





By the way, the only way I can reproduce the error message that you gave in your question is by leaving out the abc part of the abc.sh file.



These commands will produce the error of your message:



$ ./.sh
$ sudo .sh


Please keep in mind that each error is unique and important in diagnosing the problem. It's important to test and exact script and give the exact error message.



For example a permission denied error could be caused by trying to execute a file that doesn't have the execution bit set. This can be set by executing the command that you reference in your question:



$ chmod 777 abc.sh


You could also get the permission denied error by trying to execute a file that that is owned by root and doesn't have the world or group bit set for reading. This can be a side effect of using sudo in your personal space when it's not necessary. The chmod 777 that you mentioned in your question would also resolve that problem by giving reading and execution permission to all users.



If you have created the file in such that it's owned by root you will have to use the elevated command to change the properties. This will give you access to execute the file:



$ sudo chmod 777 abc.sh


If you have a reason to control who can execute or access the script you might take a look at some of the other options of chmod:



$ man chmod




As suggested in the comments to your question, you shouldn't use the elevated command sudo to run scripts that you are testing. If the testing is in your personal space, you can cause areas of your personal space to have become owned by root... losing personal access to those areas. Some ill formed scripts could also cause corruption to other system files of our OS. The mistyping of your attempt to run the abc.sh script is an example that errors can happen. If you decided to remove your script or script work directory and mistakenly had a space in the wrong place it could cause serious problems where you least expect.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 1 at 13:08

























answered Jan 24 '16 at 11:29









L. D. James

18k43584




18k43584








  • 2




    ummm......what?
    – heemayl
    Jan 24 '16 at 11:30














  • 2




    ummm......what?
    – heemayl
    Jan 24 '16 at 11:30








2




2




ummm......what?
– heemayl
Jan 24 '16 at 11:30




ummm......what?
– heemayl
Jan 24 '16 at 11:30












up vote
2
down vote













Well, from what you told us, it should be working perfectly... That is if the partition it's stored on supports unix/posix style permissions. I run into this error all the time if I try to run a script from a vfat or ntfs partition. Considering it's mounted in a location called work, is this on a USB drive with fat or ntfs formatted partition? If it is, you have to prefix the shell before the script. Check the partition, and that might be the issue. Move it to your home directory, and it might run easily, on a filesystem that supports unix/posix permissions.



Check if that's the case:



mount |grep nisheet



Does is say vfat, fuseblock or ntfs? If so...



Two options:




  1. Prefix the shell in front of the script to run:


bash abc.sh




  1. Move it to a filesystem that supports Unix/Posix permissions:


Ex:



mv abc.sh ~/
cd ~
chmod +x abc.sh
./abc.sh





share|improve this answer























  • vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
    – kos
    Jan 25 '16 at 15:55












  • @kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
    – darkdragn
    Jan 25 '16 at 16:11










  • You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
    – L. D. James
    Jan 26 '16 at 14:43















up vote
2
down vote













Well, from what you told us, it should be working perfectly... That is if the partition it's stored on supports unix/posix style permissions. I run into this error all the time if I try to run a script from a vfat or ntfs partition. Considering it's mounted in a location called work, is this on a USB drive with fat or ntfs formatted partition? If it is, you have to prefix the shell before the script. Check the partition, and that might be the issue. Move it to your home directory, and it might run easily, on a filesystem that supports unix/posix permissions.



Check if that's the case:



mount |grep nisheet



Does is say vfat, fuseblock or ntfs? If so...



Two options:




  1. Prefix the shell in front of the script to run:


bash abc.sh




  1. Move it to a filesystem that supports Unix/Posix permissions:


Ex:



mv abc.sh ~/
cd ~
chmod +x abc.sh
./abc.sh





share|improve this answer























  • vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
    – kos
    Jan 25 '16 at 15:55












  • @kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
    – darkdragn
    Jan 25 '16 at 16:11










  • You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
    – L. D. James
    Jan 26 '16 at 14:43













up vote
2
down vote










up vote
2
down vote









Well, from what you told us, it should be working perfectly... That is if the partition it's stored on supports unix/posix style permissions. I run into this error all the time if I try to run a script from a vfat or ntfs partition. Considering it's mounted in a location called work, is this on a USB drive with fat or ntfs formatted partition? If it is, you have to prefix the shell before the script. Check the partition, and that might be the issue. Move it to your home directory, and it might run easily, on a filesystem that supports unix/posix permissions.



Check if that's the case:



mount |grep nisheet



Does is say vfat, fuseblock or ntfs? If so...



Two options:




  1. Prefix the shell in front of the script to run:


bash abc.sh




  1. Move it to a filesystem that supports Unix/Posix permissions:


Ex:



mv abc.sh ~/
cd ~
chmod +x abc.sh
./abc.sh





share|improve this answer














Well, from what you told us, it should be working perfectly... That is if the partition it's stored on supports unix/posix style permissions. I run into this error all the time if I try to run a script from a vfat or ntfs partition. Considering it's mounted in a location called work, is this on a USB drive with fat or ntfs formatted partition? If it is, you have to prefix the shell before the script. Check the partition, and that might be the issue. Move it to your home directory, and it might run easily, on a filesystem that supports unix/posix permissions.



Check if that's the case:



mount |grep nisheet



Does is say vfat, fuseblock or ntfs? If so...



Two options:




  1. Prefix the shell in front of the script to run:


bash abc.sh




  1. Move it to a filesystem that supports Unix/Posix permissions:


Ex:



mv abc.sh ~/
cd ~
chmod +x abc.sh
./abc.sh






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 25 '16 at 15:59

























answered Jan 25 '16 at 15:49









darkdragn

43925




43925












  • vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
    – kos
    Jan 25 '16 at 15:55












  • @kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
    – darkdragn
    Jan 25 '16 at 16:11










  • You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
    – L. D. James
    Jan 26 '16 at 14:43


















  • vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
    – kos
    Jan 25 '16 at 15:55












  • @kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
    – darkdragn
    Jan 25 '16 at 16:11










  • You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
    – L. D. James
    Jan 26 '16 at 14:43
















vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
– kos
Jan 25 '16 at 15:55






vFAT and NTFS partitions are mounted with permissions 777 by default though, so if that's the problem they should check their fstab to see how that partition is mounted.
– kos
Jan 25 '16 at 15:55














@kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
– darkdragn
Jan 25 '16 at 16:11




@kos If it is just a USB drive from work, it probably isn't in his fstab. Judging by the naming convention, it was a userspace utility that mounted it, with some basic permissions. The following link can help with manual mounting, to get the right mask in the filesystem. Look at the second answer: askubuntu.com/questions/23108/…
– darkdragn
Jan 25 '16 at 16:11












You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
– L. D. James
Jan 26 '16 at 14:43




You can run a script file from a Windows mounted drive. To make sure before posting this reference I took a drive out of an old Windows XP laptop. I mounted it with a USB/Hardrive adapter. I plugged it in. It automatically opened up the folder. I create the abc.sh file, then ran it using ./abc.sh. It ran no difference from the it runs on the ext4 filesystems. The path of the auto mount is /media/ljames/00A4C6CAA4C6C180/WINDOWS. In other words, you can run shell scripts (and other programs) from Windows filesystems.
– L. D. James
Jan 26 '16 at 14:43


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f724976%2fsudo-abc-sh-command-not-found%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei