Jump to content

For DOlson's Totorial


MoonChild
 Share

Recommended Posts

df - a nice command to show you what on earth is going on with your partitions (free space, names, etc).

 

ps - show running processes (usefull to kill something)

 

kill XXXX - kill process with XXXX pid (Process Identification Number)

 

help - will show you built-in commands of your shell

 

which command - will return you the location of the command you specified

 

find something - will find something in current dir or where you specify it to

 

And one of my favourite commands ever...

 

fortune - gives a random quote, usually a funny one to start your day :)

 

Also, you can try the /usr/games directory... For maybe a game of trophy?

Link to comment
Share on other sites

substitutes for find...

 

sometimes find doesn't always work, i.e. it doesn't return anything so I have found using.

whereis, and locate will sometimes work instead. also for ps do ps -aux that helps list the processes in a better way. like for instance ps -aux does this

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

 

shows all those things instead of ps doing this:

 

PID TTY TIME CMD

Link to comment
Share on other sites

That tutorial is just meant to help those who are familliar with DOS. Just for basic file management and moving around between directories and so forth.

 

Oh, and my name is NOT doison...

Link to comment
Share on other sites

D. Olson, we weren't trying to insult you.

 

But I liked it in DOS that we had a command called chkdsk that worked like df.

 

In win2k, the task manager did what ps does (or Ctrl+Esc on KDE)

 

kill well... ps is useless without it :)

 

help is quite obvious, as in DOS I believe

 

which is way cool :)

 

fortune is in for the treat :)

Link to comment
Share on other sites

D. Olson, we weren't trying to insult you.

 

But I liked it in DOS that we had a command called chkdsk that worked like df.

 

In win2k, the task manager did what ps does (or Ctrl+Esc on KDE)

 

kill well... ps is useless without it :)

 

help is quite obvious, as in DOS I believe

 

which is way cool :)

 

fortune is in for the treat :)

 

I'll see.

 

By the way, who needs kill when you have killall?

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
Guest davebsr

also, dry du. It runs through all of the files in the directory you're in, and below (by default) and outputs the number of kilobytes (by default) used. du = disk used. It can be greatly customized.

I also like killall, as dolson said - it's ten times better than kill.

ps -aux has a little more info than just ps -ax... also, try the top command...these are all fun to play with.

Link to comment
Share on other sites

  • 2 weeks later...

grep

to be used with the pipe |

if you want to see if a certain string is in a file:

cat filename | grep <string>

(and cascading to find how many occurances: cat file | grep string | wc

etcetc)

 

chmod, is often necessary when you get/download shell scripts,

chmod +x file

or

chmod 755 file

so at least they can be executed.

 

less instead/as alternative of cat, because it allows you to search ( just type a slash followed by a string, and it will find that: /<searchstring>

and because it lets you search up.

 

Can be used easily with a pipe:

ls -lrt | less

 

Oh. for du: if you do it in your home-dir, it's awfully long: so you can do

du -s .

 

And that

.

stands for the dir you're in, and

.. is one dir up.

 

BTW, ls -a to show hidden files.

 

One more thing, which I think is important: the bash <tab> completion has to be explained

dir my documents (don't even know how you use spaces in dos)

cd my<tab> ---> cd my documents

And that is not a directory separator, but an escape character (not to be confused with a person on the run)

And of course that tab completion also works for programs (as long as they are in your path)

 

BTW you really need the . for "the dir I'm in" if you cannot execute commands if they're in the same dir (this is a security feature), so in /bin you'd have to do /bin/ls or ./ls to execute ls, well just an example)

It is whenever the command is not in your path, it won't execute in any other way.

 

rm -r is also rmdir (just like mkdir is to make dirs)

who to know who is logged on (well, on linux home pc's not so interesting, on unix systems can be fun to look around in the system)

whoami to be sure if you're logged in as root or yourself as a user.

 

Very nice one:

pwd (print working directory)

to let you know where you are.

 

mount

as in

mount mdkisos/Mandrake-cd2-ext.i586.iso -t iso9660 /mnt/cdrom -o loop

so you don't have to use the cd but can install directly from hd.

umount /mnt/cdrom

to unmount after that (note the omission of the 'm' in umount)

 

I know a lot of this is not related to how things are done in dos, but I guess dos just doesn't have the same functionality either (why whould you need a who command on dos? :) )

 

Oh and one of the most important ones:

man

to get the manpage. I know this doesn't help if you don't know the command, but for mount to find umount, man mount will give you related pages. So I consider the command man the first step to help people use linux/unix independently. Also, it helps people realise what UTFMP (use the friendly man page) stands for....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...