The best ways to run all files from a folder in SqlPLus
Create a file and store all of the file names from the folder:
ls -l > list.sql
Edit and set @ before each file name
vi list.sql

sqlpus ich/foo@mydb

Convert latin1 to UTF-8 in MySQL
$ mysqldump -h localhost –user=myName -p –default-character-set=latin1 -c \
–insert-ignore –skip-set-charset dbname > dump.sql
$ iconv -f ISO-8859-1 -t UTF-8 dump.sql > dump_utf8.sql

Find out which charset is my file

$ iconv -f 8859-1 -t utf-8 FILE1> FILE2
$ iconv -f utf-8 -t 8859-1 FILE2 > FILE3
$ diff FILE1 FILE3

apt-get –purge remove NameOfPackage
apt-get install –reinstall NameOfPackage
apt-get –purge –reinstall install apache2.2-common apache2
apt-get install –reinstall libapache2-mod-php5 php5-cli php5-common php5-cgi

dpkg-reconfigure xserver-xorg
update-alternative -config x-session-manager

lpstat -t
lpadmin -p lj -E


wget -c –user=user –password=passwd http://hostname…

find -name ‘*.[ch]’ | xargs grep -E ‘expr’
find -type f -print0 | xargs -r0 grep -F ‘example’

find . -exec grep “use GD” ‘{}’ /dev/null \; -print
find . -name “*.pl” -type f -exec grep “use GD” ‘{}’ /dev/null \; -print

Only get diffs. Do multiple times for troublesome downloads:
rsync -P rsync:// file

1 Comment on “Linux commands

  1. If you rewrite all those files back, then upnaditg loses it meaning, also it can break plugin if author did some changes in that files and they’re used some other places. Can’t remember any of them right now, but in general it can be done. Mar 12 at 13:08

Leave a Reply

Your email address will not be published. Required fields are marked *