Reply
Thread Tools
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#11
Originally Posted by cardiff-blues View Post
Is it just a case of typing sudo gainroot into xterm to use it now?
yes.
but please be REALLY REALLY careful once you've gained root access in a shell. you can brick your device with a command less than 10 characters
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 739 | Thanked: 220 times | Joined on Dec 2009 @ Surrey, UK
#12
Could you give me an idea of what sort of command it likely to brick it...just so I know to avoid running anything like it.
__________________
There is a way that seems right to a man, but in the end it leads to death. Proverbs 14:12
 
Posts: 22 | Thanked: 24 times | Joined on Dec 2009 @ Finland
#13
Originally Posted by cardiff-blues View Post
Could you give me an idea of what sort of command it likely to brick it...just so I know to avoid running anything like it.
rm -rf should never be done at least, it removes everything there is from the directory you are and downwards.

Also forkbomb is kinda bad (though it doesn't brick your device, it can drain battery in no time and make the whole os lag a lot, it's something like this:
f(){ f|f& };f
 

The Following User Says Thank You to Exca For This Useful Post:
Posts: 739 | Thanked: 220 times | Joined on Dec 2009 @ Surrey, UK
#14
I won't do any damage if I incorrectly type a command or anything?
__________________
There is a way that seems right to a man, but in the end it leads to death. Proverbs 14:12
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#15
Given this gets asked a couple of times, it should be possible to put a zip online which contains a repo containing just a copy of rootsh. This could then be expanded, and then a file://-based repo added to Application Manager.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following User Says Thank You to Jaffa For This Useful Post:
Posts: 22 | Thanked: 24 times | Joined on Dec 2009 @ Finland
#16
Originally Posted by cardiff-blues View Post
I won't do any damage if I incorrectly type a command or anything?
Nope, unless you type it to be another command, if the command is not found then it simpy says -sh: <command>: not found

If you want to be sure command actually exists you can press tab once to autocomplete the command and if nothing happens then press tab second time to show all commands that start with the written command.
 
Posts: 28 | Thanked: 12 times | Joined on Jan 2010 @ germany
#17
Originally Posted by SubCore View Post
you could download the .deb file from here, but you won't be able to install it without root access. chicken and egg problem
But then.. how does the application manager can install anything?

sudo?
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#18
Originally Posted by patator View Post
But then.. how does the application manager can install anything?

sudo?
It runs as root, yes.

@cardiff-blues:

Yes, mistyping a command can be detrimental to the system depending on what command and how you mistype it..

Especially, as said earlier, if someone tells you to type for example:

rm -rf /home/user/MyDocs/something

To delete a file... and you accidentally add a simple space:

::::::::::::WARNING: Nobody copy/paste this command below.. it *will* work.. and it will eat your cat::::::::::::
rm -rf / home/user/MyDocs/something
::::::::::::WARNING:::::::::

Then you just mis-typed your way into deleting almost everything and preventing the N900 from booting. So, while most mistype's will result in a command not found as was said - some can be extremely dangerous. That's why using copy and paste is generally recommended to typing by hand.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!

Last edited by fatalsaint; 2010-01-20 at 19:04.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#19
Originally Posted by cardiff-blues View Post
I won't do any damage if I incorrectly type a command or anything?
that depends on how "dangerous" the command you want to run is. "rm -rf" is one of the more dangerous ones, and a little typo can be desatrous.

as an example, i'll tell you what happened to me two days ago:

i wanted to issue
Code:
rm -rf /somewhere/someplace/bin
to delete the bin folder under /somewhere/someplace, but a very innocent space in a very wrong spot resulted in me having to flash the device... i issued
Code:
rm -rf /somewhere/someplace /bin
instead.
this deleted the whole /somewhere/someplace folder, AND the "bin" folder in root, which contains several system commands.
the reason for this is that rm accepts a list of files to be deleted, and space is a delimiter for lists.

i usually use autocompletion (Exca mentioned it, when you press "tab" while entering a folder, the shell will autocomplete it's name when it's unique. if the string you have entered so far is not unique, a double-tap on "tab" gives a list of options), but this one time i didn't, and it really bit me in the a**


edit:
damn, i got interrupted while writing, and fatalsaint already wrote about dangerous spaces :P
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg

Last edited by SubCore; 2010-01-20 at 16:13.
 
Posts: 28 | Thanked: 12 times | Joined on Jan 2010 @ germany
#20
Another vicious one:

rm -rf .*
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:18.