VectorLinux
October 30, 2014, 03:52:42 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: Post your favorite shell commands!  (Read 4069 times)
Daniel
Packager
Vectorian
****
Posts: 704


WWW
« on: August 23, 2009, 03:09:35 pm »

Post your favorite shell commands here! (Or just ones that you like.) If there are multiple commands that you like a lot, post them all! Make sure that you include a description of what the commands do.

ls /usr/bin | grep <command I want to search for>  (this command searches in /usr/bin for commands or parts of commands. this is useful if I want to find commands starting with "pkg" for instance)

/sbin/vsuper  (I like how you can run programs as root with this. (Useful if you write your programs/scripts that need to be run as root))
Logged

The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #1 on: August 23, 2009, 04:00:05 pm »

df -h
gives the size of mounted partitions, used space, and free space in human-readable form (gigabytes and megabytes)

apropos sometopic
lists files that are related to that topic
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
tomh38
Vectorian
****
Posts: 913



« Reply #2 on: August 24, 2009, 04:45:58 am »

more ~/Documents/somefile.txt
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
rbistolfi
Packager
Vectorian
****
Posts: 2290


« Reply #3 on: August 24, 2009, 05:09:56 am »

find
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
nightflier
Administrator
Vectorian
*****
Posts: 4026



« Reply #4 on: August 24, 2009, 05:17:53 am »

mc

It's command line cheating. Gives you a GUI in a text terminal.
« Last Edit: August 24, 2009, 09:36:01 am by nightflier » Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3186



« Reply #5 on: August 24, 2009, 05:28:46 am »

vim <file>
Logged

bigpaws
Vectorian
****
Posts: 1856


« Reply #6 on: August 24, 2009, 08:35:03 am »

Is there anything better than cat?

Bigpaws
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3186



« Reply #7 on: August 24, 2009, 09:14:22 am »

Is there anything better than cat?

dog ?  Grin
J/K
Logged

Daniel
Packager
Vectorian
****
Posts: 704


WWW
« Reply #8 on: August 24, 2009, 09:17:07 am »

Please make sure you include either a description of the command or a reference link to explain the command. I'm thinking of newbies here who might find these commands useful but might not know what they do or how to use them.
Logged

The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #9 on: August 24, 2009, 09:24:42 am »

sed has to be my favorite, maybe because I know I will never fully use all of its functionality

here are some more: http://vectorlinux.osuosl.org/Uelsk8s/test/
Logged
sledgehammer
Vectorian
****
Posts: 1425



« Reply #10 on: August 24, 2009, 04:26:29 pm »


I saw something on the forum the other day about automating this, but til I get time to try it, my favorite shell command is:

root:# hibernate -F /etc/hibernate/ram.conf

Saves some battery.  I think this suspends to memory not to disk.  There is probably another one to put the computer into a deeper sleep.

John
Logged

VL7.0 xfce4 Samsung RF511
stefanek
Member
*
Posts: 12


« Reply #11 on: August 25, 2009, 04:57:40 am »

Using imagemagick to convert a pdf file to jpegs:

convert -units PixelsPerInch -density 200x200 infile.pdf outfile.jpg

will produce:  outfile-1.jpg, outfile-2.jpg.......depending on the number of pages.

Logged

VL 6 Standard on a IBM Thinkpad X31
kidd
Packager
Vectorian
****
Posts: 682


« Reply #12 on: August 25, 2009, 06:13:51 am »

alias is a command provided by your shell.  So it's not like most of the commands that have been already posted which are utilities that may be in your /usr/bin or /bin (see which and locate commands to find out where a given file is in your path)

I use zsh, which provides some interesting features regarding aliases.  AFAIK, bash alias command lets you bind one word to any other command (even piped commands), so you can write your own kind of macros.  Zsh's let you write partial aliases, so you can bind T to '|tail' and build complex commands from many aliases, and combine them with plain commands.

Here I paste the relevant part of my .zshrc
Code:
alias -g TL='| tail -20'
alias -g T='| tail'
alias -g tr='-ltr'
alias -g X='| xclip'
alias lsd='ls -d *(/)'
alias vimblog='vim ~/blog/`date +%F`.txt'
alias \:q=exit
alias lst='ls -ltr'
alias ls='ls  --color=auto'
alias sshuni='ssh alu9854@foolab.baruni.es'
alias screenuni='screen -t sshuni -c ~/.screenrc2'

inside the expanded aliases, you can find many of my preferred commands (being used very often made me put them into aliases, to shorten them).

Drop a line if you want further info on those.
Logged

carsten
Vectorite
***
Posts: 137


I know why birds sing ...


« Reply #13 on: August 25, 2009, 08:37:53 am »

xkill  Angry

Carsten
Logged

Tam exacte ut oportet, non ut licet!
Daniel
Packager
Vectorian
****
Posts: 704


WWW
« Reply #14 on: August 25, 2009, 08:48:02 am »

xkill  Angry

Carsten

I very much agree. That is one thing that I especially like a lot about linux, you can "kill" a program and it almost instantly goes away. In Windows, you can click "End Now" and it might end the program but usually not immediately.
Logged

The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!