1st trap:
ERE (grep -E or egrep) matches versus glob (wildcard) matches. As RudiC pointed out.
2nd trap:
the shell matches the wildcards against existing files in the current directory.
So the destination cannot be matched.
A way out is a loop, either
Or
While the latter is not as precice, because * allows all characters after the [0-9],
I added another [0-9] so at least it does not match the _org files.
Last edited by MadeInGermany; 02-25-2013 at 08:04 AM..
In a shell script I would like to use a compressed file name, i.e. with suffix of .Z, as a file input $1. After the file in uncompressed, I would like to use the file name without the .Z . How do I do this?
Thank you. (8 Replies)
Hi All,
I have a number of files in a directory that I would like to rename - I am quite aware that you can use the mv command to rename the files - I would like to rename them automatically from the command line instead of having to do them singly. I have searched the forum pertaining to... (4 Replies)
Hi there,
Firstly, I have no experience with shell scripts so would really appreciate some help.
I have the following shell script that is causing some problems:
moveit()
{
&& set -x
if
then
DOUBLE_DELIVERY=$(grep... (6 Replies)
Hi,
I have several files with name
b1.root, b2.root b3.root
I want to rename the "b" to "bkg", so finally is should be:
bkg1.root bkg2.root bkg3.root
I used command:
rename s/b/bsig/ b*root
Somehow it is working at some place and not working in other folder. I do not have any idea... (3 Replies)
I got a game that output map tiles of the session with the 0,0 position at the place you login/spawn.
That makes making a map somewhat troublesome since the 0,0 will move.
So I've been looking for a way to change the numbers in the filenames of all files in a folder by a certain value.
The... (5 Replies)
Hi friends ,
i want to change the filename as below
filename=ABC_HYND_JDHD_20130125120345.txt
expected output : ABC_HYND_JDHD_20130125.txt
i have tried using awk but not able to procedd futher. i am trying to do the above in single commad.
echo... (3 Replies)
Hi,
I have a lot of files similar to the below order. I want to rename all the files .discrading the time stamp/numbers after cnf.
Existing files
id_info_20130405.cnf_20130801
in_info_20130405.cnf_20130891
iz_info_20130405.cnf_20130821
in_info_20130405.cnf_20130818... (2 Replies)
Hi
I can do simple file renaming but this task is slightly more troublesome
Ive got a guy that gives me multiple .pdf filles in a directory named
something like
3412345.pdf
4565465.pdf
8534534.pdf
And he also gives me a html file which is tabled with which shows the filenames above... (2 Replies)
Hi all,
Newbie here. First of all, sorry if I made any mistakes while posting this question in terms of rules. Correct me if I am wrong. :b:
I have a .dat file whose name is in the format of 20170311_abc_xyz.dat. The file consists of records whose first column consists of multiple dates in... (2 Replies)
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
LEARN ABOUT CENTOS
ctl_mboxlist
CTL_MBOXLIST(8) System Manager's Manual CTL_MBOXLIST(8)
*
NAME
ctl_mboxlist - perform operations on the mailbox list database
SYNOPSIS
ctl_mboxlist [ -C config-file ] -d [ -x ] [ -p partition ]
[ -f filename ]
ctl_mboxlist [ -C config-file ] -u [ -f filename ]
ctl_mboxlist [ -C config-file ] -m [ -a ] [ -w ] [ -i ]
[ -f filename ]
ctl_mboxlist [ -C config-file ] -v [ -f filename ]
DESCRIPTION
Ctl_mboxlist is used to perform various administrative operations on the mailbox list database.
Ctl_mboxlist reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. The configdirectory option is
used to determine the default location of the mailbox list database.
OPTIONS -C config-file
Read configuration options from config-file.
-d Dump the contents of the database to standard output in a portable flat-text format. NOTE: In Cyrus versions 2.2.13 and earlier,
the dump format did not include the mailbox type flags, breaking remote mailboxes (frontends, mupdate master, unified backends) when
undumped.
-x When performing a dump, remove the mailboxes dumped from the mailbox list (mostly useful when specified with -p)
-p partition
When performing a dump, dump only thise mailboxes that live on partition
-u Load the contents of the database from standard input. The input MUST be in the format output using the -d option. NOTE: Both the
old and new formats can be loaded, but the old format will break remote mailboxes.
-m For backend servers in the Cyrus Murder, synchronize the local mailbox list file with the MUPDATE server.
-a When used with -m, assume the local mailboxes file is authoritiative, that is, only change the mupdate server, do not delete any
local mailboxes. USE THIS OPTION WITH CARE, as it allows namespace collisions into the murder.
-w When used with -m, print out what would be done but do not perform the operations.
-i When used with -m, asks for verification before deleting local mailboxes.
-v Verify the consistency of the mailbox list database and the spool partition(s). Mailboxes present in the database and not located on
a spool partition, and those located on a spool partition (directory containing a valid cyrus.header file) and not present in the
database will be reported. Note that this function is very I/O intensive.
-f filename
Use the database specified by filename instead of the default (configdirectory/mailboxes.db).
FILES
/etc/imapd.conf
SEE ALSO imapd.conf(5), cyrus-master(8)CMU Project Cyrus CTL_MBOXLIST(8)