I'm using Solaris 10. I need to add to SVN everything I've placed in the sub directories of my SVN checkout. I have added files and directories and sub directories - is there a command to take care of everything at once?

If not, is there a command I can run to list all the items I have added that have not been added to SVN yet?


Assuming that your file names don't contain whitespace or \"':

svn status | sed -n 's/^? *//p' | xargs svn add

To cope with any file name that doesn't begin with a space or contain a newline:

' set -f; svn add $(svn status | sed -n 's/^? *//p') )
svn status | awk '{$1=""; print $0}' | xargs -i svn add "{}" 

This adds all files with spaces.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.