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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-30-2009, 03:32 AM
|
#1
|
|
Member
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110
Rep:
|
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
|
|
|
|
01-30-2009, 05:51 AM
|
#2
|
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
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.
|
|
|
|
01-30-2009, 06:33 AM
|
#3
|
|
Member
Registered: Feb 2006
Distribution: Debian, Maemo
Posts: 341
Rep:
|
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.
|
|
|
|
01-30-2009, 07:13 AM
|
#4
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,089
|
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 12:51 PM.
Reason: spelling mistake
|
|
|
|
01-30-2009, 08:04 AM
|
#5
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
The Imagemagick suite---capabilities seem almost unlimited.
|
|
|
|
01-30-2009, 08:45 AM
|
#6
|
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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 08:45 AM.
Reason: [
|
|
|
|
01-30-2009, 10:28 AM
|
#7
|
|
Member
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110
Original Poster
Rep:
|
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 10:59 AM.
|
|
|
|
01-30-2009, 08:22 PM
|
#8
|
|
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Rep: 
|
Quote:
Originally Posted by baldurpet
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
|
|
|
|
01-31-2009, 01:57 AM
|
#9
|
|
LQ Newbie
Registered: Jan 2009
Posts: 10
Rep:
|
Quote:
Originally Posted by alan_ri
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
|
|
|
|
01-31-2009, 02:04 AM
|
#10
|
|
LQ Newbie
Registered: Jan 2009
Posts: 10
Rep:
|
top/htop for network monitoring?
And not ntop. Something where I can see which process is using (maximum) the network (say eth0).
|
|
|
|
01-31-2009, 03:00 AM
|
#11
|
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464
|
Quote:
|
ps -eo pcpu,pid,user,args | sort -r -k1 | less
|
Why not use top?
|
|
|
|
02-19-2009, 12:10 PM
|
#12
|
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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 to watch the RAID sync. It updates the file you are watching every 2 seconds.
|
|
|
|
02-19-2009, 01:30 PM
|
#13
|
|
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 14.0 // Desktop: Slackware64 14.0 // Netbook: Slackware 14.0
Posts: 6,183
|
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 01:32 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:17 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|