maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   X Terminal Commands for Noobs (https://talk.maemo.org/showthread.php?t=63034)

RenaldoTT 2010-09-28 04:30

X Terminal Commands for Noobs
 
I got some help from Rob1n and AlMehdi when I encountered some issues with my N900 so due to their help I'm posting a list of useful commands for Noobs with explanations for each command. If I make a mistake anywhere please notify me nicely I'm only doing this to help others in need.


apt-get update = updates local metadata detailing what apps are available in the repsitories




apt-get upgrade -y = upgrades any installed apps with newer versions (the -y is optional and just avoids it prompting you as to whether or not to proceed)



apt-get clean = will remove any dowmloaded package archives. Once the package is installed the dowmloaded file is no longer needed. The App Man does this automatically but if you're using "apt-get" you'll have to do it manually



apt-get autoclean = same as "apt-get clean" but only removes package archives which are obsolete (no longer in repsitories). Having run "apt-get clean it's pointless to run this command.



apt-get autoremove = removes any packages which are no longer needed. These are applications/libraries which were automatically installed because of dependencies but are no longer required



apt-get -f install = installs any missing dependencies (which should fix the broken packages issue I had)



dpkg --configure -a = fixes broken packages



ls -laS / or ls -laS /home/user or ls -laS/home/user/opt = shows you your biggest folders/files in the different locations



rm -r = removes all files or folders in a specific location



rm = removes singular file/folder from a location e.g. "rm -r /home/opt/themes" deletes all folders in the "themes" folder



[tab] key in X Terminal autocompletes words e.g. "rm -r /home/opt/themes/sun[tab] will finish the word as "sunset". Double [tab] would give you all the files starting with "sun". "rm -r /home/opt/[tab][tab] shows you what's in that "themes" folder



dpkg -l = shows you a list of all your programmes including those not visible in App Man



dpkg -P = removes the programme and all its configuration files e.g. "dpkg -P zenbound" uninstalles zenbound



find / = search for a file or folder in the complete system



find /home/user = search for a file or folder in /home/user



| grep <name> = what you're looking for e.g."dpkg -l |grep zen" lists all files in the system starting with "zen"



dpkg -l | awk '{print $2}' grep zen = nicer view



find / |grep zen = find all files with the "zen" beginning


rm -rf /home/opt/rovio/angrybirds/data/levels/pack2 = removes "mypack" custom levels

mkdir /home/opt/rovio/angrybirds/data/levels/pack2 = makes folder called "pack2"

This is the post that lead to this > http://talk.maemo.org/showthread.php?t=62986

jukzh 2010-09-28 05:08

Re: X Terminal Commands for Noobs
 
I'm wondering anyone uses man(1)

ossipena 2010-09-28 05:11

Re: X Terminal Commands for Noobs
 
please, use
http://wiki.maemo.org/put_desired_page_name_here
for example:

http://wiki.maemo.org/xterm_for_beginners

and create page for that. only because within a week your post will vanish and be forgotten in the abyss of inactive threads @ tmo.

then just put this to the end:
Code:

[[Category:Beginners]]
if you do that, PM me (telling the address of page you created) and I'll see how that could be logically linked to existing noob pages in the wiki.

slender 2010-09-28 05:14

Re: X Terminal Commands for Noobs
 
http://talk.maemo.org/showpost.php?p=723565&postcount=3

jukzh 2010-09-28 05:53

Re: X Terminal Commands for Noobs
 
That thing isn't works in n900
Code:

find -name "*.py" -exec grep -l "python" {} \;
However fine with ubuntu's bb
Any suggestions?

lma 2010-09-28 06:18

Re: X Terminal Commands for Noobs
 
Quote:

Originally Posted by jukzh (Post 828080)
That thing isn't works in n900
Code:

find -name "*.py" -exec grep -l "python" {} \;

Yeah, the shipped busybox is configured with FEATURE_FIND_EXEC disabled for some reason. See this thread for alternative ways to do it, and feel free to vote for bug 4248 if you want -exec (and a few other bits) supported in future versions.

etuoyo 2010-09-28 06:22

Re: X Terminal Commands for Noobs
 
Thanks. I've been looking for something like this. Each time I want to reset tracker or kill hildon for example I have to do a search to find the right command. A comprehensive wiki will be great.

cjp 2010-09-28 06:22

Re: X Terminal Commands for Noobs
 
This thread is great for bookmarking. You never know when you need these. Thank you!

Rob1n 2010-09-28 08:20

Re: X Terminal Commands for Noobs
 
Quote:

Originally Posted by jukzh (Post 828065)
I'm wondering anyone uses man(1)

As none of the manual pages are installed on the N900, it really doesn't help.

AlMehdi 2010-09-28 09:03

Re: X Terminal Commands for Noobs
 
"grep" is used to find a string from an output of a command.. when you only write "find /" it will output all the files on the n900. Which is not that useful. But if you add grep to find so it becomes "find / | grep <name>". Then "find" will only output the words that equals the one in grep.
Code:

find <path to look in> | grep <word to look for>
If you know the file you are looking for is in "/home" and that it starts with "xou" you could write:
Code:

find /home/ | grep "xou"
It will then give an out put on all the files and directories with "xou" in it. In this case it would find all the cases of xournal in /home/.


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

vBulletin® Version 3.8.8