Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
So long as you would have had the same reaction on Windows (I’ll just move this Windows folder, ProgramData, ProgramFiles, inetpub, and all this other crap into a new folder...), then all is well :P
To be fair, Linux says, you are root, therefore you are expected to know what you’re doing. Whatever you say, boss!
Windows says, I don’t care who you are, you cannot do that. -
rabbi15176y@blockchaintacos yes, but windows doesn't have a * Wich means everything. Or a / which means the root of the system.
In windows the most you could do is move the entire c: drive, and it wouldn't let you no matter if you are Bill Gates himself. -
rabbi15176y@neofetch it was a pretty much empty machine except for our program for which I had a copy on the test environment.
And no data because the is the first installing.
But let's just say they don't think I am the professional they were expecting .. -
@rabbi actually it does have a star which means everything, only it’s *.*
And there are ways to wipe it if you can write C and understand the Windows API, but it’s not easy and likely to fail and crash haha
But points taken :P -
Scipio6926y
-
rabbi15176y@hash-table I barely know basic Linux commands.
How to mount is beyond my current knowledge, so when the system didn't recognize mv or ls commands, and since there is not much data there, I just reinstalled the system.
Please do explain how for the next time. -
ch0s3n1826yNot sure how it'd work after disconnecting but I'm pretty sure all commands would've just been moved to the /old/bin folder or /old/usr/bin or something. Meaning you should probably have been able to do something like /old/bin/mv /old/* /
The reason your commands aren't working should be because your PATH variable has directories listed that are relative to your root rather than to /old.
I'm no expert either but it think that's how it should work.
Edit: Assuming that's where the old folder was, which it probably wasnt. :P Otherwise just the same but with the full path to the "old" folder. -
rabbi15176y@ch0s3n I tried that but without the ls command working it was pretty hard to find anything so I gave up.
I wonder why cd still worked. Is it part of the kernel? -
ch0s3n1826y@rabbi yea I got on my raspberry to check out how that looked hehe. Got a bit curious about how to solve a problem like this and whether these commands would have dependencies that would require the path variable to be set correctly or if it would work with just running the commands with the full path. The fact that cd works sounds positive.
Also I imagine you could probably do something like export PATH=/path/to/old/bin:/path/to/old/usr/bin to restore some of the core commands in that shell session... Or at least I think so. :P -
Fabian10136yFor everyone saying that you simply cannot access some files on Windows: That's not true. You can access everything by first taking ownership, then giving yourself permissions, then deleting it, all pretty complicated and with a lot of confirmations. I've never tried removing absolutely everything, but I have a stream where I destroyed quite a lot in a Windows VM by deleting random things: https://youtu.be/xCah-bROWNw?t=2155
-
@ch0s3n don't be fooled about 'cd' working, as it is a command implemented in the Shell. There is no executable for it.
-
@Fabian yep! that is acl security model for you. Instead of root, group, user. You have true roles. Which is actually way more secure.
You can have extended security attributes through acl’s if you set linux up correctly or find a distro with it? Might even be compatible with Active Directory. Which is just an acl server.
But that is overkill. Glad you understand linux now, @rabbi! ~ -
epicurean76yHow many hours you need to solve the problem? I want to know how your colleague reacted about this
Related Rants
TLDR; I just screwed a production server and rendered it useless!!!
Long story:
I went to install a product that we built at the customer's site, and was given a Linux running server, to deploy our app.
I work in windows, and barely know the basic Linux commands.
So I look at the files in the home directory, and see that the are a lot of files, so I ask the customer if it is ok that I move all the files to a separate directory.
He agrees, and me thinking that I am smart, proceed to enter the following commands in the terminal:
mkdir old
mv /* old
Of course I got an error that I don't have permission so my next command was:
sudo mv /* old
And that was the end of that computer.
The amazing part of the story is that as soon as it happened, I understood so much about Linux.
The file structure, sudo, the power of the terminal, aliases and so much more...
rant
a missing period
learning from mistakes
screwed up