Debian Configuration :: Renaming Files In /dev//radio0 As /dev/radio

Sep 16, 2010

I have a TV/radio tuner and I installed the gkrellm-radio plugin. The plugin works fine, but, it only works with /dev/radio. I'm not sure if its safe to rename files so I just create a symlink of /dev/radio0 as /dev/radio.

It gets pretty annoying to me to have to create a symlink every time I start up my computer so I can listen to the radio. Is there a way to get linux to permanently name "/dev/radio0" as "/dev/radio"?

View 4 Replies


ADVERTISEMENT

Ubuntu :: Renaming Files Through Bash

Feb 10, 2011

I'm trying to rename ~11000 files. What has happened is I have files in the following format:

string1_100_string2_200_string3_300.log

now the numbers 200 and 300 are sometimes below 100 and the file looks like this:

string1_100_string2_99_string3_99.log

and I want to rename such files to be like this:

string1_100_string2_099_string3_099.log

I wrote a small matlab script but it seems to take forever so thought I'd try and do it bash and have got near to nowhere....

View 3 Replies View Related

General :: What's The Command For Renaming Files

Jun 8, 2010

What's the command for renaming files? I thought it was "mv"--I typed "info" and read

Quote:

* mv: (coreutils)mv invocation. Rename files. So, desiring to give a .JPG extension to a jpeg file that had no extension (because I dug it out of my Firefox cache), I typed

Quote:

mv '/home/josh/Desktop/Natalie pictures/DEC8FFA5d01' *.jpg

That didn't rename the file; it made the file disappear from its folder. What did I do wrong?

View 6 Replies View Related

Software :: Renaming Or Copying Some Files?

Apr 19, 2011

i have some files on my server that i can not rename or copy it seems file names are some how strange for linux (centos)the names are like this way :

Spirited.Away.2001.HDRip_-_(Film98-Net).mkv
Up.2009.BRrip_-_(Film98-Net).mkv
How.To.Train.Your.Dragon.2010.720p.Bluray_-_(Film98-Net).mkv

[code]...

View 6 Replies View Related

General :: Batch Renaming Of Files In A Directory Using Sed

Dec 11, 2010

I run a script which generated about 10k files in a directory. I just discovered that there is a bug in the script which causes some filenames to have a carriage return (presumably a '' character).

I want to run a sed command to remove the carriage return from the filenames.

Anyone knows which params to pass to sed to clean up the filenames in the manner described?

I am running on Linux (Ubuntu)

The character causing the filename to 'break up' accross multiple lines appear to be a CR (carriage return) instead of ' '. The filename is being diaplayed in thetitle of a text editor with %0D in the positions of where the file name breaks up. So I need to remove the CR chars from my filenames.

View 1 Replies View Related

Ubuntu :: Renaming Downloaded Files - Adding '

Jan 11, 2011

Whenever I download a file using Firefox or Google Chrome and it has a ' character on it's filename, the file is renamed and a is added before the '. It's really annoying and I'd like to know how can I solve this issue.

View 9 Replies View Related

Ubuntu :: Renaming Files By Shotwell 'title'?

Mar 31, 2011

I've used Shotwell to give titles to a lot of photos, and now realise that I want to also rename those files using the title. I see that Shotwell saves the title into XMP IPTC structure, using this: dc:title[x]. how to batch rename a bunch of files using this data?

View 3 Replies View Related

Programming :: Bash - Renaming Files Won't Work

Apr 1, 2010

I'm trying to rename a lot of files getting rid of the space on the names. For that purpose I wrote this very simple bash script, but for some reason is not working.

Code:
for i in "$(ls)"
do
j=$(echo "$i" | sed 's/ /_/g')
mv "$i" "$j"

done But what I get in return for each line is just one long file name with all the file names concatenated. I've tried with echo -e "$i" as well with no results. This has to be something really simple that I'm missing but I just can't see it.

View 11 Replies View Related

Programming :: Renaming Files With Asian Characters?

Jul 19, 2010

I have a bunch of files that I need to rename, ordinarily this is pretty easy task. The problem here is that the file names have Chinese / Japanese characters. ie [$$$$$$$$].SOMETHING BLAH BLAH.ext Where all the "$$$$" are insert Chinese characters. The problem is that sed or perl doesn't seem to handle the Chinese characters correctly so using a regular expression like this 's/^[*.]//' which would normally work doesn't. From what I have read so far I believe these characters are double encoded UTF-8 (not 100% sure) which could be the problem. So far I've tried numerous different regex's as well as playing around with convmv to see if I could convert the filenames to just single encoded characters but I've had no luck.

View 1 Replies View Related

Fedora :: Automatically Renaming Files While Sorting By Date?

