move files

Vladimir Kosovac vkosovac at gmail.com
Wed Dec 7 06:07:58 UTC 2005


Oh yes, please put something meningful in the subjet line next time

V

On 12/7/05, Vladimir Kosovac <vkosovac at gmail.com> wrote:
>
> mkdir newdir
> for i in `ls`;do echo $i;mv $i newdir;echo =====;done
>
> For this to work, you need to be in directory where all those files are
> and there can't be any others in the same dir (this would move them, too).
> echo will show you files that are moved successfuly and is only optional in
> this loop.
>
> If you do only ls, there's no need to cut output - without -l option
> you'll only get file names out.
>
> V
>
> On 12/7/05, shaunak saha < reach2shaunak at gmail.com> wrote:
> >
> > Hi,
> >
> > In my current directory i have edited almost 90 files yesterday.I want
> > to
> > send all these files to a separate directory.Do i have to write a shell
> > script for these or can I do by a single command using pipe.I have tried
> > it
> > using pipe. I have used ls -l then grep and then cut.By doing these I am
> > getting the name of the files.What to do next?
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subjectunsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
>
>



More information about the redhat-list mailing list