Difference between revisions of "Private:Technical"
From NMSL
Line 1: | Line 1: | ||
− | + | == Java == | |
− | [http://stackoverflow.com/questions/1339855/how-can-i-read-a-file-with-both-ascii-and-another-encoding-in-java-cleanly How Can I read a file with both ASCII and another encoding in Java cleanly?] | + | * [http://stackoverflow.com/questions/1339855/how-can-i-read-a-file-with-both-ascii-and-another-encoding-in-java-cleanly How Can I read a file with both ASCII and another encoding in Java cleanly?] |
− | [http://www.cs.usfca.edu/~parrt/course/601/lectures/io.html Java I/O] | + | * [http://www.cs.usfca.edu/~parrt/course/601/lectures/io.html Java I/O] |
− | + | == SSH and SCP == | |
− | [http://www.howtogeek.com/wiki/Fixing_%22WARNING:_UNPROTECTED_PRIVATE_KEY_FILE!%22_on_Linux Fixing "WARNING: UNPROTECTED PRIVATE KEY FILE!" on Linux] | + | * [http://www.howtogeek.com/wiki/Fixing_%22WARNING:_UNPROTECTED_PRIVATE_KEY_FILE!%22_on_Linux Fixing "WARNING: UNPROTECTED PRIVATE KEY FILE!" on Linux] |
− | [http://www.madboa.com/geek/openssl/#key-removepass Using OpenSSL to remove a passphrase from a key] | + | * [http://www.madboa.com/geek/openssl/#key-removepass Using OpenSSL to remove a passphrase from a key] |
− | + | == Linux == | |
− | [http://www.debianadmin.com/providing-root-privileges-for-users-using-sudo.html Providing root privileges for users Using SUDO] | + | * [http://www.debianadmin.com/providing-root-privileges-for-users-using-sudo.html Providing root privileges for users Using SUDO] |
− | [http://www.manpagez.com/man/1/iconv/ iconv command man pages] | + | * [http://www.manpagez.com/man/1/iconv/ iconv command man pages] |
− | [http://www.fileformat.info/tip/linux/iconv.htm Using iconv to change character encodings] | + | * [http://www.fileformat.info/tip/linux/iconv.htm Using iconv to change character encodings] |
− | [http://linuxshellaccount.blogspot.com/2008/10/using-iconv-to-convert-character-sets.html Using iconv to convert character sets on Linux and Unix] | + | * [http://linuxshellaccount.blogspot.com/2008/10/using-iconv-to-convert-character-sets.html Using iconv to convert character sets on Linux and Unix] |
− | [http://linux.die.net/man/1/enca Detect and convert encoding of text files using enca] | + | * [http://linux.die.net/man/1/enca Detect and convert encoding of text files using enca] |
− | [http://ubuntuforums.org/showthread.php?t=273057 Check what group user belongs to?] | + | * [http://ubuntuforums.org/showthread.php?t=273057 Check what group user belongs to?] |
− | [http://my.brandeis.edu/bboard/q-and-a-fetch-msg?msg_id=0000Ug grep on all the files in a directory] | + | * [http://my.brandeis.edu/bboard/q-and-a-fetch-msg?msg_id=0000Ug grep on all the files in a directory] |
+ | Use one of the greps (grep, egrep, fgrep). You want to use the -r "recursive" option to search a directory and all files included within it. | ||
− | + | <pre> | |
+ | grep -r -i ONOCR /usr/include | ||
− | [ | + | [nsl@nsl]$ grep -r -i ONOCR /usr/include |
+ | /usr/include/asm/termbits.h:#define ONOCR 0000020 | ||
+ | /usr/include/linux/cdk.h:#define FO_ONOCR 0x8 | ||
+ | /usr/include/linux/tty.h:#define O_ONOCR(tty) _O_FLAG((tty),ONOCR) | ||
+ | /usr/include/bits/termios.h:#define ONOCR 0000020 | ||
+ | </pre> | ||
− | + | The '-i' means ignore case. So if you only wanted it in all capitals you would not use it. When used it will find any combination of upper and lower case. | |
− | [http://blog.juliankamil.com/article/18/using-iconv-against-windows-notepad Using iconv against Windows Notepad] | + | == OS Compatibility Issues == |
+ | |||
+ | * [http://www.websiterepairguy.com/articles/os/crlf.html How to Transfer Text Files Between Linux, Mac, and Windows] | ||
+ | |||
+ | * [http://linuxreviews.org/quicktips/txt_doc2unix/ Converting text files between Windows and UNIX] | ||
+ | |||
+ | * [http://blog.juliankamil.com/article/18/using-iconv-against-windows-notepad Using iconv against Windows Notepad] |
Revision as of 04:05, 23 September 2009
Java
SSH and SCP
Linux
Use one of the greps (grep, egrep, fgrep). You want to use the -r "recursive" option to search a directory and all files included within it.
grep -r -i ONOCR /usr/include [nsl@nsl]$ grep -r -i ONOCR /usr/include /usr/include/asm/termbits.h:#define ONOCR 0000020 /usr/include/linux/cdk.h:#define FO_ONOCR 0x8 /usr/include/linux/tty.h:#define O_ONOCR(tty) _O_FLAG((tty),ONOCR) /usr/include/bits/termios.h:#define ONOCR 0000020
The '-i' means ignore case. So if you only wanted it in all capitals you would not use it. When used it will find any combination of upper and lower case.