Kategoria - Linux - liczba wpisów 197
Debian, Ubuntu, Fedora

Speedometer Kategoria: Linux | Autor: Bartłomiej Gałęzia

aptitude install speedometer
speedometer -s -tx eth0 -rx eth0

Wyłączanie linuxa z poziomu cmd w windows Kategoria: Linux | Tagi: cmd | Autor: Bartłomiej Gałęzia

Install putty

close.bat

putty.exe -ssh -2 -l root -pw password -m c:\close.sh 192.168.1.1

close.sh

#!/bin/bash
shutdown -h -P now

Linux dziennik Kategoria: Linux | Tagi: logi | Autor: Bartłomiej Gałęzia

lastlog
faillog
auth.log
user.log
id – id użytkowników
w – info o użytkownikach
finger – info o użytkownikach
finger -sl

who -dbprt
-d nieaktywne procesy
-b czas ostatniego uruchomienia systemu
-p aktywne procesy
-r runlevel
-t czas ostatniej zmiany zegara

Nodimm - Xfce - nie działa Kategoria: Linux | Autor: Bartłomiej Gałęzia

vim /etc/lightdm/lightdm.conf

xserver-command=X -s 0 -dpms

14.04

vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
xserver-command=X -s 0 -dpms

Komp stoi na grubie po niepoprawnym zamknięciu Kategoria: Linux | Tagi: grub | Autor: Bartłomiej Gałęzia

vim /etc/default/grub

dodaj linię

GRUB_RECORDFAIL_TIMEOUT=1
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_RECORDFAIL_TIMEOUT=1
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX=”" 

Nodimm - Ubuntu Kategoria: Linux | Tagi: do poprawki, ubuntu | Autor: Bartłomiej Gałęzia

vim /etc/xdg/lxsession/LXDE/autostart

@xset s off
@xset -dpms
@xset s noblank

http://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank

aptitude remove gnome-screensaver

http://blog.tordeu.com/?p=292  - działa

Kubuntu

Start > Energy Saving > uncheck Screen Energy Saving

Ubuntu - mysz działa tylko w pionie Kategoria: Linux | Tagi: mysz, ubuntu | Autor: Bartłomiej Gałęzia

/sbin/rmmod usbmouse

in my rc.local.

/etc/rc.local

 

runs at boot, last thing before you see a prompt.

Bash colored prompt Kategoria: Linux | Tagi: bash | Autor: Bartłomiej Gałęzia

http://ubuntuforums.org/showthread.php?t=765191

Zobacz całość

Bash happy prompt Kategoria: Linux | Tagi: bash, do poprawki | Autor: Bartłomiej Gałęzia

Usuwanie Byte-Of-Mark przez Vim Kategoria: Linux | Tagi: vim | Autor: Bartłomiej Gałęzia

To save the file without a BOM:

:setlocal nobomb
:w

To ask Vim if there is a BOM:

:setlocal bomb?

Klonowanie dysku dd Kategoria: Linux | Autor: Bartłomiej Gałęzia

https://wiki.archlinux.org/index.php/Disk_Cloning

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror

Vsftpd - instalacja Kategoria: Linux | Tagi: ftp | Autor: Bartłomiej Gałęzia

Linux Star Wars beep script Kategoria: Linux | Tagi: bash, beep | Autor: Bartłomiej Gałęzia

aptitude install beep
beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 -f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 369.99 -D 
100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 466.16 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 587.32 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 300 -f 392.00 -D 150 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 392

MongoDB instalacja Kategoria: Linux | Tagi: mongoDB | Autor: Bartłomiej Gałęzia

http://www.mongodb.org/downloads

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/

If you are running a 32-bit system, which isn’t recommended for production deployments, place the following configuration in /etc/yum.repos.d/10gen.repo file:

[10gen]name=10gen Repositorybaseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686gpgcheck=0enabled=1

yum install mongo-10gen mongo-10gen-server

Find Kategoria: Linux | Tagi: bash | Autor: Bartłomiej Gałęzia

find . -name '*.*' -type f -print0 | xargs -0 grep -l "phrase"

Można też dodać skróconą formę tego polecenia w .bashrc

vim ~/.bashrc
findtext() {
    find . -name '*.*' -type f -print0 | xargs -0 grep -l "$*"    
}