The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

removing whitespace from file and directory names

Discussion in 'General Discussion' started by kirkmiesle, Dec 19, 2007.

  1. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    Hello,

    I have a bunch of directory names that have a space at the end of them. I need to remove this space, but there are 100's of directories and would like to write a script or run something on the command line that will trim these names (it would be even better if I could do this recursively).

    I've searched all over for a solution, and can't seem to fine one - does anybody have a suggestion? Since it's only one space, trimming only the last character of the directory name would probably suffice.

    Thanks
    Kirk
     
Loading...

Share This Page