Re: Cancel mv after execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux