LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2009, 04:32 AM   #1
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Rep: Reputation: 15
Interesting commands or programs for the CLI


Hey, I'm really like interesting commands for the command line so I thought I'd ask people who've used Linux a lot.

The only one I know is:
  • jp2a (JPG to ASCII), a small program which converts JPG images to ASCII. It's an amazingly fun program to use, and everybody think it's awesome to be able to view images in ASCII. If you want to view a photo which isn't JPG you can simply use the convert program and pipe it in.
Please post some cool commands you've witnessed over the years, and explain a little about them I know you've got some
 
Old 01-30-2009, 06:51 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
I like this one;
Code:
ps -eo pcpu,pid,user,args | sort -r -k1 | less
It will help to determine which process is eating the CPU/s.
 
Old 01-30-2009, 07:33 AM   #3
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 40
Nice. I like antiword, which allows you to read word documents on terminals, and does a pretty good job of it.
Also the tree shell script, which you can get here.
 
Old 01-30-2009, 08:13 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I have been learning sed recently. I did not know it's so versatile. My next one will be awk.

Last edited by sycamorex; 02-19-2009 at 01:51 PM. Reason: spelling mistake
 
Old 01-30-2009, 09:04 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The Imagemagick suite---capabilities seem almost unlimited.
 
Old 01-30-2009, 09:45 AM   #6
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Quote:
ps -eo pcpu,pid,user,args | sort -r -k1 | less

awesome! Just added that to my cli arsenal!


You can do a lot with the find command:

find files over x days old:
find /path -mtime +x


find pattern in a file
find /etc -name '*.*' -type f | xargs grep 'pattern'

delete files when argument too long error
find . -name '*' | xargs rm

Last edited by ncsuapex; 01-30-2009 at 09:45 AM. Reason: [
 
Old 01-30-2009, 11:28 AM   #7
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Original Poster
Rep: Reputation: 15
Yes! This is exactly the sort of thing I was looking for!
These commands are a goldmine, especially some like the search functions and "tree" function.

Keep 'em coming!

Edit: The one to determine how much memory a program is using is really helpful. Wouldn't using something like head instead of less be better though?

Last edited by baldurpet; 01-30-2009 at 11:59 AM.
 
Old 01-30-2009, 09:22 PM   #8
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by baldurpet View Post
Edit: The one to determine how much memory a program is using is really helpful. Wouldn't using something like head instead of less be better though?
I like less.Here's one more that will let you read tar.gz files without unpacking them;
Code:
tar --to-stdout -zxf file.tar.gz | less
 
Old 01-31-2009, 02:57 AM   #9
kap4lin
LQ Newbie
 
Registered: Jan 2009
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by alan_ri View Post
Code:
tar --to-stdout -zxf file.tar.gz | less
You can add this to your .bash_profile (or other shell rcs):
Code:
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
It can list through a many type of archives. Take a look at man lesspipe
 
Old 01-31-2009, 03:04 AM   #10
kap4lin
LQ Newbie
 
Registered: Jan 2009
Posts: 10

Rep: Reputation: 0
top/htop for network monitoring?

And not ntop. Something where I can see which process is using (maximum) the network (say eth0).
 
Old 01-31-2009, 04:00 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
ps -eo pcpu,pid,user,args | sort -r -k1 | less
Why not use top?
 
Old 02-19-2009, 01:10 PM   #12
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Quote:
watch

Is a command I've been using a lot lately. Its pretty useful to watch a file to see it get updated. For example. I've been test cloning a lot of drives over the last few weeks and I use
Quote:
watch cat /proc/mdstat
to watch the RAID sync. It updates the file you are watching every 2 seconds.
 
Old 02-19-2009, 02:30 PM   #13
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,235
Blog Entries: 61

Rep: Reputation: Disabled
Sort of related to this subject. There's a relatively new live CD devoted entirely to the CLI. All sorts of applications, plus some instructions, to get people used to using the CLI. I've burned it, but not tried it yet. INX:
http://inx.maincontent.net/index.html

Last edited by brianL; 02-19-2009 at 02:32 PM.
 
  


Reply

Tags
command, cool, interesting, program, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automation of CLI commands using python bharatbsharma Programming 1 03-18-2008 03:13 AM
help in linux commands in cli.. jaepi Linux - Newbie 9 04-27-2007 02:31 PM
An interesting phenomenon - people like CLI Wartz General 2 07-04-2005 06:02 AM
Help on cli commands? bruno buys Linux - Software 2 08-15-2004 11:35 AM
Interesting Programs? dtheorem Linux - Software 5 10-08-2003 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration