Difference between pages "Tips" and "Bash operatOr"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
 
imported>ThorstenStaerk
(Redirected page to Bash operators)
 
Line 1: Line 1:
= want to watch a forbidden video =
+
#REDIRECT [[Bash operators]]
You want to watch a video, but it is only available for viewers in the USA? See [[rackspace]].
 
 
 
= want to get rebate like an American =
 
Rental cars tend to be cheaper if you use a browser with a US IP address. To do this, see [[rackspace]].
 
 
 
= don't want this program to start everytime you log in? =
 
Sometimes a program is started when you log in, but you do not want this. To schedule and de-schedule programs from starting, see [[scheduling tasks]].
 
 
 
= want to hide your personal data in the internet =
 
If you visit a website, people will know data from you like operating system and location. To prevent this, use [[tor]].
 
 
 
= want to connect a USB drive and get instant access =
 
When you connect your USB drive you want it to be accessible somewhere immediately. You do not want to [[open a console]] and mount it, you want it to be mounted automatically. See [[automounter]].
 
 
 
= emulate your mouse with the keyboard =
 
See [[emulate your mouse with the keyboard]].
 
 
 
= analyze system performance =
 
[[Image:Snapshot-ksar.png||thumb|200px|ksar (click to enlarge)]]
 
 
 
You can analyze system performance using [[ksar]].
 
 
 
= rename several files =
 
Rename several files using the [[command]]
 
rename 's/BEFORE/AFTER/g' *
 
 
 
= list files by size =
 
To list files ascending by size use the [[command]]
 
du -s * | sort -n
 
attention, this will not work if you have a file named ''--help''. Also, this command will not include [[hidden files]].
 
 
 
= favorite Linux-Tools =
 
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn|head -10
 
 
 
= controlling several computers at once =
 
{|
 
When working in a [[cluster]] you can control several computers in one [http://simple.wikipedia.org/wiki/Command_Line_Interface console] using [http://sourceforge.net/projects/clusterssh/ clusterssh]. ||
 
[[image:Snapshot-cssh.png|right|thumb|200px|ClusterSSH (click to enlarge)]]
 
|}
 
 
 
= find out which files are accessed by a program =
 
To find out which files are accessed by a program start it with
 
strace -e open ''program''
 
 
 
= find out program that belongs to a window =
 
Sometimes a window pops up and you do not know which program it is. For example you have just created a fresh user and when he logs in, he sees a window that you would like to get rid of. So you need to search where the window's program is called. So, every window is associated with a process. To find that out, call xprop and click on the window you want information about.
 
# xprop
 
[...]
 
WM_CLASS(STRING) = "simple-scan", "Simple-scan"
 
[...]
 
 
 
= find out where configuration changes are stored =
 
See [[find out where configuration changes are stored|here]]
 
 
 
= convert images in a batch job =
 
Use the [[command]] convert:
 
convert ''name''.''format'' ''name''.jpg
 
 
 
= did you know... =
 
 
 
== ...you can allow running vlc as root ==
 
To do this, disassemble and edit vlc as described under [[Gdb#Allow_starting_vlc_as_root]].
 
 
 
== ...you can sort files by size and age ==
 
To sort your files and folders by size, [[open a console]] and enter:
 
[[du]] -s * | sort -n
 
To sort your files and folders by age, [[open a console]] and enter:
 
[[ls]] -ltr
 
 
 
== key codes ==
 
... you can find out the key code of every key on your keyboard using the [[command]] [[xev]].
 
 
 
== split files ==
 
...you can split files using the [[command]] [[split]].
 
 
 
== put computer into standby mode ==
 
... you can put your computer into standby mode by [[opening a console]] and entering
 
echo mem > /sys/power/state
 
 
 
= Remove red eyes with The GIMP =
 
# mark the red in the eyes with the magic stick
 
# selection -> fade (5px)
 
# choose a pen
 
# mode "color", opacity 80%, one time
 
# mode "overlay", opacity 65%, one time
 
 
 
= write something on your screen =
 
...you can write something on your screen using [[osd_cat]].
 
 
 
= download youtube videos... =
 
... using http://keepvid.com/, it works with Linux.
 
 
 
= watch changes =
 
... you can watch changes, e.g. the size of a file being written with the [[command]] [[watch]]:
 
dd if=urandom.img of=test.img & watch --interval=1 "du -h test.img"
 
 
 
= See also =
 
* http://www.onpn.de/misc/linuxtipps.txt
 

Latest revision as of 01:38, 29 December 2012

Redirect to: