Xfce – Configuration and Tweaks – Getting Started
1. application menu display
Application menu (right click) -> Uncheck "Show Button ... Read more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
du -s .archived/ du -sk k: result in KB x: expands but only on the local file system (does not follow NFS Links) du -xh | egrep "^[0-9\.]+[GT]" # Using root dir to start du -xh / |egrep "^[0-9\.]+[GT]" # Flat @directory level du -Sh |egrep "^[0-9\.]+[GT]" du -x --max-depth=1 –h du -Shx |egrep "^[0-9\.]+[GT]" # Free Disk Space df -vh |
1 2 3 4 5 6 |
find . -name "*.flv.mp4" | while read file; do echo "$file"; mv "$file" "${file%.flv.mp4}.mp4" #mv "$file" "$(expr "$file" : '\(.*\)\.flv.mp4').mp4" done; |
1 |
cat ~/.bash_aliases |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
alias pj='ps -fA|grep java' # pdf viewer alias v='qpdfview' # open browser alias b='x-www-browser' # check space left in drives alias space='df -h' # open password gorilla alias pw='password-gorilla' # Show hidden files alias l.='ls -d .* --color=auto' # cd .. aliases alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias .......='cd ../../../../../..' alias ........='cd ../../../../../../..' alias .........='cd ../../../../../../../..' alias ..........='cd ../../../../../../../../..' alias .2='cd ../..' alias .3='cd ../../..' alias .4='cd ../../../..' alias .5='cd ../../../../..' alias .6='cd ../../../../../..' alias .7='cd ../../../../../../..' alias .8='cd ../../../../../../../..' alias .9='cd ../../../../../../../../..' alias .10='cd ../../../../../../../../../..' alias .11='cd ../../../../../../../../../../..' # history grab alias hig='history|grep ' alias sz="du -ch $@| egrep '[0-9]+[\.KMGT]\stotal'|awk '{print \$1;}'" # Grabs the disk usage in the current directory #alias usage='du -ch | grep total' #Gets the total disk usage on your machine alias totalusage='df -hl --total | grep total' # Shows the individual partition usages without the temporary memory values alias partusage='df -hlT --exclude-type=tmpfs --exclude-type=devtmpfs' # Gives you what is using the most space. Both directories and files. Varies on # current directory alias most='du -hsx * | sort -rh | head -10' # shadowbq December 17, 2012 at 2:08 pm # # usage is better written as alias usage='du -ch 2> /dev/null |tail -1' alias mkdir='mkdir -pv' # Create a new set of commands alias path='echo -e ${PATH//:/\\n}' # current date now alias now='date +"%T' alias nowtime=now alias nowdate='date +"%d-%m-%Y"' # Show open ports #Use netstat command to quickly list all TCP/UDP port on the server: alias du1='du -h -d 1' alias ports='netstat -tulanp' # find files using locate - sudo apt-get install locate alias lo='locate -i -b --regex' # ls aliases alias lf='ls -alF --color=auto' alias la='ls -al --color=auto' alias ll='ls -l --color=auto' alias l='ls -l --color=auto' alias lh='ls -lh --color=auto' alias cls='clear' # ls look into directories above alias l1='ls -l ..' alias l2='ls -l ../..' alias l3='ls -l ../../..' alias l4='ls -l ../../../..' alias l='ls -alF --color=auto ' alias ls='ls --color=auto' alias dir='ls -l --color=auto' # go to home directory alias h='cd ~' alias home='cd ~' # beep - why or why do you want to make noise ? just fun :) alias beep='echo -en "\007"' # delete directories alias rd='rm -rf' # create directory alias md='mkdir -p' alias o='less' alias t='tail -f ' # hash alias rehash='hash -r' #alias unmount='echo "Error: Try the command: umount" 1>&2; false' #alias which='type -p' #alias you='su - -c "/sbin/yast2 online_update"' # some more ls aliases # sudo apt-get install -y iotop alias io='sudo iotop -Pao' alias upd='sudo apt-get update -y' alias af='sudo apt-get -f' alias ar='sudo apt-get -y autoremove' # apt-get install shortcut alias i='sudo apt-get install -y' # apt-get remove shortcut alias u='sudo apt-get remove -y' # check if a particular process is running alias p='ps -ef|egrep -v "grep --color=auto"|egrep --color' # kill a process alias k='sudo killall -I -r ' #alias kk='sudo kill -KILL ' #alias pk='sudo pkill -i -f ' #alias rm="mv -t ~/.Trash" #alias rm="mv -bt ~/.local/share/Trash/files/" #alias rm='mkdir -p ~/.Trash;mv -t ~/.Trash' #alias rm='mkdir -p ~/.Trash;mv -n -b -t ~/.Trash' # use trash command for all deletes - avoids false deletes # sudo apt-get install -y python-setuptools trash-cli alias rm='trash-put' # check blocked network port alias bp='sudo netstat -lnptu|grep ' |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Install the gnome-fallback-session and Xfce sudo apt-get install gnome-session-fallback xfce4 -y # Check if the new sessions have been actually installed ls -ail /usr/share/xsessions total 48 drwxr-xr-x 2 root root 4096 2012-04-15 11:55 ./ drwxr-xr-x 307 root root 12288 2012-04-15 11:55 ../ -rw-r--r-- 1 root root 233 2011-12-04 22:15 gnome-classic.desktop -rw-r--r-- 1 root root 205 2011-12-04 22:15 gnome.desktop -rw-r--r-- 1 root root 277 2011-12-04 22:15 gnome-fallback.desktop -rw-r--r-- 1 root root 188 2011-12-04 22:15 gnome-shell.desktop -rw-r--r-- 1 root root 208 2011-12-04 22:15 ubuntu-2d.desktop -rw-r--r-- 1 root root 185 2011-12-04 22:15 ubuntu.desktop -rw-r--r-- 1 root root 5808 2011-09-23 13:21 xfce.desktop # select Xfce as default GUI sudo /usr/lib/lightdm/lightdm-set-defaults -s xfce # logout /usr/bin/gnome-session-quit --no-prompt |
1 |
sudo pip install pylibmc |
1 |
sudo apt-get install -y beanstalkd |
1 2 3 4 5 |
# install python-pip sudo apt-get install -y python-pip # install cql driver sudo pip install cql |
1 |
vmstat 1 |
1 2 |
sudo apt-get install -y htop sudo htop |
1 2 |
sudo apt-get install -y atop sudo atop |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# add cassandra sources to /etc/apt/sources.list.d/cassandra.sources.list # cassandra version 21x sudo tee /etc/apt/sources.list.d/cassandra.sources.list <<_EOF_ deb http://www.apache.org/dist/cassandra/debian 21x main deb-src http://www.apache.org/dist/cassandra/debian 21x main _EOF_ # check if file written properly #cat /etc/apt/sources.list.d/cassandra.sources.list # add apache cassandra keys gpg --keyserver keyserver.ubuntu.com --recv-keys 4BD736A82B5C1B00 gpg --export --armor 4BD736A82B5C1B00 | sudo apt-key add - gpg --keyserver keyserver.ubuntu.com --recv-keys F758CE318D77295D gpg --export --armor F758CE318D77295D | sudo apt-key add - #sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4BD736A82B5C1B00 # update repository sudo apt-get update # install sudo apt-get install -y cassandra # More sane default configurations - the default 50% free memory allocation is too much for me if [ "`grep 'MAX_HEAP_SIZE="' /etc/default/cassandra`" == "" ] ; then sudo tee -a /etc/default/cassandra <<"_EOF_" # Set the Max Memory used by Cassandra, change to whatever value you like MAX_HEAP_SIZE="700M" HEAP_NEWSIZE="200M" # Performance Tuning # see also : http://wiki.apache.org/cassandra/PerformanceTuning JVM_OPTS="$JVM_OPTS -XX:+UseThreadPriorities" # To lower compaction priority JVM_OPTS="$JVM_OPTS -XX:ThreadPriorityPolicy=42" # To lower compaction priority JVM_OPTS="$JVM_OPTS -Dcassandra.compaction.priority=1" # To lower compaction priority JVM_OPTS="$JVM_OPTS -XX:+UseCompressedOops" # enables compressed references, reducing memory overhead on 64bit JVMs _EOF_ fi; # restart Cassandra sudo service cassandra restart # check Cassandra status sudo service cassandra status sudo /etc/init.d/cassandra status # in case of errors, check the cassandra log files ls -l /var/log/cassandra/ #total 7228 #-rw------- 1 root root 3193386 Apr 10 14:33 output.log #-rw------- 1 cassandra cassandra 4194769 Apr 10 14:33 system.log # less /var/log/cassandra/system.log # Optional - Get Version Info about the running Cassandra Instance # 1. check Cassandra version using nodetool (best option) nodetool -h localhost version # 2. check Cassandra version using debian package manager dpkg -s cassandra |grep Version # 3. check Cassandra version using cassandra-cli and expect module sudo apt-get install -y expect expect -c "spawn cassandra-cli;expect \"exit\";send \"quit;\r\n\";" |
1 |
find . -mtime +30 -exec rm {} \; |
1 |
cd - |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# download and dbeaver mkdir -p ~/build/dbeaver cd ~/build/dbeaver # download wget http://dbeaver.jkiss.org/files/dbeaver_2.1.1_amd64.deb sudo dpkg -i dbeaver_2.1.1_amd64.deb # link beaver executable sudo ln -s /usr/share/dbeaver/dbeaver /usr/local/bin/dbeaver # download jdbc drivers - which also include support Cassandra # also wget http://dbeaver.jkiss.org/files/driver-pack-2.1.1.zip unzip driver-pack-2.1.1.zip -d driver-pack sudo cp -r driver-pack/* /usr/share/dbeaver # start DBeaver dbeaver # No user/password needed for test installation of cassandra |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# create download directories mkdir -p ~/build/jetty cd ~/build/jetty # download version="9.0.0.v20130308" wget -O jetty-distribution-$version.tar.gz "http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-$version.tar.gz&r=1" # extract the archive - creates directory jetty-distribution-.... tar -xvf jetty-distribution-$version.tar.gz # rename jetty directory sudo mv jetty-distribution-$version /usr/local # create jetty user sudo useradd -U -s /bin/false jetty # Copy Jetty script to run as service sudo chown -R jetty:jetty /opt/jetty # move jetty.sh to init.d sudo cp /opt/jetty/bin/jetty.sh /etc/init.d/jetty # create /etc/default/jetty sudo sh -c ' printf " JAVA_HOME=/usr/java/default # Path to Java NO_START=0 # Start on boot JETTY_HOST=0.0.0.0 # Listen to all hosts JETTY_PORT=8080 # Run on this port JETTY_USER=jetty # Run as this user " > /etc/default/jetty' # make webapps writable sudo chmod o+w /etc/default/jetty/webapps # check if the installation settings are ok /opt/jetty/bin/jetty.sh check # Start Jetty as service sudo service jetty start # Start Jetty as service sudo service jetty stop # the server runs on the default port of 8080 # http://localhost:8080/ # To let Jetty automatically start on reboot execute sudo update-rc.d jetty defaults # deploy an app cd myapp.war /opt/jetty/webapps #In case port conflicts, you can check wich application is blocking port 8080 sudo netstat -lnptu|grep ":8080" # monitor jetty log files ls -l /opt/jetty/logs |
1 2 |
zip -r mydir.zip mydir zip -r mydir.zip /home/myuser/mydir |
1 2 |
sudo add-apt-repository -y ppa:e2defrag/ppa sudo add-apt update |
1 |
sudo apt-get install -y eclipse |
Fixes many missing library errors
1 2 3 4 |
if [ "`grep '/usr/local/lib' /etc/ld.so.conf`" == "" ] ; then sudo sh -c ' printf "\n/usr/local/lib" >> /etc/ld.so.conf'; fi; sudo ldconfig |