Disk Erişim Hızını İyileştirme:
Dikteki dosyaların her okunduğunda bir de okundu bilgisinin yazılmaması için noatime kullanılır(nodiratime da içerir). Journal 'i kapatmak için data=writeback, kullanılır.
/etc/fstab >>
UUID=7f5392f8-939b-4149-9f04-8b377ad0cdb4 / ext4 defaults,noatime,data=writeback,errors=remount-ro 0 1
# /tmp dizinini RAM'e bağlama
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0
Bellek İyileştirmeleri:
/etc/sysctl.conf >>
#Swap kullanim oranini azaltir
vm.swappiness=10
# Inode kullanan sistem nesnelerinin daha uzun sure cache de kalmarini saglar
vm.vfs_cache_pressure=50
TTY Sayısını 3 e İndirmek:
/etc/default/console-setup >>
ACTIVE_CONSOLES=”/dev/tty[1-3]
sudo rm /etc/init/tty6.conf /etc/init/tty5.conf /etc/init/tty4.conf
Preload İle Sık Kullanılan Programları Önyüklemek:
sudo apt-get install preload
Hybernate Ve Sleep i kinit 'de başlatılmasını engellemek:
# Başına # koyarak yorum satırı haline getir:
# RESUME=UUID=427075a3-381d-466b-a8d4-d08e8d183b6c
#!/bin/bash
echo -ne '##### (33%)\r'
sleep 1
echo -ne '############# (66%)\r'
sleep 1
echo -ne '####################### (100%)\r'
echo -ne '\n'
Açıklama :
\r : Satırın başına gitmeye yarıyor
-n : '\n' yi yazdırma
-e : '\r' gibi ifadeleri yakalamak için
Sudo Without Password :
ozgur ALL=(ALL) NOPASSWD: ALL
GPG Key ekleme:
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys A040830F7FAC5991
Shell üzerinden daemon disable etme:
update-rc.d apache2 disable
Grub 2 çözünürlüğünü değiştirme :
sudo nano /etc/default/grub
>>
GRUB_GFXPAYLOAD_LINUX=1680x1050
GRUB_GFXMODE=1680x1050
dosyayı kaydettikten sonra >>
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u
SSH girişlerinde şifre sormaması için :
a@A:~> ssh-keygen -t rsa
a@A:~> ssh b@B mkdir -p .ssh
a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
Dosya isimlerindeki boşlukları _ ile değiştirmek için
for f in *\ *; do mv "$f" "${f// /_}"; done
Bir dizindeki dosyaların içinde bir kelime aramak için
grep -rl "KELİME" DİZİN_YOLU
Bul ve sil
find . -name *.pyc -exec rm -f {} \;
Update grub
grub-mkconfig -o /boot/grub/grub.cfg
Scan all network for device discovery
sudo arp-scan --interface=enp59s0 --localnet
199.96.57.7 abs.twimg.com
199.96.57.7 o.twimg.com
199.59.150.8 tweetdeck.twitter.com
199.59.150.40 tweetdeck.twitter.com
199.59.148.213 upload.twitter.com
199.59.148.148 upload.twitter.com
199.59.148.20 api.twitter.com
199.59.150.41 api.twitter.com
199.59.149.232 api.twitter.com
210.163.219.24 twimg.com
199.59.149.200 pic.twitter.com
199.59.148.84 pic.twitter.com
199.59.148.11 pic.twitter.com
199.59.149.200 s.twitter.com
199.59.148.84 s.twitter.com
199.59.148.11 s.twitter.com
199.59.149.230 twitter.com
199.59.148.10 twitter.com
199.59.148.82 twitter.com
199.59.149.230 www.twitter.com
199.59.148.10 www.twitter.com
199.59.148.82 www.twitter.com
199.59.150.44 t.co
199.59.148.12 t.co
199.59.150.44 www.t.co
199.59.148.12 www.t.co
173.194.115.64 youtube.com
173.194.115.65 youtube.com
173.194.115.66 youtube.com
173.194.115.67 youtube.com
173.194.115.68 youtube.com
173.194.115.69 youtube.com
173.194.115.70 youtube.com
173.194.115.71 youtube.com
173.194.115.72 youtube.com
173.194.115.73 youtube.com
173.194.115.74 youtube.com
173.194.115.75 youtube.com
173.194.115.76 youtube.com
173.194.115.77 youtube.com
173.194.115.78 youtube.com
173.194.115.64 www.youtube.com
173.194.115.65 www.youtube.com
173.194.115.66 www.youtube.com
173.194.115.67 www.youtube.com
173.194.115.68 www.youtube.com
173.194.115.69 www.youtube.com
173.194.115.70 www.youtube.com
173.194.115.71 www.youtube.com
173.194.115.72 www.youtube.com
173.194.115.73 www.youtube.com
173.194.115.74 www.youtube.com
173.194.115.75 www.youtube.com
173.194.115.76 www.youtube.com
173.194.115.77 www.youtube.com
173.194.115.78 www.youtube.com
74.125.227.192 youtube.com
74.125.227.193 youtube.com
74.125.227.194 youtube.com
74.125.227.195 youtube.com
74.125.227.196 youtube.com
74.125.227.197 youtube.com
74.125.227.198 youtube.com
74.125.227.199 youtube.com
74.125.227.200 youtube.com
74.125.227.201 youtube.com
74.125.227.202 youtube.com
74.125.227.203 youtube.com
74.125.227.204 youtube.com
74.125.227.205 youtube.com
74.125.227.206 youtube.com
74.125.227.192 www.youtube.com
74.125.227.193 www.youtube.com
74.125.227.194 www.youtube.com
74.125.227.195 www.youtube.com
74.125.227.196 www.youtube.com
74.125.227.197 www.youtube.com
74.125.227.198 www.youtube.com
74.125.227.199 www.youtube.com
74.125.227.200 www.youtube.com
74.125.227.201 www.youtube.com
74.125.227.202 www.youtube.com
74.125.227.203 www.youtube.com
74.125.227.204 www.youtube.com
74.125.227.205 www.youtube.com
74.125.227.206 www.youtube.com
173.194.46.0 i1.ytimg.com
173.194.46.1 i1.ytimg.com
173.194.46.2 i1.ytimg.com
173.194.46.3 i1.ytimg.com
173.194.46.4 i1.ytimg.com
173.194.46.5 i1.ytimg.com
173.194.46.6 i1.ytimg.com
173.194.46.7 i1.ytimg.com
173.194.46.8 i1.ytimg.com
173.194.46.9 i1.ytimg.com
173.194.46.10 i1.ytimg.com
173.194.46.11 i1.ytimg.com
173.194.46.12 i1.ytimg.com
173.194.46.13 i1.ytimg.com
173.194.46.14 i1.ytimg.com
74.125.227.132 s.ytimg.com
74.125.227.128 s.ytimg.com
74.125.227.133 s.ytimg.com
74.125.227.130 s.ytimg.com
74.125.227.134 s.ytimg.com
74.125.227.142 s.ytimg.com
74.125.227.129 s.ytimg.com
74.125.227.135 s.ytimg.com
74.125.227.136 s.ytimg.com
74.125.227.131 s.ytimg.com
74.125.227.137 s.ytimg.com
173.194.115.64 m.youtube.com
173.194.115.65 m.youtube.com
173.194.115.67 m.youtube.com
173.194.115.73 m.youtube.com
173.194.115.66 m.youtube.com
173.194.115.70 m.youtube.com
173.194.115.78 m.youtube.com
173.194.115.69 m.youtube.com
173.194.115.72 m.youtube.com
173.194.115.71 m.youtube.com
173.194.115.68 m.youtube.com
173.194.115.67 youtu.be
173.194.115.78 youtu.be
173.194.115.64 youtu.be
173.194.115.73 youtu.be
173.194.115.66 youtu.be
173.194.115.65 youtu.be
173.194.115.71 youtu.be
173.194.115.69 youtu.be
173.194.115.72 youtu.be
173.194.115.70 youtu.be
173.194.115.68 youtu.be
173.194.115.67 www.youtu.be
173.194.115.78 www.youtu.be
173.194.115.64 www.youtu.be
173.194.115.73 www.youtu.be
173.194.115.66 www.youtu.be
173.194.115.65 www.youtu.be
173.194.115.71 www.youtu.be
173.194.115.69 www.youtu.be
173.194.115.72 www.youtu.be
173.194.115.70 www.youtu.be
173.194.115.68 www.youtu.be
173.194.115.75 yt3.ggpht.com
173.194.115.76 yt3.ggpht.com
173.194.115.74 yt3.ggpht.com
173.194.115.73 accounts.youtube.com
173.194.115.65 accounts.youtube.com
173.194.115.69 accounts.youtube.com
173.194.115.64 accounts.youtube.com
173.194.115.70 accounts.youtube.com
173.194.115.66 accounts.youtube.com
173.194.115.78 accounts.youtube.com
173.194.115.67 accounts.youtube.com
173.194.115.71 accounts.youtube.com
173.194.115.68 accounts.youtube.com
173.194.115.72 accounts.youtube.com
88.208.16.168 xhamster.com
88.208.16.168 http://www.xhamster.com
88.208.23.102 static.xhamster.com
88.208.16.168 ads.xhamster.com
88.208.16.84 st2.xhamster.com
88.208.16.85 st.xhamster.com
213.174.148.145 dlusa-1.xhamster.com
88.208.23.6 st3.xhamster.com
88.208.32.211 st4.xhamster.com
88.208.16.67 dl1.xhamster.com
88.208.16.94 dl2.xhamster.com
88.208.17.30 dl3.xhamster.com
88.208.17.41 dl4.xhamster.com
88.208.23.193 dl5.xhamster.com
88.208.23.195 dl6.xhamster.com
88.208.23.196 dl7.xhamster.com
88.208.23.197 dl8.xhamster.com
88.208.23.209 dl9.xhamster.com
88.208.23.217 dl10.xhamster.com
88.208.23.210 dl11.xhamster.com
88.208.23.211 dl12.xhamster.com
88.208.23.1 dl13.xhamster.com
88.208.23.2 dl14.xhamster.com
88.208.23.3 dl15.xhamster.com
88.208.23.4 dl16.xhamster.com
88.208.23.5 dl17.xhamster.com
88.208.23.100 dl18.xhamster.com
88.208.23.8 dl19.xhamster.com
88.208.24.1 dlams-1.xhamster.com
8.19.240.53 listen.grooveshark.com
user .bashrc >>
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
export EDITOR="nano"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
PS1='\[\e[1;37m\]\u\[\e[m\]\[\e[1;32m\]@\[\e[m\]\[\e[1;32m\]Linux:\A\[\e[m\]\[\e[1;35m\]\w\[\e[m\]\[\e[1;32m\]>> \[\e[m\]\[\e[1;37m\] '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
#for eclipse
export MOZILLA_FIVE_HOME=/usr/lib/firefox-5.0/
export EDITOR=/usr/bin/nano
#forpython
export PYTHONDOCS=/usr/share/doc/python2/html/
# For colourful man pages (CLUG-Wiki style)
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
# Colourful prompt
eval "`dircolors -b`"
export GREP_COLOR="1;33"
alias grep='grep --color=auto'
alias pac='sudo pacman-color'
alias pow='sudo powerpill'
alias la='ls -alh --color=auto'
alias ll='ls -lh --color=auto'
alias ls='ls -a --color=auto'
alias diff='colordiff'
alias cp='cp -rvf'
alias mv='mv -vf'
alias rm='rm -v'
Color prompt for root :
PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\]'
Color prompt listesi :
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
bakgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
Prompt Parametreleri:
* \a : an ASCII bell character (07)
* \d : the date in "Weekday Month Date" format (e.g., "Tue May 26")
* \D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
* \e : an ASCII escape character (033)
* \h : the hostname up to the first '.'
* \H : the hostname
* \j : the number of jobs currently managed by the shell
* \l : the basename of the shell’s terminal device name
* \n : newline
* \r : carriage return
* \s : the name of the shell, the basename of $0 (the portion following the final slash)
* \t : the current time in 24-hour HH:MM:SS format
* \T : the current time in 12-hour HH:MM:SS format
* \@ : the current time in 12-hour am/pm format
* \A : the current time in 24-hour HH:MM format
* \u : the username of the current user
* \v : the version of bash (e.g., 2.00)
* \V : the release of bash, version + patch level (e.g., 2.00.0)
* \w : the current working directory, with $HOME abbreviated with a tilde
* \W : the basename of the current working directory, with $HOME abbreviated with a tilde
* \! : the history number of this command
* \# : the command number of this command
* \$ : if the effective UID is 0, a #, otherwise a $
* \nnn : the character corresponding to the octal number nnn
* \\ : a backslash
* \[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
* \] : end a sequence of non-printing characters
başına source yerine . koyuyoruz. Böylece yeni bir kabuk açmak yerine aynı kabuk üzerinde işlem yapıyor
$ . ./setup.bash
Mkv ses dosyasını ac3 e dönüştürmek :
ffmpeg -i 'inputfile' -vcodec copy -scodec copy -acodec ac3 -ac 6 -ab 640k 'outputfile'
Mov dosyalarını Avi dosyasına dönüştürmek:
1) Direk Dönüşüm:
avconv -i in_movie.mov out_movie.avi
2)Bitrate i yükseltiyoruz:
avconv -i in_movie.mov -b 19000k -b:a 192k -out_movie.avi
3)Bitrate i koruyup çözünürlüğü azaltıyoruz ve bütün dizinin içini taratıyoruz:
#!/bin/sh
i=0
for file in /home/ozgur/Desktop/temp/test/*
do
#whatever you need with "$file"
echo " ====> Processing $i"
echo " ====> Processing $file"
avconv -i $file -b 19000k -b:a 192k -s 960x540 $file.avi
i=i+1
done
4) with ffmpeg
#!/bin/sh
i=0
for file in /home/ozgur/Desktop/temp/test/*
do
#whatever you need with "$file"
echo " ====> Processing $i"
echo " ====> Processing $file"
ffmpeg -i $file -vf scale=960:-2 -c:v libx264 -crf 20 -preset slow -c:a copy $file.mkv
i=i+1
done