SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rename Multiple Files in subdirs...

    Can anyone help me with a command for Linux (CentOS):
    I have different directories, say:
    /01
    /02
    /03
    /04

    Each directory has files, different files and extensions.
    I want a command wich I can run from 1 directory higher, to check al these subdirs for files with extension .zip for example and add a prefix to these filenames (for example "cyberbomb_filename01.zip"). If the prefix "cyberbomb_" already exists, it should not be added...

    Does anyone have a 1-line solution for me ?

    Thank you very much !

    p.s. I hope this is in the right board, if not, please move me

  2. #2
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone ???

  3. #3
    SitePοint Troll disgracian's Avatar
    Join Date
    Aug 2006
    Location
    Samsara
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are you using? Perl, Bash, etc.?

    Also, what do you have so far?

    Cheers,
    D.

  4. #4
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just Bash in CentOS...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •