File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

top 20 linux commands

 
paul wheaton
Trailboss
Pie
Posts: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never been a power linux user, just bopping along and getting by. Once in a while my ignorance shows ...

Is there a web page out there that would list the top 20 or maybe top 50 linux commands for the bash shell? Or maybe the top things one might want to do? Maybe I could print that out and have it handy.

I have ls and ll down. I do cd and mkdir without a problem. I even use cp and mv a lot.

I forgot about "ps" today. I tried "echo $CLASSPATH" today and it came up blank, so I must have done it wrong. I could use a refresher on aliases cuz everybody here uses "ct" for the clearcase tools, but "which ct" didn't work. "whereis ct" did nothing also. So I'm suspecting an alias. I don't really need to know what ct really is, but I feel like it helps to have a somewhat better understanding.

I've used linux, solaris, aix, etc. many times over the years (remember sco and interactive unix?) but never really mastered any shell.

It just seems like there could be a one page thing that could answer 95% of my questions.

Any suggestions?
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.mediacollege.com/linux/command/shell-command.html
http://infodamina.net/linux/linux-command.html
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a web page, but I really like Linux Desk Reference. Particularly useful is the way they group commands by function - if the first command you look up doesn't do what you want, chances are good there's something one or two pages away which does.

Incidentally for your problem with a possible alias, you can just type "alias" with no args, and you should get a list of all aliases which have been set so far.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At work ct is an alias for cleartool, a shell like thing for clearcase (Rational ClearCase). Is that what they are using? Are you hearing words like vobs, views, branches, merges, checkin and checkout?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cleartool summary


cleartool can be found in a directory path containing the word "atria".
So try "find / -name atrea" or "find / -name cleartool"

or even just "alias"
[ October 20, 2005: Message edited by: Barry Gaunt ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Table L-2 in this appendix to the Advanced Bash Scripting Guide has proved handy when bringing new people onto my projects. Actually the whole guide is very handy -- it shows you how to do an awful lot of useful stuff.

"which" should tell you that a command is an alias for something and tell you what for.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
30 useful Unix commands
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Wheaton:
I tried "echo $CLASSPATH" today and it came up blank, so I must have done it wrong.

Any suggestions?


I'm running linux 12 h / day, mostly for programming Java, and don't have any classpath set.
I was surprised to see that it is needed to specify the current working directory on windows, but it's not needed on Linux.
 
paul wheaton
Trailboss
Pie
Posts: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! Five responses within the first 30 minutes! I love this site!

About three minutes after posting my question, a guy comes in and says "do a find on ...." so I had to have him tell me exactly what to type ...

Marilyn, good quickie lists! Thanks!

Jim, thanks for the alias tip - that worked great!

Barry, you are spot on about clearcase. Using Jim's trick, ct appears to not be an alias. I've made a list of the main ct things I need to do, so so far I think I'm okay there.

Ernest, ooooooo - that's a good one. I remember DOS stuff for some reason. I tried the "which ct" and got ascii puke with "grep" in there somewhere. An alias that doesn't show up when I type "alias"?

Barry, I like this list. I think I'm gonna copy six or seven that I have a hard time remembering and pin it up.

Thanks everybody!
 
paul wheaton
Trailboss
Pie
Posts: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What might be three or four good uses of grep in bash?
 
paul wheaton
Trailboss
Pie
Posts: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a good one ... how to list all running java processes. I know it's a mix of "ps" and "grep" with a pipe ....
 
paul wheaton
Trailboss
Pie
Posts: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's the dif between "man" and "help"?

I remember that in older versions of linux that the man pages were unreliable.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Paul]: Here's a good one ... how to list all running java processes. I know it's a mix of "ps" and "grep" with a pipe ....

ps -al | grep java

You might want to man ps to verify the ps options; at the moment I have access to cygwin and OS-X, not linux.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Paul]: Marilyn, good quickie lists! Thanks!

I'm sorry - did you just thank Marilyn for a quickie?
 
Peter Rooke
Ranch Hand
Posts: 825
Java Linux Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like the apropos command. Gives you information on various related commands, by searching the whatis database. Sometimes you just can't recall the correct command (with its lack of vowels!). For example try:
. Of course "apropos", is not that easy to remember ;-)

I also like the way that using bash (or sh), you can hit the tab key and the shell will try to auto complete a command or its argument.

---------------------
"Unix is the answer, but only if you phrase the question very carefully. Unix is user-friendly. It's just very selective about who its friends are. Unix: It's not just 'User-Unfriendly', it's 'Proactively User-Hostile' ! "
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


phone Virginie


find errors in logfiles


find the class for a java-method:

[ October 22, 2005: Message edited by: Stefan Wagner ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Wheaton:

I tried "echo $CLASSPATH" today and it came up blank, so I must have done it wrong.
...
...
What might be three or four good uses of grep in bash?


env | grep PATH
will show you any environment variables with "PATH" in the name.

alias cl='clear;ls'
Clear screen then list files..
[ October 22, 2005: Message edited by: Ben Souther ]
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rm -rf directory

removes a directory and its contents. always useful.
 
Mahesh Rana
Ranch Hand
Posts: 139
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Find any file using

locate file_name

locate is a database driven utility (Included in Redhat distributions).
[ November 04, 2005: Message edited by: Deep Narsay ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic