Sponsored Content
Top Forums Shell Programming and Scripting how to rename multiple files with a single command Post 302176582 by antointoronto on Tuesday 18th of March 2008 04:04:19 PM
Old 03-18-2008
rename multiple files

Hi tyub,

This is Antony. Do you remember me.? you want to use this in Kerridge AR module.

its like this

for i in *
do
mv $i $i.Z
done

Hopefully this helps you..

Regards,
Antony
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Rename multiple files

Hello, I want to rename multiple files at a time and I don't know how to do it. I have various ".mp3" files, like "band name - music name.mp3" and I want to remove the "band name" from all files. Anybody knows how to do it using shell script or sed or even perl? Thanks (7 Replies)
Discussion started by: luiz_fer10
7 Replies

2. Shell Programming and Scripting

mv command to rename multiple files that retain some portion of the original file nam

Well the title is not too good, so I will explain. I need to move (rename) files using a simple AIX script. ???file1.txt ???file2.txt ???file1a.txt ???file2a.txt to be: ???renamedfile1'date'.txt ???renamedfile2'date'.txt ???renamedfile1a'date'.txt ???renamedfile2a'date'.txt ... (4 Replies)
Discussion started by: grimace15
4 Replies

3. Shell Programming and Scripting

Multiple file rename (change in filename in unix with single command

Dear All, Please help ! i ham having 300 file with E.G. PMC1_4567.arc in seq. like PMC1_4568.arc,PMC1_4569.arc ...n and so on.. i want all those file to be rename like PMC_4567.arc ,PMC_4568.arc .. mean i want to remove 1 from first file name .. pls help.. (6 Replies)
Discussion started by: moon_22
6 Replies

4. UNIX for Dummies Questions & Answers

Grep multiple strings in multiple files using single command

Hi, I will use below command for grep single string ("osuser" is search string) ex: find . -type f | xarg grep -il osuser but i have one more string "v$session" here i want to grep in which file these two strings are present. any help is appreciated, Thanks in advance. Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies

5. Shell Programming and Scripting

Empty out multiple files with a single command?

I have a log directory: /logs/foo.log /logs/bar.log /logs/err.out I'm trying to find a way to > /logs/*.log > /logs/*.out to blank them out, but of course, that doesn't work. Any suggestions? (4 Replies)
Discussion started by: Validatorian
4 Replies

6. Shell Programming and Scripting

Rename multiple files

Hi, In my directory I have many files, for e.g. file_123 file_124 file_125 file_126 file_127 Instead of renaming these files one by one, I would like to rename them at a same time using same command... they should appear like 123 124 125 126 127 What command(awk or ls or... (3 Replies)
Discussion started by: juzz4fun
3 Replies

7. Shell Programming and Scripting

Single command to create multiple empty files(no trailing lines as well).

Hi, i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing. please let me know or if this has been ansered, if some ocan share the link please, thanks > newfile.txt or :> newfile.txt do not work (4 Replies)
Discussion started by: Onkar Banerjee
4 Replies

8. UNIX for Dummies Questions & Answers

Sftp multiple files in single command

Hi All, I would like to sftp 2 files with a single command. I tried the below options, sftp suer@test13:"/u01/home/oracle/SetDb.sh /u01/home/oracle/.profile" ./ But what actually happens is Fetching /u01/home/oracle/SetDb.sh to /u01/home/oracle/.profile /u01/home/oracle/SetDb.sh ... (3 Replies)
Discussion started by: sid2013
3 Replies

9. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies

10. Shell Programming and Scripting

Move multiple files to different directory using a single command

I have multiple files test1, test2, test3 etc. I want to move to a different directory with ABC_ prefixed to every file and and current dat time as postfix using a single command. (I will be using this is sftp with ! (command for local server). I have tried the following but it gives error ... (5 Replies)
Discussion started by: Soham
5 Replies
asused(3pm)						User Contributed Perl Documentation					       asused(3pm)

NAME
asused - summaries address space used and according to the RIPE DB and REG. SYNOPSIS
asused [--all] [--aw | --approval] [--overlap] [--status | --assign[--pipa] ] regid asused [--all] [--aw | [--approval] [--overlap] [--status | --assign [--pipa] ] [--regid regid] (prefix ...) asused [--<options>] regid | prefix DESCRIPTION
asused is a tool to summaries address space is registered in the RIPE database. For each allocated inetnum object a summary of used and free address space is printed. A grant total summary for all prefixes is also provided. If there are no errors in locating allocations and and assignments under an allocation. In in the total % are calculated on total allocations. where: regid is name of registry as in registry database. prefix is allocation as in whois database. e.g. a.b.c/16 . Prefix is queried whois DB to find all Less specific matches inetnum with na as netname is interpreted as allocation and summerize the allocation. OPTIONS
--assign print all assignments under allocations, size, date and net name . Summary of assignments. And free address space. Summary of status attribute. --all this same as three options --overlap --status --aw. --approval Check the all networks in allocations are valid or not. Print valid and invalid networks. --aw only print invalid networks. --aw Check the all networks in allocations are valid or not. Print only Invalid networks. --approval will print valid and invalid. --contacts print admin-c/tech-c for all inetnums --help Shows the usage of asused. --overlap print the details of overlapping assignments. Summary of overlap per assignment is printed at the end. --reg regid. regid to locate the allocation. Netname of allocation is same as regid, translating the first '.' to '-' IN upper case. If not specified uses i2r to get regid. --status show assignments under allocations with wrong status attribute other than ASSIGNED PA or PI. MISSING for missing status. size and net name. Summary of assignments. No of Assignment(s) , No Assignments with status ASSIGNED PA or ASSIGNED PI, No Assignments with status ASSIGNED PI,No Assignments, No Assignments with Missing status attribute,No Assignments with other values status attribute, none of other . Warnings on assignments. OTHER OPTIONS
as3-option --port port query another whois server on the port. Default is 43. --host whoishost query another whois server. Default is whois.ripe.net. Can query only to RIPE whois server. Server version tested '2.1' --na netname show event table for approval of netname. Used with --aw or --approval -pipa additional flag to the --assign option to print allocation status in output. PA is for ALLOCATED PA, PI - ALLOCATED PI, UN for UNSPECIFED, -- is for missed status field. --version print version of asused. DIAGNOSTICS
No allocations from reg Could not locate any allocations in use from registry. No allocations from DB No inetnum object was recognized as allocation in the RIPE Database. % No entries found for the selected source(s). No assignment(s) found under the allocation. May be a new allocation or allocation which has no objects in RIPE DB. Not sure to treat as 100 % free. ERROR MISMATCH Netname regid RIPE DB Netame attribute has mismatch with na or regid. ERROR STATUS May be incorrect status attribute in the RIPE DB, Valid status ALLOCATED (PA|PI|UNSPECIFIED) ERROR mnt-byInvalid <mnt-by> attribute in RIPE DB expecting RIPE-NCC-MNT|RIPE-NCC-HM-MNT|RIPE-NCC-HM-PI-MNT Inconsistent with inetnum Encountered two inetnum objects with same logical start and end. Logical interpretation of inetnum a.b.c.0 => a.b.c.0 - a.b.c.255; a.b.c.0 - a.b.d.0 => a.b.c.0 - a.b.d.255 Classfull notation Intrepreted as class full object. Check if no of address are counted correctly. Multiple inetnum When tried to locate an allocation inetnum object for regid prefix from RIPE DB with option -L -F -T prefix returned multiple objects. Every prefix can have only one allocation object. NOT Counted Assignment If the assignment is outside the boundaries of allocation. It was returned by -M query RIPE whois server. Invalid inetnum Logical interpretation of inetnum fails. Probably can not identify start, end of end < start. Assignments has Invalid Date one of the dates of inetnum in the changed attribute is invalid. REQUIRES
Perl 5.00404 or later. Connection to RIPE whois server V 2.1, Perl Modules Socket Getopt::Long, regread, ipv4pack BUGS
Could give incorrect summary if logical interpretation of Inetnum is not exact a.b.c.0 - a.b.c.0 is intended to be an assignment of size 1 IP No. Out of memory! Noticed that when the no of assignments are very large, like 5000+ per allocation default data segment size of BSDI 3.1 is not enough. Increasing to 64 M Bytes may help. in bash shell ulimit -d 65536 eg. de.schlund IANA Delegated blocks smaller than /8 If the allocations are outside 192,193,194,195,212 /8 and LIR allocation is same inetnum as in /ncc/ip-reg/delegations asused2 will return No allocations in RIPE DB. eg. de.callisto SEE ALSO
whois reg i2r regread Reg::Asused Reg::Approved Net::RIPEWhois AUTHOR
Antony Antony <antony@ripe.net> . RIPE NCC software group. <softies@ripe.net> POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 46: You forgot a '=back' before '=head1' Around line 66: You forgot a '=back' before '=head1' You forgot a '=back' before '=head1' Around line 95: You forgot a '=back' before '=head1' perl v5.10.1 2003-10-07 asused(3pm)
All times are GMT -4. The time now is 12:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy