Downloading all the files in a directory with cURL

If you’re not bound to curl, you might want to use wget in recursive mode but restricting it to one level of recursion, try the following; wget –no-verbose –no-parent –recursive –level=1 \ –no-directories –user=login –password=pass ftp://ftp.myftpsite.com/ –no-parent : Do not ever ascend to the parent directory when retrieving recursively. –level=depth : Specify recursion maximum depth … Read more

Pass private key password to openvpn command directly in Ubuntu 10.10 [closed]

In my openvpn.conf: … askpass /etc/openvpn/jdoe.pass <<< new line here ca /etc/openvpn/jdoe_ca.crt cert /etc/openvpn/jdoe.crt key /etc/openvpn/jdoe.key … The file /etc/openvpn/jdoe.pass just contains the password. You can chmod this file to 600. This method save my life… 😉 Ubuntu 12.04.4 LTS OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built … Read more

How to check if a file is binary?

Use utility file, sample usage: $ file /bin/bash /bin/bash: Mach-O universal binary with 2 architectures /bin/bash (for architecture x86_64): Mach-O 64-bit executable x86_64 /bin/bash (for architecture i386): Mach-O executable i386 $ file /etc/passwd /etc/passwd: ASCII English text $ file code.c code.c: ASCII c program text file manual page

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)