Results 1 to 2 of 2
Hi there I'm copying my music from my PC to my laptop, currently my PC uses .flac files, however my laptop HDD is too small for this so I am ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-10-2012 #1
- Join Date
- Mar 2007
Diff Grep File extensions and illegal characters
I'm copying my music from my PC to my laptop, currently my PC uses .flac files, however my laptop HDD is too small for this so I am converting to MP3s.
I have done this previously with my mp3 player with small files and I'm going to make decent MP3s for the laptop (-Q2 or VBR=192kbps kind of quality)
The laptop runs windows 7 and I don't want to change it (its for uni, need to use photoshop, IE and word everyday, so I probably won't even dual boot this) but the PC runs Linux.
To check the files have all copied correctly from one mp3 size to another in the past I had used diff and grep commands. However, if I do this with flac and mp3 it simply lists every file because they are all "different" can I tell diff or grep to look at the file names only and ignore the extensions?
Also, is there a way for grep to find all the files with non-windows friendly file names so I can quickly edit by hand? (tried batch convertors but too complex for my needs)
- 09-12-2012 #2
You can use the "basename" command to get the part of a filename without its extension:
[alex@niamh ~]$ basename myfile.mp3 .mp3 myfile