68k Macintosh Liberation Army Forums
68k Macintosh Liberation Army Forums
Home | Members | Search | FAQ
 All Forums
 Lounge
 Sometimes Unix Sucks.
Author Topic  
redrouteone
Junior Member


USA
226 Posts
Posted - 15 Dec 2003 :  01:18:17
I had just spent about 45 min working on the web page for the 68k MLA radio. I go to upload it to my my web site. So I open a terminal window to use the command line ftp. I want to rename the file first. So I type "rm Radio Free Macintosh.html default.html".

I get the error "rm: default.htm: No such file or directory" I think for a couple of second why I would get an file not found error. Then it hits me. Crap I typed rm not mv. Of course I don't have a backup like I should have. So now I get to do it over again.

For the non-Unix savvy rm means delete mv means move.

--Eric
___________________________
I'm like the Pepsi employee that drinks Coke. I work on PCs at work but use a Mac at home

Derekcat
Junior Member


USA
342 Posts
Posted - 15 Dec 2003 :  01:32:03
ouch… got to be carefull with those little acronyms…

I've been doing a lot of work on my UFOM forum's files from MacSSH… kinda gets confusing just learning all the little commands and -l letters

If I open my window all the bugs will get in…That's just one more reason to use a Mac!
Mac Portable
LC ||
SE/30
||si
||ci
Quadras: 660av, 950
PMs: 6100/G3/233, 6214CD, 5400/120, 7100/80av, 9500/G3/300
PB 5300ce
SuperMac C600 180, 240Go to Top of Page

Alien
Junior Member


Netherlands
269 Posts
Posted - 15 Dec 2003 :  04:47:22
Is this on your local system? DataRescue can recover files that were rm'ed. It's almost as good as actually backing up your stuff from time to time.

,xtG
.tsooJ

--
who | grep -i blonde | date
cd ~; unzip; touch; strip; finger
mount; gasp; yes; uptime; umount
sleepGo to Top of Page

Da Penguin
Senior Member


USA
1094 Posts
Posted - 15 Dec 2003 :  05:20:41
Yes, the 'lack' of 'helpful' features can be annoying from time to time. I do everything on my linux server with either ssh or webmin, and if anything ever goes wrong, its because of err'd commands in ssh.

Lesson: Always keep a bejillion backups scattered all over the place

be • jill • ion - A very large number, to the upwards past human comprehension

~The Penguin

**| Want free 68kmla email? Drop me a line |**
| Captain, Intelligence Operations / Space Cowboy |
| "The choice has been made, but now you must understand it" |Go to Top of Page

G4from128k
Full Member


USA
873 Posts
Posted - 15 Dec 2003 :  05:59:51
quote:

Then it hits me. Crap I typed rm not mv. Of course I don't have a backup like I should have. So now I get to do it over again.


This is my biggest gripe against CLIs (Command Line Interfaces) -- they assume you can type well and never make mistakes. Many a time I have goobered a typed-in command, hit the return key, noticed my mispelling of the command, and then prayed that whatever mangled characters I entered don't mean something dangerous. Perhaps if Unix supported "undo" for all shell commands, then it would not be so bad, but it doesn't.

G4From128k

by Day: Mild-Mannered Engineer and Trapeze(tm) Artist
by Night: Colonel of Truth, Justice, and the Macintosh Way
Reserve Officer in 68kMLA Cantankerous Coot Contingent
Go to Top of Page

redrouteone
Junior Member


USA
226 Posts
Posted - 15 Dec 2003 :  12:28:46
Most modern Unix system link rm to rm -i which prompts before each file is deleted. I usually turn it off as it is annoying when you are deleting a lot of files. What would be best is if the deleted files when in to the trash can. I should look into that as it would not be that hard to write a script to move the file to a another folder.

--Eric
___________________________
I'm like the Pepsi employee that drinks Coke. I work on PCs at work but use a Mac at homeGo to Top of Page

Alien
Junior Member


