LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-23-2006, 06:47 PM   #1
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Rep: Reputation: 31
* after filenames


Hi,

I have an * asterisk (spelling? <---) after some file names. Can you tell me what this means?

Example:
04-AudioTrack\ 04.mp3*

Thanks,
 
Old 07-23-2006, 07:31 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
"ls -F" puts indicator characters at the end of filenames it lists for certain types of files:
* = regular file has executable permission
/ = directory
@ = symlink
| = pipe
= = socket
> = doors
 
Old 07-23-2006, 07:31 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
If you're using ls with the -F option it means that the file in question is executable.

edit: D'oh beaten to it!
 
Old 07-23-2006, 08:01 PM   #4
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
Okay,

In response to that. I was trying to make this directory of songs play on a shoutcast server. I have never had these crazy extensions on here before (of what i remember), and usually , I don't recall have mp3's executable.

I was having problems with shoutcast not able to open the file. I was assuming that perhaps this was the reason why.

Any way for me to undo this so they are just files sitting in a directory like they should be, so I can test to see if this is the problem?

And furthermore, I'm just doing a regular ls. They are all showing up green too, which I know means executable on this system.

Thanks,
 
Old 07-23-2006, 08:11 PM   #5
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Most people have their ls alias'ed to "ls -F --color=auto" or some crap like that, so it shows up in color with other stuff. Check your aliases.

Use "ls -l" to look at the permissions of stuff.
 
Old 07-23-2006, 09:13 PM   #6
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
Thanks guys,

I figured out my problem after all. It turns out the playlist file can't have spaces in it. So it sucks to be me because almost all of my songs have spaces in it..... as when I ripped them I put regular windows names in there.

I understand how things have color, and the various other commands that go with ls, but ls -F is a new one.

I just never have seen this asterisk thing after file names, let alone making a mp3 executable like a program or such. I usually only see files executable when they are scripts or binaries.

Thanks for the advice though, I'll check on that and let you guys know what i figure out.
 
Old 07-23-2006, 09:28 PM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you want to get rid of the spaces, you could try something like:
Code:
for i in "* *.mp3" ; do mv -i "$i" "`echo $i | tr ' ' '_'`" ; done
This will replace the spaces with underscores.
 
Old 07-23-2006, 09:32 PM   #8
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
sweet. I will totaly be trying that out.
 
Old 07-23-2006, 09:40 PM   #9
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
No problem. Also, if you want to try to get rid of the execute permissions, you can do:
Code:
chmod -x *.mp3
 
Old 07-24-2006, 01:49 AM   #10
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
Quote:
Originally Posted by Matir
Code:
for i in "* *.mp3" ; do mv -i "$i" "`echo $i | tr ' ' '_'`" ; done
This doesn't work here, but the following does:
Code:
(IFS=$'\n'; for i in $( /bin/ls -1 *.mp3 | grep " "); do mv $i $( echo $i| tr ' ' '_' ); done)
 
Old 07-24-2006, 02:14 AM   #11
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by Matir
If you want to get rid of the spaces, you could try something like:
Code:
for i in "* *.mp3" ; do mv -i "$i" "`echo $i | tr ' ' '_'`" ; done
This will replace the spaces with underscores.
umm how about
Code:
rename ' ' _ *.mp3
 
Old 07-24-2006, 09:00 AM   #12
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I wasn't even familiar with the rename utility. The manpage for mine indicates that it should take a perl regexp and a number of file names for that purpose.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
spaces in filenames dotancohen Programming 12 02-17-2006 02:42 PM
Filenames eponymous Linux - Software 3 05-25-2005 06:36 AM
inodes to filenames bambolin Programming 1 04-23-2005 02:03 PM
Can't see long filenames starionwolf Linux - Newbie 5 11-12-2004 03:13 PM
Length of filenames supreme_command Linux - Newbie 1 05-06-2004 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:40 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
Open Source Consulting | Domain Registration