cat ~/.bash_history | sort | uniq -uapt-get install boinc-client boinc-managerAplikace -> Systémové nástroje -> BIONIC Manager#!/bin/bash
### gconf-editor
### gconftool-2 --get-type
# Sounds off
gconftool-2 -t bool --set /desktop/gnome/sound/event_sounds false
rm /usr/share/sounds/question.wav ### Nevim jak jinak
# gnome-terminal
gconftool-2 -t str --set /apps/gnome-terminal/keybindings/copy "<Ctrl>c"
gconftool-2 -t str --set /apps/gnome-terminal/keybindings/paste "<Ctrl>v"
gconftool-2 -t bool --set /apps/gnome-terminal/profiles/Default/use_theme_colors false
gconftool-2 -t str --set /apps/gnome-terminal/profiles/Default/background_color "#000000"
gconftool-2 -t str --set /apps/gnome-terminal/profiles/Default/foreground_color "#FFFFFF"
gconftool-2 -t string --set /apps/gnome-terminal/profiles/Default/background_type "transparent"
gconftool-2 -t int --set /apps/gnome-terminal/profiles/Default/scrollback_lines 5000
gconftool-2 -t bool --set /apps/gnome-terminal/global/use_menu_accelerators false
gconftool-2 -t bool --set /apps/gnome-terminal/global/use_mnemonics false
# Nautilus
gconftool-2 -t string --set /apps/nautilus/preferences/default_folder_viewer "list_view"
# Klavesnice a jazyky
gconftool-2 -t list --list-type=string -s /desktop/gnome/peripherals/keyboard/kbd/layouts [cz,us]
gconftool-2 -t list --list-type=string -s /desktop/gnome/peripherals/keyboard/kbd/options "[grp`echo -e "\t"`grp:alt_shift_toggle]"
# Klavesova zkratka <Ctrl><Alt>Q - vypne monitory po 3sekundach
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_1 "sleep 3 && xset dpms force off"
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_1 "<Control><Alt>q"
FILE='/etc/X11/xorg.conf'
N_FILE='/tmp/xorg.conf'
if [ -f "$FILE" ] && [ 1 -gt `grep -c "Emulate3Buttons" $FILE;` ]
then
echo "============================================================"
echo "3tl. myši dostane po restartu Xek novou funkci (scrollování)"
echo "============================================================"
CO='Identifier\t"Configured\sMouse"'
CIM='Identifier\t"Configured\sMouse"\n\tOption\t\t"Emulate3Buttons"\t"true"\n\tOption\t\t"EmulateWheel"\t"true"\n\tOption\t\t"EmulateWheelButton"\t"2"'
sed s/$CO/$CIM/g $FILE > $N_FILE
mv $N_FILE $FILE
fi
alias ee='exit'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias aa='alias -p'
alias grep='grep --color=auto'
alias h='history'
alias his='history | grep '
alias cache='apt-cache search '
alias in='sudo apt-get install '
alias l='ls -CF'
alias la='ls -lah --color=auto'
alias lnn='ln -s -t ~/mycommander/home `pwd`'
alias ls='ls --color=auto'
alias mon='xset dpms force off'
alias net='ip a; cat /etc/network/interfaces;'
alias out='sudo apt-get remove'
alias rst='sudo shutdown -r now'
alias up='sudo apt-get -y update && sudo apt-get -y upgrade'
alias prev='printenv'
alias bezk='grep -Ev "#|;|^$"'
for FILE in /home/*/.bashrc; do
if [ -f "$FILE" ] && [ 1 -gt `grep -c "alias h='history '" $FILE;` ]
then
echo "============================================================"
echo "Pro všechny účty v /home adresáři byli přidány aliasy: "
echo $ALIAS
echo "============================================================"
echo $ALIAS >> $FILE
fi
done
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo "nautilus --browser %U"
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;Applications -> System Tools -> File Browser (Root) apt-get install manpages-cs mc nmap iptraf ipcalc htop hwinfo mplayer mencoder vlc wireshark pidgin gnome-commander netspeed p7zip-full fusion-icon ubuntu-restricted-extras filezilla
apt-get install lm-sensors compizconfig-settings-manager krusader smplayer compiz-fusion-plugins-extra gufw gimp-resynthesizer
<object type="application/x-shockwave-flash" width="320" height="260" data="player.swf?file=video.flv">
<param name="movie" value="player.swf?file=video.flv" />
<param name="wmode" value="transparent" />
</object>
apt-get install samba smbfsLze graficky naklikat v nautilusovi (pravý klik na myši - sdílení). Pozor na práva (a pak zbytečně nehledat proč to nejde)!workgroup = skupina ### Měla by být zadaná stejná pracovní skupina jako na ostatních pc
...
[upload]
path = /home/duckd/upload
available = yes
browseable = yes
public = yes
writable = yes ### Jen pro čtení (no), pro zápis (yes)Restartovat službu:/etc/init.d/samba restart| Mplayer, VLC | |
| mplayer -vo help | Vypíše drivery výstupu videa |
| mplayer -vo gl | Použije pro přehrání videa driver gl |
| mplayer -subcp cp1250 -sub tituly.sub film.avi | Nastaví typ titulku na cp1250 (trvale nastaveni v souboru mplayer.conf -> subcp=cp1250) |
| echo "vf=expand=0:-100:0:0" >> ~/.mplayer/config | Titulky do černého pruhu |
Section "InputDevice"
Identifier "Configured Mouse"
...
Option "Emulate3Buttons" "true"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
EndSectionxset dpms force off - Násilně vypne monitory (úspora energie a šetření HW)| uname -r | Verze jádra |
| uname -a | Výpis info. o pc |
| lsb_release -a | Výpis verze distribuce |
| cat /etc/*release | Výpis verze distribuce |
| cat /proc/version | Výpis verze distribuce |
| apt-get -y update && apt-get -y upgrade | Update systému bez otázek |
acpi_cpufreq 10568 0
cpufreq_userspace 5280 0
cpufreq_conservative 8072 0
cpufreq_powersave 2688 0
cpufreq_ondemand 9612 1
cpufreq_stats 7232 0
freq_table 5792 3 acpi_cpufreq,cpufreq_ondemand,cpufreq_stats
processor 32072 2 acpi_cpufreq,thermalcat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies1733000 1333000 1067000 800000xterm -e 'echo "HESLO" | sudo -S cpufreq-selector -f 800000'#!/bin/bash
echo $$ #vypise PID tohoto procesu
trap "Zachytit signal 9" 9
i=0
while /bin/true
do
i=`expr $i + 1`
echo -n "$i "
sleep 1
done#!/bin/bash
null="/dev/null"
xorg="/etc/X11/xorg.conf"
if [ -f $xorg ]
then
if grep ["t"]||["sex"] $xorg > $null;
then
echo testfile exists!
fi
fi
typeset LINEX='line_to_add\
one_more_line_to_add\
another_line_to_add' /path/to/source'
sed '/some_search_pattern/a\
'"$LINEX" /path/to/source > /path/to/resultLINENO=10
POSITION=5
TEXT='XXXXX'
FILE=where_to_insert
If your sed supports -E flag, this will work:
sed -E "${LINENO}s/^(.{${POSITION}})(.*)/\1${TEXT}\2/" < ${FILE} set LINE = 3 ; set LOC = 15 ; set TEXT = "BLABLA" ; set FILE = "file"
awk 'NR==l{$0= substr($0,1,loc) text substr($0,loc+1)}{print}' l=$LINE loc=$LOC text=$TEXT $FILEKompilacie:S tímhle si dovolím nesouhlasit, make install není dobrý způsob instalace self-compiled věcí... Spíš by tam mělo být sudo checkinstall, které vytvoří .deb balíček, který pak nainstaluje a dá se jednoduše odebrat...
./configure
make
sudo make install
make clean
hdparm -B 10 /dev/sda ### disk by se mel po chvilce vypnouta pritom v man hdparm-B Set Advanced Power Management feature, if the drive supports it.
A low value means aggressive power management and a high value
means better performance. Possible settings range from values 1
through 127 (which permit spin-down), and values 128 through 254
(which do not permit spin-down). The highest degree of power
management is attained with a setting of 1, and the highest I/O
performance with a setting of 254. A value of 255 tells hdparm
to disable Advanced Power Management altogether on the drive
(not all drives support disabling it, but most do).ps aux Skopírovať číslo procesu, ktorý chceme skončiť, a potom: kill číslo
a nebo pkill částnázvu tabulátor ;)
iwlist
iwconfig wlan0 essid doma key 111111111
dhcpcd wlan0
iwlist preskenuje dostupne siete"download-dir": "\\DLINK-2D3CC1\Volume_1\Downloads\",
Jak se správně píše sítový odkaz ?Tohle je widlí zápis, korektní zápis záleží na protokolu jakým jsou ty dva počítače spojené (samba, FTP, ssh...)
tento zápisCitace"download-dir": "\\DLINK-2D3CC1\Volume_1\Downloads\",
mi transmission nechce brát ... transmission běží na serveru a v síti je nas server na který se ukládají data.