Netherlands
269 Posts
Posted - 15 Dec 2003 :  14:25:02
quote:
Most modern Unix system link rm to rm -i which prompts before each file is deleted.

UNIXen don't do that. Admins do. Bad admins. Such practices get lusers used to such failsafes, and make them careless in their use of (potentially) dangerous commands. It is better to let them suffer disaster, it's a real quick way to learn to be careful.

,xtG
.tsooJ

--
who | grep -i blonde | date
cd ~; unzip; touch; strip; finger
mount; gasp; yes; uptime; umount
sleepGo to Top of Page

scchicago
Full Member


USA
936 Posts
Posted - 15 Dec 2003 :  14:56:51
first off, WOAH, we have a radio station now? second off, if you use KDE to do your file managing the files can ether be moved to a trash can or be removed directly, depending on what you click in the KDE file explorer.

_________________
Leutennant SCCHICAGO
Go to Top of Page

The Lightning Stalker
Full Member


USA
747 Posts
Posted - 15 Dec 2003 :  16:00:47
Yeah. You could also rename rm to foobar and then write a shell script called rm that instead moves all the files to the trash.

The Lightning Stalker

Performa 631CD, 7.5.5
LC III Mail Server
Q610
Q650

6400/180 40/1.6G/512k L2/enet/video-in/TV
7600/120 '604/233, 80/1.2G & 4G, 9.2.2
Beige G3/266 ATX Tower

Lady Smith Apples:
Apple IIc 5.25"
2 Apple IIeGo to Top of Page

redrouteone
Junior Member


USA
226 Posts
Posted - 15 Dec 2003 :  16:07:51
This was on my OS X system that I did that. Mostly it was just a 2:30 in the morning mistake. Alien I know that alot of Linux systems do it out of the box. Also the Unix systems at school do also. Now that I think about it, it makes sense that they would would have set something up like that.

This is only the second time that I have deleted files by mistake. I have been messing with Unix system off and on for nearly 10 years so that is not too bad. Though the first time was really bad. I typed rm * -r. When it took a little longer than expected I realized that I was in root.

scchicago see the Radio Free Macintosh Test 1 and 68k MLA radio threads.

--Eric
___________________________
I'm like the Pepsi employee that drinks Coke. I work on PCs at work but use a Mac at homeGo to Top of Page

Alien
Junior Member


Netherlands
269 Posts
Posted - 15 Dec 2003 :  16:30:03
quote:
Alien I know that alot of Linux systems do it out of the box.

Well, Linux != UNIX, and I think it's common knowledge what my opinion on Linux is.

quote:
Also the Unix systems at school do also. Now that I think about it, it makes sense that they would would have set something up like that.

Bad admins, BAD admins, BAD ADMINS!!.

consider the following.

A circular saw is a dangerous piece of equipment, though very handy. One should not operate it without knowing fully what one is doing. If some woodworking instructors would apply extra safeties to their saws that are not standard issue, apprentices would learn to rely on these safeties instead of learning to just operate the equipment in a safe manner. When they someday operate a device that hasn't been modified, they will, out of habit, rely on certain safeguards that are not there. Bye bye, fingers!

The short of it: rm is dangerous. Handle with care.

,xtG
.tsooJ

--
who | grep -i blonde | date
cd ~; unzip; touch; strip; finger
mount; gasp; yes; uptime; umount
sleepGo to Top of Page

Unknown_K
Full Member


USA
602 Posts
Posted - 15 Dec 2003 :  17:26:01
So basically dont operate a circular saw at 2:30 in the morning?

A typo is much easier to do then deleting a file permanently using the graphical user interface.


Go to Top of Page

The Lightning Stalker
Full Member


USA
747 Posts
Posted - 15 Dec 2003 :  19:13:08
quote:
So basically dont operate a circular saw at 2:30 in the morning?

Or run the tesla coil.Go to Top of Page
   

68k Macintosh Liberation Army Forums

© 2001-2003 68kMLA

Go To Top Of Page

68k of the Week: kastegir's PowerBook 180.