Apr 17, 2010

I often record music from the webradio with Streamtuner.How can I rename the mp3 files recorded in a way that numbers are added to the beginning of the filename representing the order in which the titles were played on the webradio station?I am looking for an automated solution like a renaming tool since there are usually hundreds of files in a directory. I used autorename / ARen for windows back in the day when I was still on XP. What I could do with the tool was:a) Sort the files by date of creationb) add an increasing number at the beginning of the filename based on the position in the sorted list.

View 3 Replies View Related

General :: Code For Renaming Files With Prefix In Subfolders?

Feb 12, 2011

I want to rename files in multiple subfolders with a prefix (e.g., rename "file.tif" with "prefix_file.tif") and not have to be in the subfolder.

code: for f in /path/to/*; do echo mv "$f" "PRE_$f"; done

gives you this: mv /path/to/file1 PRE_/path/to/file1

instead I want this: mv /path/to/file1 /path/to/PRE_file1

View 3 Replies View Related

General :: Renaming Files In Batch With Unix RENAME?

Mar 6, 2011

I have files whose names look like this:Sim1-2_40.36.chr20_sb.foo.indel.novoalign.samSim1-2_40.36.chr20_sb.foo.indel.bwa.samWhat I want to do is to replace all indel with snp in the namesyieldingSim1-2_40.36.chr20_sb.foo.snp.novoalign.samSim1-2_40.36.chr20_sb.foo.snp.bwa.samBut why this unix command doesn't work

View 4 Replies View Related

Ubuntu :: Script For Renaming Files Giving Them The Name Of The Folder They're In?

Feb 2, 2010

I have a folder where all of my movies are placed. Each movie lies in its own folder. I want to write a script which renames all the movie files and gives them the name of the folder they are in.For example I want this file:/home/tryfon/movies/Black Irish [2007]/black.irish.dvdrip.avi to be renamed to /home/tryfon/movies/Black Irish [2007]/Black Irish [2007].aviOne issue is that the video files are of several file types (mostly avi, divx and mkv).Another issue is that some movies consist of two parts, so if a second avi file is found I would like the two (or more) files to be named like: "Black Irish [2007] CD1" and "Black Irish [2007] CD2", or if this is not possible at least notify me of the folders that contain more than one video fil

View 2 Replies View Related

Ubuntu :: Mass Renaming Files - Get Rid Of Two Extra Characters On The End

Feb 12, 2010

I have a folder with various subfolders of files. These files all have two extra characters on the end that I want to get rid of. How would I go about telling the terminal to go into X directory and every subdirectory of X directory, look for all files with the extra characters, remove them, and keep everything else the same?

View 3 Replies View Related

Ubuntu Networking :: Bulk Renaming Files On A SMB Share?

Jan 23, 2011

I have a Netgear ReadyNAS NV in the basement, that I want to use to serve up video files over my network to a TV in the living room.

Now, I have a lot of files that HandBrake encoded and it gave the files an m4v suffix. Even when the files are in a codec that the TV can handle, it refuses to load them because of this suffix... so I want to rename them all.

This is fairly simple for files on a local filesystem. I can simply cd into the directory containing the files, and do something like the commands below.

Code:
$ for a in `ls`;
> do
> stem=`echo ${a} | cut -f1 -d"."` ;
> mv ${a} ${stem}.mpg ;

[Code]....

Although there are a few smb commands available (smbstatus, smbget, etc.), I've not found any commands like smbls or smbmv.

Are there any special commands or utilities around that can do the kind of thing I'm trying to do?

View 1 Replies View Related

Ubuntu Servers :: Renaming Files Recursively From Folder

Mar 26, 2011

I'm trying to rename files recursively from a folder. I want to delete the & from every filename. i've searched the net and found the following script:

Code:
#!/bin/bash
dir=/whatever/directory
for file in `ls $dir` ; do
# ANYCASE TO UPPERCASE:
newname=`echo $file | tr '[a-z]' '[A-Z]'`
mv $dir/$file $dir/$newname
done
and changed it:

Code:
#!/bin/bash
dir=/home/test
for file in `find $dir -type f` ; do
#rename files containing &
newname=`echo $file` | tr '[&]' ''
mv $dir/$file $dir/$newname
done

But the for loop explodes the filename after each & sign, so i don't have a whole filename. if the file is named lorem & ipsum, the for loop will break it in 3 parts.

View 2 Replies View Related

Ubuntu Multimedia :: Renaming Recovered Music Files

May 18, 2011

I managed to very stupidly (and avoidably) overwrite the hard drive that contained all my stuff--music, photos, home videos from the 80's that were painstakingly converted to digital movies, etc.After running Photorec and recovering much of the data to another disk, I'd like to be able to rename the music files using whatever exif data/tags are available.

View 6 Replies View Related

Ubuntu :: Renaming Multiple PDF Files (Replacing Sign)

Jun 21, 2011

I have many pdf files which contain "%" sign also in the name. I want to rename that all files by replacing "%" to "-" Its hierarchy of many files and folders. Is there any solution to do this at one time? OR any script for this?

View 7 Replies View Related

General :: Renaming Multiple Files Caused By Dropbox

Jul 20, 2011

Recently I installed Dropbox on a server to do file synchronization and it added " (Case Conflict 1)" to a whole bunch of my files! I realize now that it was caused by case insensitivity but I'm still left with hundreds of files that are in this renamed state. Is there a script in Linux that would allow me to recursively go through the directories and strip out this string?

i.e.
a (Case Conflict 1).jpg --> a.jpg
/myfolder/abc (Case Conflict 1).doc --> /myfolder/abc.doc
/myfolder/subfolder/mydoc (Case Conflict 1).pdf --> /myfolder/subfolder/mydoc.pdf

View 2 Replies View Related

General :: Copying And Renaming Multiple Files In Working Dir

Apr 8, 2010

How can I copy multiple files, each with a slightly different name from the SOURCE in the same directory?

Example: '/home/junk' contains A.txt, B.txt

I want to copy /home/junk/A.txt to /home/junk/A1.txt and /home/junk/B.txt to /home/junk/B1.txt using a single command.

View 11 Replies View Related

General :: Renaming A Bunch Of Files Using For-structure And The Mv Command?

Feb 3, 2010

Basically I need to rename a bunch of .doc files using the for-structure and the mv command (w/ wildcards) in bash. I guess this would be a bit easier if I'd use the rename command, but since this is a school assignment of sorts I need to use for & mv. The .doc files are named "1filename.doc", "2filename.doc" etc. And I've got to rename them to "aaa_1filename.doc", "aaa_2filename.doc", "aaa_3filename.doc" and so on. Tried to dabble quite a bit with the for and mv commands, basically just got a bunch of errors. Every damn time. For 2 hours. The most common error was "mv: missing destination file operand after ..."

View 6 Replies View Related

General :: Renaming Multiple Files In Batch Process

Feb 21, 2010

I have some random files in a folder. I want to rename all of the files in a batch process. I have a text file that contains the Currentname of all the files in the folder, as well as a text file with all of the Newname of files in the folder. I want to replace Currentnames with Newnames.

For example, here are the names of the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the Currentname of all the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the proper Newname of the file:
a.mp4
b.mp4
c.mp4

I want to rename Currentname with Newname in the folder. So when I go to the folder the Newname of the files are:
a.mp4
b.mp4
c.mp4

View 14 Replies View Related

Software :: Renaming Some Files (adding Leading Zeros)?

Jan 8, 2011

I need to rename some files. They are named:

NP1-1.mp3
NP1-2.mp3
NP1-3.mp3

[code]....

However, as there is no lead 0, the order gets confused by some software (some software mistakenly lists it as NP1-1.mp3, then NP1-10.mp3). I'd like to add zeros so the files are named like this:

NP1-0001.mp3
NP1-0002.mp3
NP1-0003.mp3

[code]...

How can that be done?

View 3 Replies View Related

Ubuntu :: Created A Little Bash Script For Renaming Files From A Folder?

Feb 28, 2010

I created a little bash script for renaming files from a folderEvery time i hv to put that bash script file (rename.sh) in folder Is there any ways i will call (rename.sh) from terminal without moving rename.sh into any folder ?ne More Question : Whenever i run any .sh file automatically one .sh~ file created it is my programing mistake or is it exists ?

View 7 Replies View Related

Ubuntu :: Renaming All Files In Directory But Leave The File Extension Alone?

May 22, 2010

how can I rename all files in a directory up to the first dot (there by leaving the file extension alone) to the same thing? Im trying to rename all my media files and associated files in a directory to (preferably) the name of the directory it self. if I have

Code:

A Clockwork Orange -
wzzyfg.cd1.avi
wzzyfg.cd2.avi
wzzyfg.nfo
ACO.fanart.jpg
orange.tbn

Id like to automatically mass rename them all to

Code:

A Clockwork Orange
A Clockwork Orange.cd1.avi
A Clockwork Orange.cd2.avi
A Clockwork Orange.nfo
A Clockwork Orange.fanart.jpg
A Clockwork Orange.tbn

I have rename on my server which I used to remove underscores from file names, but I dont know how I would use it to rename everything up to the first period. Bonus points for renaming stuff to the name of the parent folder!

View 5 Replies View Related

Ubuntu :: Renaming Video Files Based On The Date Created

Aug 4, 2011

I have hundreds of MTS and AVI files since 2000 and would like to rename them in the following manner based on the date created: DD-MMM-YYYY HH.MM.SS_X; where X begins at 1 and increments by 1 if there are dublicate date/time stamped videos.

Ex: 19-Nov-2002 08.12.30.avi, 19-Nov-2002 08:13:30_1 and 19-Nov-2002 08:13:30_2

Someone previously wrote the following script for me, and it works great for photos. It uses EXIV2 to get the image date created info. I have tried to understand the script, but am struggling. The video files I have can use the date modified since I have not modified them since I filmed them.

#!/usr/bin/env python
import os
import stat
import pyexiv2
import time
directory = '/home/david/Desktop/test'
[Code].....

View 1 Replies View Related

General :: Renaming External Files Changing Ownership Instead Of Root

Mar 28, 2011

i have inherited a mixed bag of sorts: several xp users updating an access mdb with the BE on a lamp stack shared via samba. i have a backup device which gets mounted at: /media/disk... each client record (has) a folder by the companyname on the samba share, and all relative documents are placed there. when the backup script runs, it just copies newer or missing files.

someone has been renaming folders, and not matching the folder name to the related companyname from the mdb. so...the backup script captures and duplicates the data in the renamed folders. some client records also have periods in the name (not required from a data pov), such as 'Company Ltd.' instead of 'Company Ltd'. i can produce a list of company names as the folders should be found easily enough, but get a little stuck with the linux scripting.

i can easily remove and further prevent any unwanted punctuation in the company name on the client record, and create the correct folder name on the samba share with vba, but would also like to:

-for each 'client activity' folder on the backup device
-rename the folder by removing punctuation marks
or
-delete the folder if is a dupe

i tried: ls -al | grep '&' - it properly returns only those lines with an ampersand in the folder name, but returns all folders when i try that with a '.'.

what would be the easiest method to do the renaming? i thought if there was a way to change ownership of the mounted device, then the vba code (easy to write) would be simple.

OK - i just ran chown -R on the external device, changing ownership to (me) instead of root. didn't want to because it took too long, but can now use the MoveFolder method of the filesystemobject from my app to do the renaming instead of some sort of bash script (which i was dreading).

View 1 Replies View Related

General :: Renaming Files With Sed - Mv: Missing Destination File Operand After `$i'

Mar 20, 2011

Today i am trying to learn how to use sed. I set up a testing folder with the following files:

AAb.lol
AAc.lol
AAx.lol
test.sh

My goal is to create a script (test.sh) which renames all the files to their original name without AA. I want to end up with this:

b.lol
c.lol
x.lol
test.sh

sed seemed to be the perfect tool so i went ahead and created a script which i think should clear the job.

[Code].........

mv: missing destination file operand after `$i' From that 2nd line i can tell that $NewName is just empty. I also read something about sed needing the -e option for scripting purposes but i just don't understand it.

View 7 Replies View Related

Software :: Variables In Moving / Renaming Files - CURL Downloads

Aug 29, 2010

curl -L http://URL/file[1-2].txt -o $(date +%m-%d-%y) newfilename{1,2}.txt

Basically, this command goes to URL, downloads file1.txt and file2.txt, however it saves BOTH files as newfilename1.txt. I would like the script to name the second download (file2.txt) newfilename2.txt. So, before you say to use the -O switch in Curl, please understand that I wish to rename the files so that they are not what they were on the server (names are too long). So file1.txt becomes newfilename1.txt, file2.txt becomes newfilename2.txt. Is this possible? The command I listed works only until the newfilename{1,2}.txt, it always saves as newfilename1.txt

View 3 Replies View Related

Programming :: BASH - Renaming Multiple Files In Foreign Language?

Mar 6, 2011

I have this cool bash script that I worked hard on. But it broke down when it can across files that had non-English characters. Another small problem was getting it to descend into a directory. If it renamed a directory it would not descend into that dir to rename the other files. I would have to run the script twice on the same directory.

Here is the script:
Code:
find -type d -o -regextype egrep -iregex '(.*.ogg|.*.mp3|.*.wav)' | while read s
do
rename -v 'y/A-Z/a-z/' "$s"
done
find -type d -o -regextype egrep -iregex '(.*.ogg|.*.mp3|.*.wav)' | while read n
do
rename -v 's/ /_/g' "$n"
done
A French name like this:

Code:
Chateau De Sable (imagine accents above the letter a)
became this:

Code:
ch303242tea_de_sable
This is not what I wanted.

Why would the script not descend into a directory after it was renamed?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved