Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Introduction to the Terminal Directories and Files Shortcuts and Wildcards

I've been having trouble with this one all day

the main question I've been having trouble with is question 2 of 6. the command I've been using is dugdig/macpan.sh any ideas what I'm doing wrong?

3 Answers

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,720 Points

Yeah, that was a slightly tricky quiz -- it is easy to get tripped up on some of those questions the first time if you don't read the question carefully. At some point Linux/MacOS command line becomes second nature since it is used daily.

What they are looking for is this below.

$ ./macpan.sh

A big takeaway from any computer course is that there are always multiple ways to do things, so don't get too worried if you didn't think about that method at first.

It is, however, important to know that the ./ prefix refers to files in the current directory, since this is a UNIX/Linux/BSD way to refer to files in the current directory.

So would it be $./dugdig.sh ?

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,720 Points

Yes-- you're correct! (you get the picture now!)

Additional "caveats"

  1. ./dugdig.sh must have its executable bit set. (you can fix this with a $ chmod +x dugdig.sh)

  2. If your shell script didn't have its execute bit set:

You would have to execute by using the shell as an interpreter (often /bin/sh or if in your path, just sh)

e.g. $ /bin/sh ./dugdig.sh

im still getting bummer, could i possibly have a syntax error with: $./dugdig.sh?

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,720 Points

Maybe this is what you were looking for?

../ refers to the parent directory

./ refers to the current directory

https://imgur.com/a/jCGmD15

https://imgur.com/jY1sJXZ