7 Replies Latest reply: Nov 22, 2012 3:52 AM by EdInDaClouds
EdInDaClouds Level 1 Level 1 (0 points)

Due to an issue with our Backup Software struggeling to cope with any file paths that are longer than 150 charecters in length (Awesome, I know!). I am looking for a way to list the full file paths for the files and folders stored on a particular disk so that I can work through and move any files that are longer than this to a seperate backup job.

 

I have searched for the answer and so far I can't find a sensible way to achieve this.

 

Any help would be greatfully recieved.


Xserve, Mac OS X (10.6.8)
  • LousyFool Level 4 Level 4 (2,640 points)

    Not sure if this is what you're looking for, but anyway:

     

    With a Finder window open, click at View in the menu bar, then Show Path Bar. Now you'll have that at the bottom of the Finder window, always showing you the complete path. If longer than the window width, it'll get cramped, but mouse-over will show you the details.

  • etresoft Level 7 Level 7 (26,420 points)

    Run Terminal.app and execute the following:

    sudo find /Volumes/backup

     

    Replace "backup" with whatever your backup drive is called. Use "sudo" because a user account may not be able to see all of the files on the backup.

     

    I strongly advise you to switch to a modern backup solution such as Time Machine.

  • EdInDaClouds Level 1 Level 1 (0 points)

    Thanks both for your replies.

    @LousyFool: This will help if I have to manually vist every folder. I was hoping to be able to list all of the files and folders and then attack them from there.

    @etresoft: Frustratingly this is an issue with Symantec's Backup Exec for Mac Agent. In an attempt to bring it into line with the rest of our corporate backup solution I am currently troublshooting the issues associated with it.

  • LousyFool Level 4 Level 4 (2,640 points)

    Hmmm. There seem to be even no decent 3rd-party programs to give you a complete tree view or list of folders, subfolders and files.

     

    Here's how to get to see at least the folder/subfolder structure:

     

    In Terminal, maneuvre first to the drive and directory you want to explore.

     

    Then copy and paste this line and hit return:

     

    ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'

     

    The result is at least the complete "tree" under that directory, but no files. You can copy and paste it into whatever other app that takes text.

  • Richard E. Cooke Level 2 Level 2 (220 points)

    Automator might be able to give you a report of what is too long.

     

    You could use Applescript or Python to quickly make a little program to find problem files and move them someplace else.

     

    I would use Python because then you could use it on ANY of your company machines to check for this problem before a backup is run.

     

    python.org for more info, or ask questions.

  • BobHarris Level 6 Level 6 (15,215 points)

    From an Applications -> Utilities -> Terminal session, enter

     

    cd /Starting/Directory
    find .  ! -type d | awk 'length() > 150 { print }'
    

     

    The "! -type d" will exclude any path which ends in a directory.  If you want to see those as well, remove the "! -type d"

     

    The 'awk' expression will print any path that is longer than 150 characters.  You can adjust the 150 comparison value depending on what works for you.

     

    PS.  You might either look into using a different backup utility, or if this is your companies product, have a long discussion with the developers about why it is substandard :-)

     

    Message was edited by: BobHarris

  • EdInDaClouds Level 1 Level 1 (0 points)

    This is exactly what I was after.

     

    Thanks.