Filename length limits on linux?

See the Wikipedia page about file systems comparison, especially in column Maximum filename length. Here are some filename length limits in popular file systems: BTRFS 255 bytes exFAT 255 UTF-16 characters ext2 255 bytes ext3 255 bytes ext3cow 255 bytes ext4 255 bytes FAT32 8.3 (255 UCS-2 code units with VFAT LFNs) NTFS 255 characters … Read more

What does ‘set -e’ do, and why might it be considered dangerous?

set -e causes the shell to exit if any subcommand or pipeline returns a non-zero status. The answer the interviewer was probably looking for is: It would be dangerous to use “set -e” when creating init.d scripts: From http://www.debian.org/doc/debian-policy/ch-opersys.html 9.3.2 — Be careful of using set -e in init.d scripts. Writing correct init.d scripts requires … Read more

What does Virtual memory size in top mean?

Virtual memory isn’t even necessarily memory. For example, if a process memory-maps a large file, the file is actually stored on disk, but it still takes up “address space” in the process. Address space (ie. virtual memory in the process list) doesn’t cost anything; it’s not real. What’s real is the RSS (RES) column, which … Read more

How do I sleep for a millisecond in bash or ksh

Bash has a “loadable” sleep which supports fractional seconds, and eliminates overheads of an external command: $ cd bash-3.2.48/examples/loadables $ make sleep && mv sleep sleep.so $ enable -f sleep.so sleep Then: $ which sleep /usr/bin/sleep $ builtin sleep sleep: usage: sleep seconds[.fraction] $ time (for f in `seq 1 10`; do builtin sleep 0.1; … Read more

SSL Certificate Location on UNIX/Linux

For system-wide use, OpenSSL should provide you /etc/ssl/certs and /etc/ssl/private. The latter of which will be restricted 700 to root:root. If you have an application that doesn’t perform initial privilege separation from root, then it might suit you to locate them somewhere local to the application with the relevantly restricted ownership and permissions.

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