rename files
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix questions > rename files




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    rename files  
Gabriella


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 02:13 AM

I would like to shorten file name from search?q=opq to opq. For one
file, I did mv command and it works. The question now: how to shorten
the name of many files at the same time.
list of files:
search?q=opq
search?q=odf
search?q=kjl
etc

output
opq
odf
kjl

Thanks





[ Post a follow-up to this message ]



    Re: rename files  
parv


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 02:13 AM

in message <17c19ad9.0410021253.1e520d6a@posting.google.com>,
wrote Gabriella ...

> I would like to shorten file name from search?q=opq to opq. For
> one file, I did mv command and it works. The question now: how to
> shorten the name of many files at the same time.
> list of files:
> search?q=opq
> search?q=odf
> search?q=kjl
>
> opq
> odf
> kjl

One of these should be able to help you...

Interesting threads/posts related to moving
--------------------------------------------
http://groups.google.com/groups?th=b45310c8ba0519a
http://groups.google.com/groups?sel...9%40adm.brl.mil

Search, in comp.unix.* groups, related to file renaming
-------------------------------------------------------
http://groups.google.com/groups?q=r...p%3Acomp.unix.*
http://groups.google.com/groups? q=...
%3Acomp.unix.*
http://groups.google.com/groups? q=....u
nix.*

rename (in Perl)
----------------
http://www.oclug.on.ca/pipermail/oc...rch/018696.html
http://perlmonks.org/index.pl?node_id=303814
http://perlmonks.org/index.pl?node_id=277174


My own PERL module (does not actually moves files, give new names
to /you/ to take care of moving)
--------------------------------------------------------------------
http://www103.pair.com/parv/comp/sr...me-Sanitize.pod

An example usage of above module:
http://www103.pair.com/parv/comp/src/perl/sanename
http://www103.pair.com/parv/comp/sr...til-1.10.tar.gz


- parv

--
As nice it is to receive personal mail, too much sweetness causes
tooth decay.  Unless you have burning desire to contact me, do not do
away w/ WhereElse in the address for private communication.






[ Post a follow-up to this message ]



    Re: rename files  
Stephane CHAZELAS


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-04-04 11:01 PM

2004-10-2, 13:53(-07), Gabriella:
> I would like to shorten file name from search?q=opq to opq. For one
> file, I did mv command and it works. The question now: how to shorten
> the name of many files at the same time.
> list of files:
> search?q=opq
> search?q=odf
> search?q=kjl
> etc
>
> output
> opq
> odf
> kjl

If your shell is zsh (4.0 or above):

autoload -U zmv

zmv 'search\?q=(*)' '$1'

--
Stephane





[ Post a follow-up to this message ]



    Re: rename files  
parv


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-06-04 01:47 AM

in message <slrnclue53.18d.parv_@localhost.holy.cow>,
wrote parv ...

> in message <17c19ad9.0410021253.1e520d6a@posting.google.com>,
> wrote Gabriella ...
> 
>
> One of these should be able to help you...

Another one, untested but interesting, i found about on Unix Review
site ...

http://www.student.lu.se/~nbi98oli/renameutils.html


- parv

--
As nice it is to receive personal mail, too much sweetness causes
tooth decay.  Unless you have burning desire to contact me, do not do
away w/ WhereElse in the address for private communication.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:18 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register