Egy jó kis MySql backup script:
http://sourceforge.net/projects/automysqlbackup/
A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features - Backup mutiple databases - Single backup file or to a seperate file for each DB - Compress backup files - Backup remote servers - E-mail logs - More..
A következő címkéjű bejegyzések mutatása: script. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: script. Összes bejegyzés megjelenítése
2009. október 18., vasárnap
2009. július 21., kedd
Legfrissebb fájl másolása
Szükségem volt egy olyan scriptre, amely a legfrissebb fájlt átmásolja úgy, hogy a cél egy fix fájlnév legyen (Windows XP alatt).
cd "target_dir"
FOR /F "delims=|" %%I IN ('DIR "*.BAK" /B /O:D') DO SET NewestFile=%%I
echo %NewestFile% > legujabb.txt
copy /Y %NewestFile% legujabb.BAK2
DIR parancs kapcsolói:
/B: Egyszerű formátum (nincs fejléc-információ és összegzés)
/O:D Sorbarendezés dátum szerint (régiektől)
cd "target_dir"
FOR /F "delims=|" %%I IN ('DIR "*.BAK" /B /O:D') DO SET NewestFile=%%I
echo %NewestFile% > legujabb.txt
copy /Y %NewestFile% legujabb.BAK2
DIR parancs kapcsolói:
/B: Egyszerű formátum (nincs fejléc-információ és összegzés)
/O:D Sorbarendezés dátum szerint (régiektől)
2009. július 17., péntek
Linux script (Escapes in Regular Expressions)
GNU Extensions for Escapes in Regular Expressions
The list of these escapes is:
\a
Produces or matches a bel character, that is an “alert” (ascii 7).
\f
Produces or matches a form feed (ascii 12).
\n
Produces or matches a newline (ascii 10).
\r
Produces or matches a carriage return (ascii 13).
\t
Produces or matches a horizontal tab (ascii 9).
\v
Produces or matches a so called “vertical tab” (ascii 11).
\cx
Produces or matches Control-x, where x is any character. The precise effect of `\cx' is as follows: if x is a lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus `\cz' becomes hex 1A, but `\c{' becomes hex 3B, while `\c;' becomes hex 7B.
\dxxx
Produces or matches a character whose decimal ascii value is xxx.
\oxxx
Produces or matches a character whose octal ascii value is xxx.
\xxx
Produces or matches a character whose hexadecimal ascii value is xx.
`\b' (backspace) was omitted because of the conflict with the existing “word boundary” meaning.
Other escapes match a particular character class and are valid only in regular expressions:
\w
Matches any “word” character. A “word” character is any letter or digit or the underscore character.
\W
Matches any “non-word” character.
\b
Matches a word boundary; that is it matches if the character to the left is a “word” character and the character to the right is a “non-word” character, or vice-versa.
\B
Matches everywhere but on a word boundary; that is it matches if the character to the left and the character to the right are either both “word” characters or both “non-word” characters.
\`
Matches only at the start of pattern space. This is different from ^ in multi-line mode.
\'
Matches only at the end of pattern space. This is different from $ in multi-line mode.
The list of these escapes is:
\a
Produces or matches a bel character, that is an “alert” (ascii 7).
\f
Produces or matches a form feed (ascii 12).
\n
Produces or matches a newline (ascii 10).
\r
Produces or matches a carriage return (ascii 13).
\t
Produces or matches a horizontal tab (ascii 9).
\v
Produces or matches a so called “vertical tab” (ascii 11).
\cx
Produces or matches Control-x, where x is any character. The precise effect of `\cx' is as follows: if x is a lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus `\cz' becomes hex 1A, but `\c{' becomes hex 3B, while `\c;' becomes hex 7B.
\dxxx
Produces or matches a character whose decimal ascii value is xxx.
\oxxx
Produces or matches a character whose octal ascii value is xxx.
\xxx
Produces or matches a character whose hexadecimal ascii value is xx.
`\b' (backspace) was omitted because of the conflict with the existing “word boundary” meaning.
Other escapes match a particular character class and are valid only in regular expressions:
\w
Matches any “word” character. A “word” character is any letter or digit or the underscore character.
\W
Matches any “non-word” character.
\b
Matches a word boundary; that is it matches if the character to the left is a “word” character and the character to the right is a “non-word” character, or vice-versa.
\B
Matches everywhere but on a word boundary; that is it matches if the character to the left and the character to the right are either both “word” characters or both “non-word” characters.
\`
Matches only at the start of pattern space. This is different from ^ in multi-line mode.
\'
Matches only at the end of pattern space. This is different from $ in multi-line mode.
2009. július 14., kedd
Futtatás másként parancssorból
Windows XP, Vista alatt van egy érdekes parancs: runas
Ezen parancs segítségével az aktuális felhasználótól eltérő user nevében lehet futtatni parancsot (nem kell átjelentkezni)
Példák:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
A runas parancs érdekes alternatívája a cpau freeware program.
Ezzel job-okat hozhatunk létre, kódolhatjuk a jelszót, stb.:
Command line tool for starting process in alternate security context. Basically this is a runas replacement. Also allows you to create job files and encode the id, password, and command line in a file so it can be used by normal users.
Ezen parancs segítségével az aktuális felhasználótól eltérő user nevében lehet futtatni parancsot (nem kell átjelentkezni)
Példák:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
A runas parancs érdekes alternatívája a cpau freeware program.
Ezzel job-okat hozhatunk létre, kódolhatjuk a jelszót, stb.:
Command line tool for starting process in alternate security context. Basically this is a runas replacement. Also allows you to create job files and encode the id, password, and command line in a file so it can be used by normal users.
2009. június 15., hétfő
Nyitott fájlok lekérdezése
Nyitott fájlok lekérdezése:
http://www.nirsoft.net/utils/opened_files_view.html
Windows XP-ben már van egy openfiles parancs,
de ez a freeware többet tud.
- Grafikus és parancssoros felülete is van.
- Többféle kimenete van (xml, html, text, ...)
- Képes lezárni bizonyos fájlokat
- Szűrhetünk fájlnévre, processnévre
(/filefilter, /processfilter )
Rendszergazdai jog kell mindkét program futtatásához.
Windows XP openfiles parancsának használatához,
ha szeretnénk látni a helyileg megnyitott fájlokat is,
akkor ki kell adni a "openfiles /local on" parancsot,
majd újra kell indítani a gépet.
http://www.nirsoft.net/utils/opened_files_view.html
Windows XP-ben már van egy openfiles parancs,
de ez a freeware többet tud.
- Grafikus és parancssoros felülete is van.
- Többféle kimenete van (xml, html, text, ...)
- Képes lezárni bizonyos fájlokat
- Szűrhetünk fájlnévre, processnévre
(/filefilter
Rendszergazdai jog kell mindkét program futtatásához.
Windows XP openfiles parancsának használatához,
ha szeretnénk látni a helyileg megnyitott fájlokat is,
akkor ki kell adni a "openfiles /local on" parancsot,
majd újra kell indítani a gépet.
Feliratkozás:
Bejegyzések (Atom)