No such file or directory?!!?!?
-
Okay, Im using Knoppix for a class, and Im supposed to write a shell script called Exercise8 and its supposed to do the following: Create a "homework" directory in the knoppix home directory Create a "first" directory under homework directory Create a "second" directory under the homework directory Anyway, I cant even get the thing to run, and I dont know why, because the file exists, and is located in /home/knoppix. Why does it keep telling me: "bash: ./exercise8: No Such File or Directory." So far in the file I have: #!/bin/bash # #mkdir homework #mkdir /homework/first #mkdir /homework/second Is that even close to being right? Ugh...
-
Answer:
if you are placing ./ in front of your script name, you have to be in the directory the script is located in. or you could type: /home/knoppix/exercise8 also, make sure you have execute permissions to run the script: run this: chmod 744 /home/knoppix/exercise8
Tom at Yahoo! Answers Visit the source
Other answers
Are you saving the file as "exercise8" and making it executable? Are you running it from the directory it's in? If you're making the directories starting in the current directory, it's #mkdir homework #mkdir homework/first #mkdir homework/second Your way makes the second and third one in the root directory. ("/" is "root", the Linux equivalent to C:\ in Windows..)
Related Q & A:
- How To Build Business Directory Using Php Mysql?Best solution by Stack Overflow
- How to search directory for specific files?Best solution by Stack Overflow
- What is this NETFXRepair.exe in my %windir%\Microsoft.NET directory?Best solution by Super User
- How to create Site Directory in MOSS 2007?Best solution by Stack Overflow
- How to limit mod_rewrite to a single directory?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.