![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Why did I just run this command (as root): # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl instead of this one: # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl ? I promise you, there is a good reason. :-) -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Now Playing ~ ./ryan_adams/demolition/13_jesus_dont_touch_my_baby.ogg |
|
| | #2 (permalink) |
| Civilians | In article <bv4tv2-6rs.ln1@ophelia.g5n.co.uk>, usenet200509 @tobyinkster.co.uk says... > Why did I just run this command (as root): > > # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl > > instead of this one: > > # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl > > ? > > I promise you, there is a good reason. :-) > > you haven't sobered up from last night yet? |
|
| | #3 (permalink) |
| Civilians | On Sat, 17 Sep 2005 10:41:31 +0100, Toby Inkster <usenet200509@tobyinkster.co.uk> wrote: ¶Why did I just run this command (as root): ¶ ¶ # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl ¶ ¶instead of this one: ¶ ¶ # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl ¶ ¶? ¶ ¶I promise you, there is a good reason. :-) ¶ ¶-- Er, because the pubs are shut? because there's nothing on TV? Because you like posting messages to the wrong Usenet group? Am I warm? Matt -- Outbound links to related sites and articles improve your site's search engine ranking. Find relevant articles to link to at http://www.probertencyclopaedia.com |
|
| | #4 (permalink) |
| Civilians | On Sat, 17 Sep 2005 10 12 GMT, DoobieDo <dave@bytext.co.uk> wrote:¶In article <bv4tv2-6rs.ln1@ophelia.g5n.co.uk>, usenet200509 ¶@tobyinkster.co.uk says... ¶> Why did I just run this command (as root): ¶> ¶> # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl ¶> ¶> instead of this one: ¶> ¶> # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl ¶> ¶> ? ¶> ¶> I promise you, there is a good reason. :-) ¶> ¶> ¶you haven't sobered up from last night yet? LOL! I hadn't thought of that one! Matt -- Outbound links to related sites and articles improve your site's search engine ranking. Find relevant articles to link to at http://www.probertencyclopaedia.com |
|
| | #5 (permalink) |
| Civilians | __/ [Toby Inkster] on Saturday 17 September 2005 10:41 \__ > Why did I just run this command (as root): > > # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl > > instead of this one: > > # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl > > ? > > I promise you, there is a good reason. :-) Because it looks more original? Now truly, it seems like it would achieve the same, although at an underlying level the machine will handle it differently (not sure to what extent either). I am trying to think along the lines of overwrite, recursive copying or even that past story of yours about executive rm -rf ..* as root. Roy -- Roy S. Schestowitz | "Lions are like hippie tigers" http://Schestowitz.com | SuSE Linux | PGP-Key: 74572E8E 2:10pm up 23 days 2:24, 2 users, load average: 2.52, 1.17, 0.78 |
|
| | #6 (permalink) |
| Civilians | Roy Schestowitz wrote: > __/ [Toby Inkster] on Saturday 17 September 2005 10:41 \__ > > >>Why did I just run this command (as root): >> >># cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl >> >>instead of this one: >> >># cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl >> >>? >> >>I promise you, there is a good reason. :-) > > > Because it looks more original? > > Now truly, it seems like it would achieve the same, No it wouldn't. The first commandline pipes the output of cp to jukebox.pl and there *is* no output from the cp command - so it would create an empty file. The second commandline actually copies the file. -- Steve Sobol, Professional Geek 888-480-4638 PGP: 0xE3AE35ED Company website: http://JustThe.net/ Personal blog, resume, portfolio: http://SteveSobol.com/ E: sjsobol@JustThe.net Snail: 22674 Motnocab Road, Apple Valley, CA 92307 |
|
| | #7 (permalink) |
| Civilians | In: <bv4tv2-6rs.ln1@ophelia.g5n.co.uk>, Toby Inkster <usenet200509@tobyinkster.co.uk> wrote: >Why did I just run this command (as root): > > # cat ~tai/jukebox-2.19b.pl >/usr/bin/jukebox.pl > >instead of this one: > > # cp ~tai/jukebox-2.19b.pl /usr/bin/jukebox.pl > >? > >I promise you, there is a good reason. :-) Oh goody! a unix question! :-) I can think of a few, generally having to do with timestamps and/or the file descriptors. Thats supposedly how one might trim a log: $ cat /dev/null >log Or: $ >log If another process had 'jukebox.pl' open, and you copied the file, the opened process might use a different file descriptor pointing to a file that no longer exists. Or: You don't have permission to write to /usr/bin but you do have write permission to /usr/bin/jukebox.pl ? The '#' would indicate you have root permission, but some filesystems have extended attributes and/or network filesystems where even root doesn't have such access. Or: Is jukebox.pl a symlink? Or: You want to clobber the data in the original file so it can't be recovered as easily? Or: jukebox.pl is a named pipe used to talk to a daemon process. Those are the reasons off the top of my head, there are probably other reasons, probably relating to the directory entry or an open file handle. Now, here's my question to you, if it's not a named pipe, why transfer data from tia's home directory to /usr/bin? instead of /usr/local/bin ? Is 'jukebox.pl' a package from the operating system vendor? If it is a named pipe, why have it in /usr/bin ? Jamie -- http://www.geniegate.com Custom web programming guhzo_42@lnubb.pbz (rot13) User Management Solutions |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix - Humor | Hannibal | Humor | 1 | 04-24-2006 22:12 |
| Unix Hosting Recommendations? | O.B. | Web Design | 3 | 07-17-2005 20:00 |
| Convert UNIX time to normal | cwalker123 | Microsoft Applications | 1 | 11-03-2004 20:00 |
| framemaker Unix | krishna | Microsoft Applications | 2 | 06-15-2004 20:03 |
![]() | ![]() | ![]() |