LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2006, 02:46 PM   #1
yinglcs
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Rep: Reputation: 15
chmod command on linux


Hi,

I am trying to execute 'chmod 777 *.mp3', but I get an invalid option. It works on *.MP3 but it does not work on *.mp3

[root@lxp-cheung New Folder]# chmod 777 *.MP3
[root@lxp New Folder]# chmod 777 *.mp3
chmod: invalid option -- F
Try `chmod --help' for more information.

Any idea?
 
Old 01-13-2006, 02:52 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Try,
Code:
$chmod uga+rwx *.mp3
 
Old 01-13-2006, 03:04 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Quote:
Originally Posted by yinglcs
Hi,

I am trying to execute 'chmod 777 *.mp3', but I get an invalid option. It works on *.MP3 but it does not work on *.mp3

[root@lxp-cheung New Folder]# chmod 777 *.MP3
[root@lxp New Folder]# chmod 777 *.mp3
chmod: invalid option -- F
Try `chmod --help' for more information.

Any idea?
You probably have a strangely named .mp3 file (maybe the filename contains spaces and a -F ???) Find that problem file (use the "ls" command) and rename it to something more sane. e.g.,
Code:
mv "stangely named -F file.mp3" betterfilename.mp3
 
Old 01-13-2006, 03:55 PM   #4
yinglcs
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks. I change the permission using file manager. It works.
 
Old 01-13-2006, 06:53 PM   #5
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
If you have a file that starts with a hyphen, you can use the "--" flag to stop interpreting flags:
Code:
chmod -- 777 *.mp3
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CHMOD Command dudeman41465 Linux - Software 1 09-26-2005 03:29 AM
chmod command linuxtesting2 Linux - Newbie 2 09-03-2004 01:02 PM
Cannot login since I entered chmod command? gopikrish Linux - Software 3 08-20-2004 06:44 PM
chmod command not affecting files blueleft Linux - General 4 08-09-2003 12:26 PM
Chmod command gogo Linux - General 2 09-24-2002 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration