Cut,CopyandPastefileswithBash
$xcvUsage:$xcv<x|c|v|l>[options]Description:xcvwrapsthecp,mvandlsbuiltincommands,howevercutting(x)andcopying(c)donotrequireatargetdirectory,whilepasting(v)andlisting(l)donotrequireasourcedirectory,becauseallselectedfilesareplacedinto,listedandpulledfrom:$HOME/.xcvOptions:xCutfiles,usingthemvcommandoptionscCopyfiles,usingthecpcommandoptionsvPastefilesintothecurrentworkingdirectorylListfilesavailableforpasting,usingthelscommandoptionsHomebrewInstallation$brewinstallxcvBpkgInstallationWithbpkgdo:
$bpkginstallbusterc/xcvNPMInstallation$npminstallxcv--globalNiftyAliasesaliasfsx="xcvx"aliasfsc="xcvc"aliasfsv="xcvv"aliasfsl="xcvl"WalkthroughExampleStartwithadirectoryoffiles$find../a.txt./b.txt./c./c/d.txtThen,copyallthefilesrecursively$xcvc-R.Then,listthecopiedfiles$xcvla.txtb.txtcThen,changedirectoriesandpasteinthecopiedfiles$cd~/elsewhere$xcvvThen,listthepastedfilesintheCWD,alongwithanypre-existingfiles$lsa.txtb.txtcx.txtThen,cutallthefilesintheCWD$xcvx*Then,noticeallthefileshavebeencutout$lsThen,changedirectoriesandpasteinthecutfiles$cd~/somewhere$xcvvThen,listthepastedfilesintheCWD,alongwithanypre-existingfiles$lsa.txtb.txtcx.txty.txtLicenseISCLicense(ISC)
Copyright©2015,BusterCollings
Permissiontouse,copy,modify,and/ordistributethissoftwareforanypurposewithorwithoutfeeisherebygranted,providedthattheabovecopyrightnoticeandthispermissionnoticeappearinallcopies.
THESOFTWAREISPROVIDED"ASIS"ANDTHEAUTHORDISCLAIMSALLWARRANTIESWITHREGARDTOTHISSOFTWAREINCLUDINGALLIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESS.INNOEVENTSHALLTHEAUTHORBELIABLEFORANYSPECIAL,DIRECT,INDIRECT,ORCONSEQUENTIALDAMAGESORANYDAMAGESWHATSOEVERRESULTINGFROMLOSSOFUSE,DATAORPROFITS,WHETHERINANACTIONOFCONTRACT,NEGLIGENCEOROTHERTORTIOUSACTION,ARISINGOUTOFORINCONNECTIONWITHTHEUSEORPERFORMANCEOFTHISSOFTWARE.
评论