LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-15-2005, 01:32 AM   #1
jasone
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: FreeBSD, OpenBSD, Debian Etch
Posts: 160

Rep: Reputation: 30
What does the * mean?


Hi!

If I list a directory with ls I'll get files that's followed by a *and would be in a different color than other files with the same extension. For example when I list a picture directory:

[user@mybox]$ ls
pict001.jpg
pict002.jpg
pict0003.jpg* <----- this would also be green in my case

What does that mean?

Thanks in advance for useful help!
 
Old 04-15-2005, 01:34 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
On the systems I use, it indicates the file has execute permissions set. Do a ls -l on the file and look at the permissions. Since it's a jpeg file, it has no business being executable. So I'd remove them to keep things tidy.
 
Old 04-15-2005, 01:40 AM   #3
jasone
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: FreeBSD, OpenBSD, Debian Etch
Posts: 160

Original Poster
Rep: Reputation: 30
All right thank you!

Is there something I can do to chmod all the files with the * in the same time within i directory?
 
Old 04-15-2005, 02:06 AM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
CAUTION: DO NOT DO THIS AS ROOT!
Code:
chmod -x ./*
 
Old 04-15-2005, 02:08 AM   #5
jasone
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: FreeBSD, OpenBSD, Debian Etch
Posts: 160

Original Poster
Rep: Reputation: 30
Thank you guys! You've been most helpful!
 
Old 04-15-2005, 02:08 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Sure is. You can do this:
Code:
chmod ugo-x *.jpg
That will remove execute permissions completely from every file in the directory with a ".jpg" extension.

If you have a lot of files in a lot of subdirectories that you want to change, you can do this instead:
Code:
find /path/to/top/directory -type f -iname "*.jpg" -exec chmod ugo-x {} \;
It's a little cryptic, but again, it'll remove all execute permissions from the "*.jpg" files in every subdirectory. The find command is extremely useful, and I highly recommend understanding what it can do if you're not familiar with it.
 
Old 04-15-2005, 02:10 AM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Beat me to it, but a word of caution:

If your directory has subdirectories in it, scuzzman's command may have unintended consequenses. It would remove execute permissions from those subdirectories. That basically means you wouldn't be able to "traverse" into them. It's a little hard to explain. Rule of thumb: if you want access to a directory, it needs to have read and execute permissions.
 
Old 04-15-2005, 08:40 AM   #8
jasone
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: FreeBSD, OpenBSD, Debian Etch
Posts: 160

Original Poster
Rep: Reputation: 30
Thank you much! I'll do it one directory at the time from now on with: chmod ugo-x *.jpg =)
 
  


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




All times are GMT -5. The time now is 12:53 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