Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   Cancel mv after execution (http://www.linux-archive.org/fedora-user/147843-cancel-mv-after-execution.html)

Adil Drissi 08-24-2008 03:57 AM

Cancel mv after execution
 
Hi,

Is it possible to cancel one command after execution?
my command was :
mv includes ../includes

i was in /var/www so if a directory includes already existed in /var it was replaced.

Thank you




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Russell Miller 08-24-2008 04:07 AM

Cancel mv after execution
 
Adil Drissi wrote:

Hi,

Is it possible to cancel one command after execution?
my command was :
mv includes ../includes

i was in /var/www so if a directory includes already existed in /var it was replaced.


Thank you



It wasn't replaced, it was put inside of it.

You now have a ../includes/includes directory.

Also, to cancel it, you press control and "C" - however, in the case of
commands such as mv and cp, you'll find the operation half done and will
usually have to clean up after it.


--Russell





--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Adil Drissi 08-24-2008 04:17 AM

Cancel mv after execution
 
no i have just n empty includes (my includes was empty).
ctrl+c interrupts a process but in this case it is already complete.


--- On Sun, 8/24/08, Russell Miller <duskglow@gmail.com> wrote:

> From: Russell Miller <duskglow@gmail.com>
> Subject: Re: Cancel mv after execution
> To: adil.drissi@yahoo.com, "For users of Fedora" <fedora-list@redhat.com>
> Date: Sunday, August 24, 2008, 4:07 AM
> Adil Drissi wrote:
> > Hi,
> >
> > Is it possible to cancel one command after execution?
> > my command was :
> > mv includes ../includes
> >
> > i was in /var/www so if a directory includes already
> existed in /var it was replaced.
> >
> > Thank you
> >
> >
> It wasn't replaced, it was put inside of it.
>
> You now have a ../includes/includes directory.
>
> Also, to cancel it, you press control and "C" -
> however, in the case of
> commands such as mv and cp, you'll find the operation
> half done and will
> usually have to clean up after it.
>
> --Russell
> >
> >
> >




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Russell Miller 08-24-2008 04:18 AM

Cancel mv after execution
 
Adil Drissi wrote:

no i have just n empty includes (my includes was empty).
ctrl+c interrupts a process but in this case it is already complete.


Then you did something different, as mv does not replace a directory by
default.


--Russell

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Adil Drissi 08-24-2008 04:20 AM

Cancel mv after execution
 
Ok maybe i didn't explain well.

I want to have the same file system that i had before executing my command.

If you have fedora8 can you check please if you have some directory of the name "includes" in /var?

Thanks


--- On Sun, 8/24/08, Craig White <craigwhite@azapple.com> wrote:

> From: Craig White <craigwhite@azapple.com>
> Subject: Re: Cancel mv after execution
> To: "For users of Fedora" <fedora-list@redhat.com>
> Date: Sunday, August 24, 2008, 11:13 AM
> On Sat, 2008-08-23 at 21:07 -0700, Russell Miller wrote:
> > Adil Drissi wrote:
> > > Hi,
> > >
> > > Is it possible to cancel one command after
> execution?
> > > my command was :
> > > mv includes ../includes
> > >
> > > i was in /var/www so if a directory includes
> already existed in /var it was replaced.
> > >
> > > Thank you
> > >
> > >
> > It wasn't replaced, it was put inside of it.
> >
> > You now have a ../includes/includes directory.
> >
> > Also, to cancel it, you press control and
> "C" - however, in the case of
> > commands such as mv and cp, you'll find the
> operation half done and will
> > usually have to clean up after it.
> ----
> yeah - it's generally easier to let it complete and
> then 'mv' it back
> than to stop it part way.
>
> Craig
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Adil Drissi 08-24-2008 04:22 AM

Cancel mv after execution
 
Sorry

here is what i made:

mv includes ../


--- On Sun, 8/24/08, Adil Drissi <adil.drissi@yahoo.com> wrote:

> From: Adil Drissi <adil.drissi@yahoo.com>
> Subject: Cancel mv after execution
> To: fedora-list@redhat.com
> Date: Sunday, August 24, 2008, 3:57 AM
> Hi,
>
> Is it possible to cancel one command after execution?
> my command was :
> mv includes ../includes
>
> i was in /var/www so if a directory includes already
> existed in /var it was replaced.
>
> Thank you
>
>
>
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Craig White 08-24-2008 11:13 AM

Cancel mv after execution
 
On Sat, 2008-08-23 at 21:07 -0700, Russell Miller wrote:
> Adil Drissi wrote:
> > Hi,
> >
> > Is it possible to cancel one command after execution?
> > my command was :
> > mv includes ../includes
> >
> > i was in /var/www so if a directory includes already existed in /var it was replaced.
> >
> > Thank you
> >
> >
> It wasn't replaced, it was put inside of it.
>
> You now have a ../includes/includes directory.
>
> Also, to cancel it, you press control and "C" - however, in the case of
> commands such as mv and cp, you'll find the operation half done and will
> usually have to clean up after it.
----
yeah - it's generally easier to let it complete and then 'mv' it back
than to stop it part way.

Craig

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Mike Chambers 08-24-2008 12:09 PM

Cancel mv after execution
 
On Sat, 2008-08-23 at 21:22 -0700, Adil Drissi wrote:
> Sorry
>
> here is what i made:
>
> mv includes ../

Then you could do..

mv ../includes .

--
Mike Chambers
Fedora Project - Ambassador, Bug Zapper, Tester, User, etc..
mikec302@fedoraproject.org

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Chris Tyler 08-24-2008 01:07 PM

Cancel mv after execution
 
On Sat, 23 Aug 2008 21:07:03 -0700, Russell Miller wrote:
>
> Adil Drissi wrote:
> > Hi,
> >
> > Is it possible to cancel one command after execution?
> > my command was :
> > mv includes ../includes
> >
> > i was in /var/www so if a directory includes already existed in /var
> it was replaced.
> >
> > Thank you
> >
> >
> It wasn't replaced, it was put inside of it.
>
> You now have a ../includes/includes directory.
>
> Also, to cancel it, you press control and "C" - however, in the case of
> commands such as mv and cp, you'll find the operation half done and will
> usually have to clean up after it.

In addition to Russell's suggestion of using Ctrl-C to stop the
operation, you may want to consider using the -i and -v options with mv
(and cp and rm) so that you can see exactly which paths the commands are
operating on and so that you will be prompted for confirmation before
any destructive operations are performed.

If you want to consistently use those options but not type them every
time, you can add them to an alias:

alias mv="mv -iv"

This will take effect for the duration of the current shell. To make the
alias persistent, place the line above in ~/.bashrc

-Chris

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


All times are GMT. The time now is 10:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.