Originally posted by mudskipper
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Man accidentally 'deletes his entire company' with one line of bad code"
Collapse
-
-
Originally posted by Contreras View PostYep. now marked as a hoax.
Hilarious.
Leave a comment:
-
Originally posted by NickFitz View PostSome have seen this as evidence that he's just trolling; but we've all done something like that (though hopefully less catastrophically), so maybe not
Reminds me of the first week of my first 'real' job as apprentice. Inquisitive me, knowing a bit about computers, was left to have a play with the office PC. Later that day their IT help desk fell about laughing as I explained how it had stopped working after running something called "FDISK".
Couple of tricks that would have saved the day though:
Code:~$ cat doh #! /bin/bash set -u rm "${foo}/${bar}" ~$ ./doh ./doh: line 3: foo: unbound variable ~$ cat duh #! /bin/bash rm "${foo:?}/${bar:?}" ~$ ./duh ./duh: line 2: foo: parameter null or not set
Leave a comment:
-
Originally posted by Mordac View PostI'd be tempted to offer to help, there's almost nothing that can't be recovered from a working hard disk, even after it has been deleted. Just a question of how much to charge...
Leave a comment:
-
I'd be tempted to offer to help, there's almost nothing that can't be recovered from a working hard disk, even after it has been deleted. Just a question of how much to charge...
Leave a comment:
-
Originally posted by darmstadt View PostMy colleague did that a couple of weeks ago, in the root directory logged in as root he did rm -Rf *...Everything gone, the whole system. Also attached was a NAS system and another storage system with about 120TB of data on it but we have it set up so that you can't delete anything off of it in this manner. Ha, did we take the mickey...
I wonder if the system was an EFI one because deleting /sys/firmware/efivars will brick it https://github.com/systemd/systemd/issues/2402
I hate / being full of crap like dot directories and shell histories...
So nowadays if logged on as root not changing directory rm -rf will only delete roots files, not the root filesystem.
Leave a comment:
-
"The problem command was "rm -rf": a basic piece of code that will delete everything it is told to. The “rm” tells the computer to remove; the r deletes everything within a given directory; and the f stands for “force”, telling the computer to ignore the usual warnings that come when deleting files."
Years since I've done unix but even I remember that r is recursive. You don't need r to delete everything in the given directory. Shoddy reporting.
I managed to type * once in the directory where all the cron jobs were stored. Ctrl/C didn't kill it. Lots of cleanup required...
Leave a comment:
-
My colleague did that a couple of weeks ago, in the root directory logged in as root he did rm -Rf *...Everything gone, the whole system. Also attached was a NAS system and another storage system with about 120TB of data on it but we have it set up so that you can't delete anything off of it in this manner. Ha, did we take the mickey...
I wonder if the system was an EFI one because deleting /sys/firmware/efivars will brick it https://github.com/systemd/systemd/issues/2402
Leave a comment:
-
Originally posted by stek View PostI got my tar command the wrong way round once
Leave a comment:
-
Originally posted by bobspud View PostWe are all standing here looking smug but over the years I have seen dozens of scripts that use rm -rf ${WORKDIR} as a way to clean up temp directories. I have even seen examples that allow the sodding working directories to be passed in as an argument on the command line The fact that the poor idiot didn't think it was a good idea to have his backup directories unmounted when not in use just compounds the misery.
There are only two types of people in this world those that have lost data and the rest of us....
I never do the same wrong thing twice.....
Leave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- How to answer at interview, ‘What’s your greatest weakness?’ Nov 14 09:59
- Business Asset Disposal Relief changes in April 2025: Q&A Nov 13 09:37
- How debt transfer rules will hit umbrella companies in 2026 Nov 12 09:28
- IT contractor demand floundering despite Autumn Budget 2024 Nov 11 09:30
- An IR35 bill of £19m for National Resources Wales may be just the tip of its iceberg Nov 7 09:20
- Micro-entity accounts: Overview, and how to file with HMRC Nov 6 09:27
- Will HMRC’s 9% interest rate bully you into submission? Nov 5 09:10
- Business Account with ANNA Money Nov 1 15:51
- Autumn Budget 2024: Reeves raids contractor take-home pay Oct 31 14:11
- How Autumn Budget 2024 affects homes, property and mortgages Oct 31 09:23
Leave a comment: