Solved

Why does this command not work?

Posted on 2014-07-19
6
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 21

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
There is a huge demand for CodeIgniter among the PHP web developers due to its dynamic features and benefits these days. It is one of most popular and agile open source PHP framework for creating robust web applications in PHP web development field.…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

729 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