cd ~/compile #wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz rm -r ~/compile/node-v0.10.30 tar xvzf node-v0.10.30.tar.gz cd ~/compile/node-v0.10.30 find . -type f -exec sed -i s/”\/usr\/bin\/bash”/”\/ffp\/bin\/bash”/ {} \; find . -type f -exec sed -i s/”\/usr\/bin\/sh”/”\/ffp\/bin\/sh”/ {} \; find . -type f -exec sed -i s/”\/usr\/bin\/env”/”\/ffp\/bin\/env”/ […]
Month: October 2014
Linux commands
prints current path pwd network traffic info: #processes using 80 and 443 ports netstat -tulpn | grep -P “:80|443” sudo nmap localhost sudo nmap -T4 -A -v localhost download with curl curl -L -k https://ghost.org/zip/ghost-latest.zip -o ghost.zip scan/checks USB harddisk: […]
Linux uname command
Find linux version uname -a Linux nsa310 2.6.31.8 2 Wed Mar 27 16:43:46 CST 2013 armv5tel GNU/Linux
Linux ps command
Listeaza procesele ce in comanda de start a lor cuprind cuvantul polipo: ps -C polipo -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,args ps -C stunnel -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,args ps -C java -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd ps -C httpd -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd ps -C php-cgi -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd Listeaza procesele userului […]
Zyxel NSA310 info
Packages (compiled by me) for Zyxel NSA310: https://adrhc.go.ro/ffp_0.7_packages/packages/ Fonz Fun Plug repositories: fonz http://www.inreto.de/ffp/0.7/arm/PACKAGES.html adrhc https://adrhc.go.ro/ffp_0.7_packages/packages/ Mijzelf http://downloads.zyxel.nas-central.org/Users/Mijzelf/FFP-Stick/packages/0.7/arm Uli rsync://funplug.wolf-u.li/funplug/0.7/arm/packages Uli http://funplug.wolf-u.li/0.7/arm/packages/ -> URL la care vad packages KyleK http://kylek.is-a-geek.org:31337/files/ffp/0.7-arm Memiks http://ffp.memiks.fr/pkg/ barmalej2 http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages https://adrhc.go.ro/pkg/ffp/?0.7/arm,not_chrooted -> info page about Fonz […]
Zyxel NSA310 and Java 8
tar xvzf ejdk-8-fcs-b132-linux-arm-sflt-03_mar_2014.gz cd /ffp/home/root/ejdk1.8.0/bin #Modifica /ffp/home/root/ejdk1.8.0/bin/jrecreate.sh cu “java -Xms128m -Xmx192m”. ./jrecreate.sh –vm client –dest ~/jdk1.8.0-full-cli+ext –no-compression –extension locales,charsets -v ./jrecreate.sh –vm client –dest ~/jdk1.8.0-full-cli –no-compression -v
dos2unix
Conversie dos -> unix recursiva: find . -type f -name “*.sh” -exec dos2unix {} \; Compilare dos2unix: “ENABLE_NLS=” -> inseamna ca se dezactiveaza NLS (altfel pur si simplu nu gaseste ceva de libintl) make prefix=/ffp ENABLE_NLS=
Ubuntu: Enabling the root account
Enabling the Root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo. If you really need a persistent Root login, the best alternative is to simulate […]
Linux kill command
pkill cupsd kill pidof cupsd
-> pidof transmission-daemon
e ok dar pidof transmission
nu e ok kill pidof "Plex Media Server"
kill pgrep transmission
-> pgrep transmission
e ok dar pgrep transmission-daemon
nu e ok kill `ps ax -o pid,args […]
Mysql command line
connecting to exifweb database: mysql -u exifweb -p use exifweb insert into AppConfig values (null, ‘false’, ‘cpu summary: use sum on ps aux command’, now()); exit or CTRL+D # https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-intro-connspec-mylogin.cnf.html # avoid warning for commands like: mysql -u root […]
Mysql backup
mysqldump –ignore-table=exifweb.Image –databases exifweb –skip-comments -u root –password > 2014-08-28\ exifweb.sql mysqldump -u root –password exifweb Image > 2014-08-28\ exifweb\ Image\ only.sql mysqldump -u root –password –databases exifweb > 2014-08-28\ exifweb.sql mysqldump -u root –password exifweb | gzip > exifweb.sql.gz […]
Mysql EXPLAIN select
EXPLAIN EXTENDED select albumcover0_.id as id15, albumcover0_.dirty as dirty25, albumcover0_.imageHeight as imageHei35, albumcover0_.imageWidth as imageWid45, albumcover0_.imgName as imgName55, albumcover0_.name as name65 from v_albumcover albumcover0 order by albumcover0_.name DESC
CPU information
Processor information (cpu info): cat /proc/cpuinfo CPU count: wc -l /proc/net/softnet_stat Features: swp half thumb fastmult edsp /bin/dmesg | grep ‘ARM’ http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean gcc -march=native -mtune=native -Q -O2 –help=target http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/javase-embedded-downloads-2209751.html ARMv5 Linux – Headless EABI, SoftFP ABI, Little Endian3 The MarvellĀ® […]
Compiling memcached
cd $HOME/compile wget http://memcached.org/files/memcached-1.4.21.tar.gz tar xvzf memcached-1.4.21.tar.gz cd $HOME/compile/memcached-1.4.21 #export PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin:/ffp/opt/ejre1.7.0_60/bin export LDFLAGS=”-L/ffp/lib -lintl” export CPPFLAGS=”-I/ffp/include -I/ffp/include/readline -DLINUX” export CXXFLAGS=”-I/ffp/include -I/ffp/include/readline” export CFLAGS=”-march=armv5te -mtune=xscale -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall” export LC_ALL=POSIX export PKG_CONFIG=/ffp/bin/pkg-config ./configure –help > configure.help.txt ./configure –prefix=/ffp […]