Log in
پنج شنبه,۲۸ ارديبهشت ماه ۱۳۹۱مطابق با
٢٥ جمادى الثانى ۱۴۳۳هجرى قمرى

3rd
AUG
Linux Tips
Posted by admin under Linuxi:
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
1,$s/^/@/
sqlpus ich/foo@mydb
@list.sql
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
z.B:
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
cancel
lpadmin -p lj -E
PSI=’\u@\h:\n$’
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://rsync.server.com/path/to/file file
***
Edit & change your local ~/.ssh/config file and if the host key verification failed then:
ssh -p 2601 -u
or
ssh -p 2601
Search and replace the new hostname in all local files:
find . -type f | xargs perl -pi -e ‘s/sourceforge.old/sourceforge.new/g’
***
Post your comment
Archives:
- Remove Old Kernels in Ubuntu
- Mercurial & hg view
- jPortal wordpress theme
- WordPress Careers plugin
- Check For Email pattern
- WordPress ODLinks Plugin
- WordPress Classifieds Plugin
- Clean up the Ubuntu
- » Domain and Whois lookup
- » Internet Service Provider (ISP)
- » Java Tips
- » increase the screen resolutions
- » ISP Software List
- » Check For Email pattern
- » Internet protocols
- » Clean up the Ubuntu
- » Mercurial & hg view
- » ISP Hardware list
- » Remove Old Kernels in Ubuntu
Categories:
Links
- (IE)HTML - اديتور به فارسي و لاتين
- Online Graphic Plotter
- Online scientific calculator
- تقويم ساليانه
- تبديل کُدهای رايج
- تبدیل تاریخ شمسی به میلادی
- فارسی نويس
- تبديل خط فينگليش به فارسى





