Process ne kadar zamandır çalışıyor?

Haziran 7, 2013 § Yorum yok § Kalıcı bağlantı

ps -p 3064 -o etime

veya

ps -eo pid,args,etime | grep <aranan_pid>

vim referans

Haziran 5, 2013 § Yorum yok § Kalıcı bağlantı

Navigasyon

	
e | end of current word
b | beginning of word
$ | go to end of line
0 | go to beginning of line
( | go to beginning of section (denoted by \n\n)
) | go to end of section (denoted by \n\n)

Search operators:

/ (or ?) | start a search
/\c (or ?\c) | start a case insensitive search
n | next
shift+n | previous

Destructive functions/clipboard operators:

	
u | undo
ctrl+r | redo
v | allow highlighting for copy, cut, etc at cursor
y | copy/yank
d | cut
p | paste
x or del | delete character at cursor
X or backspace (while in INSERT mode) | delete character before cursor

“Big” operations:

	
V | highlight whole line
gg | go to top of file (first line)
G | go to bottom of file (last line)
control+b | page up
control+f | page down
yy | copy/yank line
dd | cut the current line (not delete, but cut to clipboard)

Centos’da ipv6’yı iptal etmek

Haziran 5, 2013 § Yorum yok § Kalıcı bağlantı

Completely disable IPv6 in CentOS6

All of these are fun and good, but none really disables ipv6. You really are concerned with your NICs not being configured for IPv6, but if you really want to disable ipv6… well… disable ipv6:

In /etc/grub.conf edit the kernel lines to include:

	
ipv6.disable=1

The “trick” here, as described by TrevorH1 in #linux, is that programs can still load the module as they wish. You can check this by running lsmod or modprobe -l, you will still see the ipv6.ko kernel module. This allows user mode programs to access the kernel module in their code (so they don’t crash); but as far as the kernel is concerned ipv6.disable=1, so the kernel doesn’t really allow much to get through it.

And that’s it. IPv6 is disabled on your box… but if you want to disable a variety of fun things that you might find when seeking to disable IPv6…

In /etc/sysctl.conf change/create entries:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

In /etc/sysconfig/network change/create entries:

	
NETWORKING_IPV6=no
IPV6INIT=no

In /etc/modprobe.d/blacklist.conf change/create entries:

	
blacklist net-pf-10
blacklist ipv6

Disable iptables for IPv6:

	
service ip6tables stop
chkconfig ip6tables off

Disable ipv6 completely:

echo "install ipv6 /bin/true" > /etc/modprobe.d/ipv6_disabled.conf

Disk bozmanın bazı yolları…

Temmuz 5, 2012 § Yorum yok § Kalıcı bağlantı

Disklerin read/write istekleri ile ısınarak bozulması için

while true; do dd if=/dev/xxx of=/dev/xxx conv=notrunc; done

Diski yavaşlatıp, bilgi yazıp tekrar yavaşlatmak için

hdparm -S 1 /dev/xxx while true; sleep 60; dd if=/dev/random of=foobar count=1; done

Flash drive gibi hareketli parçası olmayan parçaların aşırı kullanım yolu ile bozulması için

dd if=/dev/urandom of=/dev/xxx

vlc’de Türkçe karakterli altyazı sorununa çözüm

Haziran 21, 2012 § Yorum yok § Kalıcı bağlantı

Altyazının karakter seti UTF-8 değilse sorun çıkabiliyor.
Önce bu durumu tesbit edelim:

file --mime input.srt
veya
file --mime-encoding input.srt

Altyazı dosyasının karakter setini değiştirelim

iconv -f ISO-8859-9 -t UTF-8 input.srt > output.srt

So Nvidia, f*** you

Haziran 20, 2012 § Yorum yok § Kalıcı bağlantı

Ubuntu Versiyonunu Öğrenmek

Mart 22, 2012 § Yorum yok § Kalıcı bağlantı

lsb_release -a

Video Kesmek

Mart 20, 2012 § Yorum yok § Kalıcı bağlantı

FFMEPG kullanarak

ffmpeg -ss 00:15:20 -i asil.mp4 -f avi -vcodec mpeg1video -b 1000k -acodec copy sonuc.mpg

uzunluk belirterek

ffmpeg -ss 00:00:30.00 -t 00:00:25 -i bar.mp3 -acodec copy bar-new.mp3

Not: -ss baslangic -t uzunluğu belirtir.
Ayrıca -ss ile -t nin -i den önce gelmesi önemlidir.(İlginç!)

Man ffmpeg ile:
-t duration
Restrict the transcoded/captured video sequence to the duration specified in seconds. “hh:mm:ss[.xxx]” syntax is also supported.
-ss position
Seek to given time position in seconds. “hh:mm:ss[.xxx]” syntax is also supported.
ffmpegin desteklediği format bilgileri için

ffmpeg -formats

vlc ile videonun belirli bir aralığını kesmek

vlc --intf rc --rc-show-pos --rc-fake-tty --start-time=888 --stop-time=999 /home/skaas/Desktop/4144_20090603073103.mp4 :sout='#transcode{vcodec=mp1v,vb=1024,fps=25,acodec=mpga,ab=128,scale=1,channels=6,deinterlace,audio-sync}:std{access=file,mux=mpeg1,url=/home/skaas/Desktop/deneme4.mpg}' vlc://quit

mp4box ile dosya kesmek (saniye cinsinden baslangıc ve bitis zamanı)

mp4box -splitx 66.240:80.120 input.mpeg4

neroAacEnc kurulumu

Mart 16, 2012 § Yorum yok § Kalıcı bağlantı

wget ftp://ftp6.nero.com/tools/NeroDigitalAudio.zip
unzip NeroDigitalAudio.zip -d nero
cd nero/linux
sudo install -D -m755 neroAacEnc /usr/local/bin

neroAacEnc “No such file or directory” Hatasının çözümü

Mart 16, 2012 § Yorum yok § Kalıcı bağlantı

Ubuntu için çözüm

$ file neroAacEnc 
fatih@fatih:~/Desktop/ffmpeg_test/linux$ file neroAacEnc 
neroAacEnc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

Anlaşıldığı üzere neroAacEnc binary dosyası 32 bittir ve 32 bit shared librarilere bağımlılığı vardır.

İşletim sistemimizin 32 bit mi 64 bit mi olduğunu öğrenmek için:

$ uname -a
Linux fatih 2.6.32-39-generic #86-Ubuntu SMP Mon Feb 13 21:50:08 UTC 2012 x86_64 GNU/Linux

Sorun 32 bit shared librarilerin 64 bit Ubuntumuzda default olarak kurulu olmamasından kaynaklanıyor.

İhtiyacımız olan 32 bit shared librarileri kurmak için.

sudo apt-get install ia32-libs

Neredeyim ben!?

Linux Notları kategorisinde geziniyorsun.