Originally Posted by jeyachandran1988
Actually I need to copy folder or files b/w two linux server. For example i need to copy 95 folders or files out of 100 in command line
Well, in schematic (overview), you have a choice of about two ways, and a number of sub-variants.
One of them is to set up some kind of regular expression that matches only
the files that you want to copy.
The other is to copy all
of the files, and delete the ones that you don't want.
The second of those two is often regarded as unsophisticated, but may well be massively easier to set up, in some particular circumstance, and in that context, people, me included, can find sophistication to be an overrated virtue. You must make your own determination on what you think about this, and how it applies to your particular situation.
Regarding the first method, it is almost entirely dependant on the patterns in the names whether this is easy to achieve, because you have to be able to write patterns which match one set of files and not the other set. As you have told us nothing about the 'patterns' (assuming some patterns exist) aspect, it is not something that we can do anything about. (Oh, and if you have made the mistake of allowing spaces and strange characters into the filenames, that will increase the degree of difficulty, a little.)
One minor variant that you might want to consider is to copy all of the files that you want to copy from one machine to another into a new sub-directory. This way, you can easily check that the correct files are queued up for processing. And, if you do employ the 'copy all, delete a few' method (method two), then doing the deletion on a dedicated sub-directory is a tactic that can make it less likely that you accidentally delete a wanted file. assuming that you always keep track of which directory you are in, of course...