Display only files and folders that are symbolic links in tcsh or bash
Find all the symbolic links in a directory: ls -l `find /usr/bin -maxdepth 1 -type l -print` For the listing of hidden files: ls -ald .*
Find all the symbolic links in a directory: ls -l `find /usr/bin -maxdepth 1 -type l -print` For the listing of hidden files: ls -ald .*
You can use the command line tool dos2unix dos2unix input Or use the tr command: tr -d ‘\r’ <input >output Actually, you can do the file-format switching in vim: Method A: :e ++ff=dos :w ++ff=unix :e! Method B: :e ++ff=dos :set ff=unix :w EDIT If you want to delete the \r\n sequences in the file, … Read more
If the string is in a variable: $ foo=”header. stuff. more stuff” $ echo “${foo##*. }” more stuff If there are multiple instances of “. ” (as in my example) and you want everything after the first occurrence, instead of the last, just use one #: $ echo “${foo#*. }” stuff. more stuff
Try to keep sed commands simple as much as possible. Otherwise you’ll get confused of what you’d written reading it later. #!/bin/bash sed “s/’/ /g” myfile.txt
Do you need to use ls? You can use find to do the same: find . -maxdepth 1 -perm -111 -type f will return all executable files in the current directory. Remove the -maxdepth flag to traverse all child directories. You could try this terribleness but it might match files that contain strings that look … Read more
Use system from within awk: awk ‘{ system(“openssl s_client -connect host:port -cipher ” $1) }’ ciphers.txt
You should not use libcxxabi directly. To my understanding it is a kind of platform abstraction library, providing low level functions needed to implement libcxx. If you are asking about using libcxx or libstdc++, the differences are mostly the license, newer standard version completeness (the clang project seems slightly faster in implementing recent C++ revisions) … Read more
X11 is no longer included with OS X: https://support.apple.com/en-us/HT201341 X11 server and client libraries for OS X are available from the XQuartz project: http://xquartz.macosforge.org/ I’m not sure if it includes all the other X goodies like Xvfb. In that case you could compile it yourself; with these options: –disable-xquartz –enable-xvfb –enable-xnest –enable-kdrive More info here: … Read more
On Linux mmap2 is a sensible system call to use for this at a low level. It takes 6 arguments, so in IA32 you can call it using: mov eax, 192 ; mmap2 xor ebx, ebx ; addr = NULL mov ecx, 4096 ; len = 4096 mov edx, $7 ; prot = PROT_READ|PROT_WRITE|PROT_EXEC mov … Read more
1. Yes, you are right, one of the places to look is the kernel bug tracker. Searching the Linux kernel mailing list as well as the subsystem-related mailing lists could also be helpful but is probably more difficult. 2. The main kernel mailing list is here. You can find subscription instructions there. 3. There is … Read more