From owner-freebsd-questions Sat May 12 13:47:51 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp06.iafrica.com (smtp06.iafrica.com [196.2.51.5]) by hub.freebsd.org (Postfix) with ESMTP id 845B437B423 for ; Sat, 12 May 2001 13:47:47 -0700 (PDT) (envelope-from ffkrz@iafrica.com) Received: from iafrica.com ([196.30.180.30]) by smtp06.iafrica.com (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0GD8001G1PQ392@smtp06.iafrica.com> for questions@freeBSD.org; Sat, 12 May 2001 22:46:53 +0200 (SAT) Date: Sat, 12 May 2001 22:47:57 +0200 From: Francois Kritzinger Subject: Re: COPY, CUT, PASTE (FILES) To: Andrew Hesford Cc: freeBSD Mailing List Message-id: <3AFDA17D.377416FA@iafrica.com> MIME-version: 1.0 X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-RELEASE i386) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT X-Accept-Language: en References: <3AFCE758.63DE32E1@iafrica.com> <20010512141419.A2406@core.usrlib.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrew Hesford wrote: > On Sat, May 12, 2001 at 09:33:44AM +0200, Francois Kritzinger wrote: > > Is there a way to copy, cut and then paste files from the shell? > > E.g. "cut *.txt" and then "cd other_directory" and then "paste"... > > > > > > "Cut" and "Paste" are invalid metaphors for files. This is why no shell > makes use of them. Windows has, once again, screwed things up. Think > about it like this: > > You have two documents, S and D. Document S has a paragraph you > want to append to document D. To do this, you take a pair of > scissors, cut out the paragraph in S, and paste it at the end of > D. > > This is a reasonable action, and is why the "cut and paste" metaphor was > created: to move blocks of text from one document to another. Now think > about this: > > You have one document A which is stored in filing cabinet FS. > Next to FS you have another cabinet FD¸ which houses other > documents. For whatever reason, you desire that document A > reside in FD instead of FS. You do not grab the scissors, > but instead pull the entire document out of FS and place it in > FD. > > Scissors would do absolutely no good here. You don't cut and paste > documents, you shift them around. If you want to move stuff around in > similar fashion, do this: > > > mv /orignal-location/file . > > cp /new-location-1/file . > [...] > cp /new-location-n/file . > > This is the one-step "cut and paste" operation you want, which is better > than actual cut and paste, since that is a two-step operation. Remember > that all the ridiculous quirks of Windows were abandoned when you > started using FreeBSD. If you want them back, start using Windows again. > > -- > Andrew Hesford > ajh3@usrlib.org OK then, picture this: You are in ~/, and you see a file that you want to move someplace else, but you don't know where yet. LONG way: Browse directory structure untill destination is found type "mv whole_long_path_that _may_be_so_long_that_you_might_have_to_type_a_whole_lot/filename destination" SHORT and EASY and IMO BETTER way: type "cut filename" browse directory structure until destination is found type "paste filename" As you can easily see, the second way may save you quite a substantial amount of typing. And IMO that is a useful feature to have. Also you can call the cut command anything you like. How about "take" or "grab" ? But regardless all I really wanted to know was whether or not there was a command like that in Unix. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message