Give this - although not thoroughly tested - a try and report back:
Remove the echo if happy with the results. You may need to use the rm -f instead of rmdir.
Greetings,
I know i can use the mv command to move and rename one file. How can I do this with multiple files?
example
pic01.bmp to pic0001.bmp
how can i perform this function on an entire directory of sequential files and keep them in sequence?
Hints, suggestions are most welcome:)
... (1 Reply)
Hi All,
Being new to scripting I am facing a new situation. We have an application that generates a file lets say dumpfile for each user under the users home directory when they execute the application. This is quite a huge file and imagine having that for over 40 users on a daily basis. The... (1 Reply)
Hi Gurus,
I have some files(all ending with .out as extension).
Ex:
aa1.out
aa2.out
aa3.out
I would like to append each file with the current date to the end of the file so that they should become aa1_20090504.out.
So I am using rename as follows:
for i in path/aa* ; do mv $i... (5 Replies)
Hi,
I have 500 directories each with multiple data files inside them. The names are sort of random. For example, one directory has files named e_1.dat, e_5.dat, e_8.dat, etc. I need to move the files to a single directory and rename them all in numerical order, from 1.dat to 1000(or some... (1 Reply)
Hi.
I need help with a little script that will be used to move some files to their parent directory, delete the directory, rename one file in the parent directory and delete another, then continue to the next.
Here's an example:
/var/media/Music/Genesis/1970 album - Trespass (2008 Box -... (4 Replies)
Dears,
I need your help!
I got a problem and found some workaround solution but I donno how to realize it.
I have a number of files (about 300 each day) and I need them to be renamed. All these files has fixed number of letters and name looks like this one:... (7 Replies)
Hey, I'm kinda new to the shell scripting and I don't wanna mess things up yet :)
Looking for a solution to the following:
I need to move all the files like "filename.failed.dateandtime" to another directory also renaming them "filename.ready". I can't figure how to do this with multiple files... (4 Replies)
I am a biologist and using an program on a computer cluster that generates a lot of data. The program creates a directory named
ExperimentX (where X is a number) that contains files "out.pdb" and "log.txt". I would like to create a script that renames the out.pdb file to out_ExperimentX.pdb (or... (1 Reply)
Hi.
I am trying to automate the movement and renaming of a number of files in a directory. I am using the 'mv' command as I do not have access to 'rename'. I have the following scripted FILES=$(ls /transfer/move/sys/mail/20130123/)
if ; then
for i in ${FILES} ; do
mv... (4 Replies)
I have a directory full of directories, say called A B C D E ....
In each of these directories there are files called 1.dsp 2.dsp 3.dsp ..... along with others (with different extensions)
I need to go through each of these directories and move the dsp file to another folder, but with the name now... (6 Replies)
Discussion started by: claire.a
6 Replies
LEARN ABOUT CENTOS
vfs_catia
VFS_CATIA(8) System Administration tools VFS_CATIA(8)NAME
vfs_catia - translate illegal characters in Catia filenames
SYNOPSIS
vfs objects = catia
DESCRIPTION
This VFS module is part of the samba(7) suite.
The Catia CAD package commonly creates filenames that use characters that are illegal in CIFS filenames. The vfs_catia VFS module
implements a character mapping so that these files can be shared with CIFS clients.
This module is stackable.
The parameter "catia:mappings" specifies the mapping on a per-character basis, see below.
OPTIONS
catia:mappings = SERVER_HEX_CHAR:CLIENT_HEX_CHAR
SERVER_HEX_CHAR specifies a 0x prefixed hexedecimal character code that, when included in a Samba server-side filename, will be mapped
to CLIENT_HEX_CHAR for the CIFS client.
The same mapping occurs in the opposite direction. Multiple character mappings are separated by a comma.
EXAMPLES
Map server-side quotation-marks (") to client-side diaeresis (") on filenames in the [CAD] share:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x22:0xa8
Perform comprehensive mapping of common Catia filename characters:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6
Server-side filename to be translated (Note that the path delimiter "/" is not used here):
aa:a*a?a"a<a>a|a
Resulting filename, as seen by the client:
aya-:-axaca"a<<a>>a|a
CAVEATS
Character mapping must work in BOTH directions (server -> client and client -> server) to get unique and existing file names!
A NOT working example:
[CAD]
path = /data/cad
vfs objects = catia
catia:mappings = 0x3a:0x5f
Here the colon ":" is mapped to the underscore "_".
Assuming a server-side filename "a:should_work", which is translated to "a_should_work" for the client.
BUT the reverse mapping from client "a_should_work" to server will result in "a:should:work" - something like "file not found" will be
returned.
VERSION
This man page is correct for Samba versions from 3.5.0 to 4.0.6.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
New version written by Guenter Kukkukk kukks@samba.org
Samba 4.0 06/17/2014 VFS_CATIA(8)