Sponsored Content
Top Forums Shell Programming and Scripting renaming 50k files, whats the best way? Post 95619 by r0sc0 on Thursday 12th of January 2006 05:06:16 PM
Old 01-12-2006
renaming 50k files, whats the best way?

Because I am not creative, I did this:
find . -type f -name '*.GIF'|cut -d'/' -f2|awk -F. '{print "mv "$1".GIF "$1".gif --reply=yes"}' > case.sh

Then ran the case.sh - I was wondering if you guys could come up with something more efficient? Or even limit CPU useage? It is killing my poor ext3 linux server.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: sorting files by whats in'em

i'm halfway into my script and realize i may need to use an associative array (a hash, i guess they are called in Perl). i'm fairly new to Perl and don't know how to use them correctly. i have some files in a directory. each file contains a number in a specific place in it's header. what i would... (4 Replies)
Discussion started by: quantumechanix
4 Replies

2. Shell Programming and Scripting

renaming Files

Renaming Files more than 1000 in Diffrent Directories in system.. help me in this issue to resolve.... (5 Replies)
Discussion started by: sunsap
5 Replies

3. UNIX for Dummies Questions & Answers

Need help renaming files

I just can't figure this one out. I have a lot of files name (for example) ABC1234.5678.ext I need to rename these files U0105678PQRS So I'm removing everything before the first "." I'm keeping "5678" in the file name Adding "U010" to the front of "5678" Dropping the ".ext" extension ... (5 Replies)
Discussion started by: bbbngowc
5 Replies

4. Shell Programming and Scripting

renaming files or adding a name in the beginning of all files in a folder

Hi All I have a folder that contains hundreds of file with a names 3.msa 4.msa 21.msa 6.msa 345.msa 456.msa 98.msa ... ... ... I need rename each of this file by adding "core_" in the begiining of each file such as core_3.msa core_4.msa core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies

5. Shell Programming and Scripting

Renaming files

Can someone please help. Much appreciated!! I have 4 directories, for ex... /RUN1/ReportTable.nxt /RUN2/ReportTable.nxt /RUN3/ReportTable.nxt /RUN4/ReportTable.nxt I would like to write a for loop, to add the directory name to each ReportTable.nxt I would like for it to be: ... (5 Replies)
Discussion started by: dirttysoufff
5 Replies

6. UNIX for Dummies Questions & Answers

Renaming Files

I just used wget to obtain a bunch of html documents. Now they are named index.html, index.html.1, index.html.2, etc. I'd simply like to move the 1, 2, 3 etc. to the left before the .html, so the new names would be: index1.html, index2.html etc. I know this can be done with a simple script, but... (2 Replies)
Discussion started by: crl21
2 Replies

7. Shell Programming and Scripting

Finding 50k Keywords in 3k files

Hi, I have a file with about 50k keywords. I have a requirement to scan about 3k files to identify which filename has which keyword i.e. an output like following: File1,Keyword1 File1,Keyword2 File3,Keyword1 ..... I have written a shell script which takes each of the 3k files, searches... (4 Replies)
Discussion started by: rjains
4 Replies

8. Shell Programming and Scripting

Renaming files

Hello, I am looking for a command line that will rename name files : f700_abc_o_t_MASTERID_AS_AE_20130323.csv like this f700_abc_o_t_MASTERID_AS_AE_20130324.csv The great idea could be to get the date stamp 20130323 and change any part of it, instead of just change the... (4 Replies)
Discussion started by: Aswex
4 Replies

9. UNIX for Dummies Questions & Answers

Help with renaming the files.

Hi, I have 31 file as below.... dt_ref_med_merged_madt_h_19980101.nc .. .. dt_ref_med_merged_madt_h_19980131.nc I want to rename it like... dt_ref_med_merged_madt_h_1998_1.nc .. .. dt_ref_med_merged_madt_h_1998_31.nc How can I do it ? any suggestions ? I want to do it small... (5 Replies)
Discussion started by: mahesh shinde
5 Replies

10. Shell Programming and Scripting

Renaming multiple files in sftp server in a get files script

Hi, In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this? I am using #!/bin/ksh For eg: sftp user@host <<EOF cd /path get *.txt rename *.txt *.txt.done ... (7 Replies)
Discussion started by: jhilmil
7 Replies
giftext(1)						      General Commands Manual							giftext(1)

NAME
giftext - A program to dump (text only) general information about GIF file. USAGE
giftext [-q] [-c] [-e] [-z] [-p] [-r] [-h] gif-file If no gif-file is given, GifText will try to read a GIF file from stdin. As giftext can generate huge amounts of data, ^C will kill it, but 'q' will stop only the printing (of one of -e, -z, -p), while file integrity will still be checked. MEMORY REQUIRED
Line. OPTIONS
[-q] Quiet mode. Defaults off on MSDOS, on under UNIX. Controls printout of running scan lines. Use -q- to invert. [-c] Dumps the color maps. [-e] Dumps encoded bytes - the pixels after compressed using LZ algorithm and chained to form bytes. This is the form the data is saved in the GIF file. Dumps in hex - 2 digit per byte. [-z] Dumps the LZ codes of the image. Dumps in hex - 3 digits per code (as we are limited to 12 bits). [-p] Dumps the pixels of the image. Dumps in hex - 2 digit per pixel (<=byte). [-r] Dumps raw pixels as one byte per pixel. This option inhibits all other options and only the pixels are dumped. This option may be used to convert GIF files into raw data. Note: the color map can be extracted by gifclrmp utility. If more than one image is included in the file, all images will be dumped in order. [-h] Print one line of command line help, similar to Usage above. AUTHOR
Gershon Elber Man page created by T.Gridel <tgridel@free.fr>, originally written by Eric S. Raymond <esr@thyrsus.com> giflib-tools giftext(1)
All times are GMT -4. The time now is 04:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy