Solved

Why does this command not work?

Posted on 2014-07-19
6
381 Views
Last Modified: 2014-07-21
When I run this command:

$ chmod 777 cache/ log/

I get this:

-bash: $: command not found

This is killing me. I'm trying to make my way through, what should be, a very basic and intuitive Symfony tutorial, and it's like pulling teeth. What am I doing wrong with the above shell command?

Thanks.
0
Comment
Question by:brucegust
6 Comments
 
LVL 84

Assisted Solution

by:ozo
ozo earned 125 total points
ID: 40206878
Try it without the $
chmod 777 cache/ log/
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 125 total points
ID: 40206922
It could be that your env variable PATH is not set correctly.

run below command and see:

echo $PATH

or

run this command

which chmod
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 total points
ID: 40206942
You may not have permissions.  If it's Ubuntu, you will need to use 'sudo' first and give your password.  But that only works if you are included in the 'sudo' users group.
sudo chmod 777 cache/ log/

Open in new window

0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 20

Accepted Solution

by:
tfewster earned 125 total points
ID: 40206960
I think ozo is right - the "$" indicates the command prompt that you type the chmod command at simlar to C:\> , not something you need to type yourself. The equivalent prompt for the root user would be "#", but typing the "#" at the front of a command would act to comment the command out.

* The prompt can be changed by modifying the PS1 environment variable
0
 

Author Comment

by:brucegust
ID: 40209123
Hey, folks!

Thanks so much for your time!

Here's what I tried:

Last login: Mon Jul 21 06:57:02 on console
Bruce-Gusts-iMac:~ bruce$ chmod 777 cache/log/
chmod: cache/log/: No such file or directory
Bruce-Gusts-iMac:~ bruce$ which chmod
/bin/chmod
Bruce-Gusts-iMac:~ bruce$


You'll see the first command was a deployment of the first suggestion, which was to eliminate the "$" symbol prior to the command. After that, I ran the "which chmod" and got what you see above.

What do you think?
0
 

Author Comment

by:brucegust
ID: 40209175
I figured it out!

The instructions that I was following necessitate being at a specific directory and I wasn't there when I attempt the chmod command. Once I positioned myself in the appropriate folder where the cache and log folders existed, I could run the command without a problem.

BTW: I'm desperately making my way through a Symfony tutorial and I'm confident I will have a bunch of questions. For those of you who are looking for some easy money / points, keep the Bruce-ster in your sights and there will be plenty of opportunities.

Thanks!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question