Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'recipe for disaster' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
recipe for disaster
Authored by: robh on Aug 20, '01 06:43:43PM

This tip is a recipe for disaster.

What happens the next time you do a system update and the installer puts vital new files in '/' and then does the automatic reboot ?. The startup script would then (re)move the new files and you could spend days trying to sort out the mess, especially if you forget the script is there.

A better tip would be... don't mess with the root dir (/). Don't put your own stuff there and NEVER remove anything from it.



[ Reply to This | # ]
recipe for alphabet soup
Authored by: colin on Aug 21, '01 05:45:36AM

Not so, the script in this state does not affect anything other than things in / , it is not recursive. Software updates etc would be placed in one of the folders that alredy exist e.g. 'System Folder' /var, /etc etc... this is just information that some people may have a use for. if you're not fully sure this script is for you then DON'T USE IT!!!

ls | grep -v -x --file=/filelist > ~/Documents/difference.txt
when used with the rest of this tip will place a text file of the differences found in your documents folder, is this better for you?



[ Reply to This | # ]
recipe for alphabet soup
Authored by: robh on Aug 21, '01 06:12:40AM

>Not so, the script in this state does not affect anything other than things in /

And you can guarantee that Apple will never need to add anything in '/' ?

Here's another scenario where things can go badly wrong..

Let's say that while trying to do the "ls / > filenames" something goes wrong, e.g. the disk fills.
The result will be a truncated list of files. When you then reboot you'll start removing essential files, maybe even the kernel itself.



[ Reply to This | # ]
recipe for smaller portions
Authored by: colin on Aug 21, '01 06:18:55AM

......."ls / > filenames" something goes wrong, e.g. the disk fills.".......
you really have that many files in root? wow. We are talking a tiny file here.. maybe with 'ls -R' it could be a possibility (please don't try puutting this in the example, it won't work), but not a plain 'ls'.



[ Reply to This | # ]
The REAL recipe for disaster...
Authored by: colin on Aug 21, '01 06:27:40AM

I just thought, if people are too dumb to make judgement on how to use a sample command (or not), as you seem to be suggesting, then maybe they are also unable to copy things from here correctly. In light of this please disregard this whole post as forgetting the '-v' switch on the grep will delete/move all the files that ARE listed in the /filelist file and this would be disastrous.



[ Reply to This | # ]