Ubuntu :: How To Batch Rename Directories
Dec 6, 2010I have several folders:
Archive_001
Archive_002
Archive_003
etc.
Is there any command to batch rename these directories to:
NewArchive_001
NewArchive_002
NewArchive_003
I have several folders:
Archive_001
Archive_002
Archive_003
etc.
Is there any command to batch rename these directories to:
NewArchive_001
NewArchive_002
NewArchive_003
I have quite a few sound sample files totaling over 4 gigs in size with around 80 root folders and then around 34 sub folders. i have a total of 13 DVD's in the above format. how do i "change the date" on all files in one go is that possible?
View 3 Replies View RelatedI 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 RelatedI have a bunch of photos with varying names. I want to give each photo a random name(*), how do I do that? (*)I'm going to put them on a digital photo-frame that can't shuffle
View 4 Replies View RelatedI selected 10 photos and used the batch rename feature (Batch -> Rename Images). Once I had the settings set and accepted the changes, the tool successfully renamed all 10 photos. The problem is I can't see them in digiKam anymore. It's just an empty album. When I navigated to the folder using Dolphin, all the pictures were still there and they were properly renamed. Back in digiKam, it's just an empty folder. I tried moving the photos to a different directory and then adding that folder to digiKam, but it still showed up as an empty folder.
I don't know what to do. How can I get this app to see my pictures again?
possible to rename a list of files in batch in order to maintain the last part of them, then purge a central section and then again maintain the extension?I.E.:
Code:
file01.qwertyuiop.txt
file02.asdfghjklmnbvzxcqwertyuiop.txt
[code]....
I have about 300 files that need renaming, because the file system does not display the French characters properly. The dodgy letter in question has been replaced by a "question mark in a black diamond" symbol.No way of renaming, other then using mv in the Konsole has worked. Is there any way, script or program out there, that will do a batch rename?
View 9 Replies View RelatedThis might not be the right place to ask this question, but it's software so I'll try this before going to Audio-specific boards. I have a bunch of MP3s (some ogg) with crazy names in crazy directories. I would like to make sure the tags are correct (possibly by hand) and then rename them/move them so that they are in places like
<artist>/<directory>/<songname>.mp3.
So I imagine a magic program where I can edit tags and then push a magic button that makes directories and copies the files as above. Any ideas?
I have one directory with 3 level sub-directories, and about houndard files under those directories. I need a shell script to rename all patern mateched directories and files.
For example: the patern is AA in the directory or file name.
I am to rename all the files within a directory (which contains multiple subdirectories) recursively without invalid characters.
I tried the coding posted above.
find . -type f -printf '%p
' | while read file; do
oldfile=$(basename "$file")
newfile=$(echo "$oldfile" | sed 's/[^A-Za-z0-9_.]/_/g')
if [ ! "$newfile" == "$oldfile" ]; then
echo mv "$file" "${file%$oldfile}$newfile"
code....
but I get an error on both of them stating "find: bad option -printf find: [-H | -L] path-list predicate-list"
How would I rename all files with a leading decimal point recursivley? I some how got all my music files to have a decimal point.I tried the below and got a " sed argument to long".[CODE]find /media/MUSIC -type f -name "*.wma" | xargs -0 sed -i 's/.(.*)/1/'[CODE]
Another question, can i just use -type f with out -name ? I am sure that all the files got the decimal point added as the first character.
i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.
View 14 Replies View RelatedI want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.
I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.
I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?
I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.
for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files
like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!
Is it possible to restrict users to their home directories and allow admins to have different home directories? Essentially I want users to have a folder in /var/www/html/$USER and admins to have either unrestricted access or have their root directory be ./ or /www or /etc. I have is set now so users have access to thier home direcotry but I need to upload web files as admin.
So far I have created:
chroot_list
user_list
[code]....
I was trying to understand "batch" command, and I thought perhaps when I am logged in a terminal, in addition to X, there are multiple users, and man page says it is not suitable for multiple users. But then, you could never use batch in a terminal? So not sure... take a look, at first it works, then it does not. In this example, I am trying to use "batch" to make (touch) a new file. And the load is always very low.
[Code]...
I am trying to run a .batch file, I was wondering if this edit would make it work, this is a java application-loader.
Code:
#bin/bash
java -Xmx500m -cp .;Theme.jar Gui 0 1 lowmem members 32
pause
Is there some way of recursively batch converting mp3s into oggs while keeping the same directory structure?
View 8 Replies View RelatedI recently installed JDK 6 runtime using apt-get install in terminal. I downloaded a .jar file and attempted to run it but I got an error telling me it has blocked the file for some reason.Another thing was, how can I run batch files? I know ubuntu doesn't come with something like MS DOS but is there anything similar that I can run batch files with?
View 3 Replies View RelatedI want to quickly get to the Root directly (or whatever it's called).This is how I do it now; (the text in bold is what the computer spits out)
me@me-desktop:~$ sudo -s
[sudo] password for me: (then I enter my password)
root@me -desktop:~#
I'd like to just type one the new of the batch file and then hit enter. The batch file would then do the rest.
Is it possible?I am mainly looking for A shell script or program that can convert a Batch (.BAT) file into a Windows executable (.EXE), or
A program that can be run from MS-DOS that can turn a batch into an exe.
Ubuntu was working fine and everything. I get a notice that there were updates available so I tell Update Manager to update. It wanted a reboot after everything was successfully installed. So I press reboot and this is what I get from now on. How can I fix whatever the updates destroyed?
View 7 Replies View RelatedIs there a way to batch convert recursively using ps2png?
View 4 Replies View RelatedI want to be able to enter multiple filenames after this bash file on the command line--- file1.rm, file2.rm by putting a shift command in this file?Or even better, for this bash file to take a line by line pipe from a text file. Excuse my atechnicalness.
file: rm2avi.sh:
#!/bin/bash
cd /media/212EXT/data/download/convert
[code]....
I have a file with about 6 .flv files and I wish to batch convert them to libmp3lame. I have tried making a #!bin/bash script with all the files in e.g.
Code:
ffmpeg -i filename.flv -sameq -acodec libmp3lame -f asf filename.mp3
I have inserted all the filenames individually into the script but when I ran it I got too many errors and i was wondering if someone knew a quicker way to do it e.g. a script that would batch convert all .flv files in that folder to .mp3 format.
I am use to microsoft products. In microsoft windows, I can make a batch file that says to delete a file on the desktop during startup. would like to create a "batch file" or command that runs at logon in Ubuntu. An example:f I wanted to delete a certain file on the desktop called "new.pdf" everytime I logon,Could I make some kind of file the has the commands "rm new.pdf" in it and run it as a file during login?
View 5 Replies View RelatedI don't know if it's possible but GIMP is able to receive command line arguments, so why not? Basically, I want to create a batch (action, macro or what it may be called) and then set up a cron job which will run every hour. So, it would be something like "If an image is in X folder, then resize, watermark & move it to Y folder".
View 2 Replies View RelatedSo I have a php script that is setup to stream flash video (.flv) and I absolutely love having it. The problem is that any files I want to stream have to be in .flv format for it to work properly as .avi and others obviously don't stream well. Up until now, I've used FFMpeg to change the format from .avi to .flv, however the process takes a lot of time if you have a lot of videos, added to that you have to do one file at a time definitely makes it a pain.Does anyone know of a bash script that can take all the files (i.e. avi, .wmv, .mkv, .mpeg4) in one folder and automatically convert it to .flv? Then possibly delete the old files? Low resolution is fine, so long as it at least viewable. Does anyone have a script or know of a program that can do this (I run Ubuntu 10.04). I think FFMpeg has the best chance of doing this, but I don't know the syntax to actually do so.
I've searched the internet, and while I have found a few scripts, they didn't work for me (still looking into two scripts I found.I am currently messing with them to see if I can get them to work).It would be immensely helpful if someone knew of a way to do this.I also forget to mention that I have used Winff, but I was looking more for a bash script to do this so that I can set a cron job to convert them every hour or so.
I have a LaTeX document in one folder, and the images that this documents includes via
Code:
includegraphics{filename}
are in subfolders of this directory. Sometimes I compile this LaTeX file using PDFLaTeX, and others using plain LaTeX. Thus, I would like to have my images in PDF and EPS format, along with its original source, normally an SVG file created with Inkscape. I know I can use Inkscape to convert these files to these formats, but when there are 50 images, it becomes cumbersome/boring/APITA.
I have a small Makefile that reads gnuplot scripts and generates EPS files
Code:
# Makefile to convert into Encapsulated Postscript
# the plots made with GNU Plot. (.plt files)
.PHONY=eps,clean
PLOTS=$(shell ls *.plt 2> /dev/null)
[Code].....
I've used Fedora 11 and 12, and I found autoten which automatically installs a lot of necessary software and provides an easy GUI interface to do so. I switched to Ubuntu Karmic recently and now I'm working on customizing all the bugs that come with my computer. So far, I've fixed compiz-fusion, the sound problem with ALSA, as well as customizing the theme to the way I like it (by fixed I don't mean it was a reported Launchpad bug, but just that I customized it to my liking or it wasn't previously working on my laptop and it is working now).
So my question is, am I able to (even though my knowledge is limited), able to make some sort of batch script that will automatically apply the changes I wish every time I update my kernel? Or, just for simplicity's sake, I may stay with 9.10 for a while and have this script to apply my changes if/when I have to uninstall/reinstall. I know it's fairly simple to make a batch file in Windows, so I'm hoping it will be just as easy in Linux. (I know, comparing apples to oranges).