VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: [1] 2

Author Topic: Post your favorite shell commands!  (Read 4509 times)

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Post your favorite shell commands!
« on: August 23, 2009, 04: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
Re: Post your favorite shell commands!
« Reply #1 on: August 23, 2009, 05: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
Re: Post your favorite shell commands!
« Reply #2 on: August 24, 2009, 05: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: 2301
Re: Post your favorite shell commands!
« Reply #3 on: August 24, 2009, 06: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: 4083
Re: Post your favorite shell commands!
« Reply #4 on: August 24, 2009, 06:17:53 am »

mc

It's command line cheating. Gives you a GUI in a text terminal.
« Last Edit: August 24, 2009, 10:36:01 am by nightflier »
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: Post your favorite shell commands!
« Reply #5 on: August 24, 2009, 06:28:46 am »

vim <file>

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: Post your favorite shell commands!
« Reply #6 on: August 24, 2009, 09:35:03 am »

Is there anything better than cat?

Bigpaws
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: Post your favorite shell commands!
« Reply #7 on: August 24, 2009, 10:14:22 am »

Is there anything better than cat?

dog ?  ;D
J/K

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: Post your favorite shell commands!
« Reply #8 on: August 24, 2009, 10: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
Re: Post your favorite shell commands!
« Reply #9 on: August 24, 2009, 10: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: 1459
Re: Post your favorite shell commands!
« Reply #10 on: August 24, 2009, 05: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
Re: Post your favorite shell commands!
« Reply #11 on: August 25, 2009, 05: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
Re: Post your favorite shell commands!
« Reply #12 on: August 25, 2009, 07: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: [Select]
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.

carsten

  • Vectorite
  • ***
  • Posts: 137
  • I know why birds sing ...
Re: Post your favorite shell commands!
« Reply #13 on: August 25, 2009, 09:37:53 am »

xkill  >:(

Carsten
Logged
Tam exacte ut oportet, non ut licet!

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: Post your favorite shell commands!
« Reply #14 on: August 25, 2009, 09:48:02 am »

xkill  >:(

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