title: Why are interactive shells on OSX login shells by default?

text: In Linux and, to my knowledge, all Unix systems, terminal emulators run interactive, non-login shells by default. This means that, for bash, the started shell will: > When an interactive shell that is not a login shell is started, bash reads > and executes commands from `/etc/bash.bashrc` and `~/.bashrc`, if these > files exist. This may be inhibited by using the `\--norc` option. > > The `\--rcfile` file option will force bash to read and execute commands > from file instead of `/etc/bash.bashrc` and `~/.bashrc`. And for login shells: > When bash is invoked as an interactive login shell, or as a non-interactive > shell with the `\--login` option, it first reads and executes commands from > the file `/etc/profile`, if that file exists. After reading that file, it > looks for `~/.bash_profile`, `~/.bash_login`, and `~/.profile`, in that > order, and reads and executes commands from the first one that exists and is > readable. > > The `\--noprofile` option may be used when the shell is started to inhibit > this behavior. On OSX, however, the default shell (which is bash) started in the default terminal (Terminal.app) actually sources `~/.bash_profile` or `~.profile` etc. In other words, it acts like a login shell. **Main question** : Why is the default interactive shell a login shell on OSX? Why did OSX choose to do this? This means that all instructions/tutorials for shell based things that mention changing things in `~/.bashrc` will fail on OSX or vice versa for `~/.profile`. Still, while many accusations can be leveled at Apple, hiring incompetent or idiotic devs is not one of them. Presumably, they had a good reason for this, so why? Subquestions: Does Terminal.app actually run an interactive login shell or have they changed bash's behavior? Is this specific to Terminal.app or is it independent of the terminal emulator?


title: Debian doesn't boot after plugging new graphics card

text: Recently, I've replaced a basic ATI card to NVIDIA GeForce 750 Ti. Windows 8.1 and Ubuntu work fine, but Debian cannot even boot. After selecting standard boot: ![After standard boot](http://i.stack.imgur.com/MxdOS.jpg) And after boot in recovery mode: ![After boot in recovery mode](http://i.stack.imgur.com/jqvXu.jpg). I suppose that the nouveau would be the culprit, so I've downloaded the original Nvidia closed-source drivers' *.run file. Unfortunately, I can't install them since there is no access to CLI. How to solve my problem?


title: Auto answering password for OPENSSL using HEREDOC

text: I have the following command but it doesn't work for me...               cd /etc/postfix/ssl/ && openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 <<PASS     password     password     PASS      The output is:               109 semi-random bytes loaded     Generating RSA private key, 1024 bit long modulus     ...............................++++++     ...........++++++     e is 65537 (0x10001)     Enter pass phrase for smtpd.key:      It should auto answer the question and put password automaticaly. I always use `HEREDOC` for automating my Q&A on bash and work fine... What is the problem here? May be because of security issues, but how can we deal with such issues? I also know about this question but not able to resolve it. I am trying this one: (no result)               #!/bin/bash     PASS="password"     printf '%s\n' "$PASS" | {         openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 -passout fd:3     } 3<&0      any ideas?


title: Prevent the mouse to wake up display

text: I set my displays to sleep with `xset dpms force off` after locking the screen with kscreenlock. This is great, the displays wake up when the mouse is moved (by me, air, the cat). I'd like to set it in a way that only the keyboards can wake up the screens again. Is there some way to do this for the KDE screen locker or in general?


title: Is there a distribution with an installer that can automatically do LVM over LUKS with everything aligned as needed?

text: http://www.void.gr/kargig/blog/2012/01/11/linux-ssd-partition-alignment-tips/ talks about aligning SSD partitions and LVM physical volumes. http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best- performance-using-parted/ refers to getting various parameters to be used in alignment. I'm looking for a distro with an installer to do all of this automatically after I specify the partition sizes. It doesn't matter which one it is, as I can install something else afterwards. Thanks!


title: FreeBSD switch to user with nologin

text: I am running FreeBSD jails. i have a user i need to login as to run some commands. The user shell account is nologin. Without switching the users shell. or running su commands for each command i need to run. is there a way to switch to that user in shell? or should i enable shell account and then disable it?


title: why do we not need export here?

text: $ IFS=";"          $ read first second      i am;a_i b c     $ echo $first     i am     $ echo $second     a_i b c          $ echo $IFS        1. Am I right that `read first second` is a subprocess of the current shell process? If yes, why don't we need `export IFS=";"`?   2. why is `IFS` empty?


title: Should I embed a command in a conditional or test its return code?

text: It's a simple question of best pratices: Which should I use? Option 1               ping -c1 "$host"          if [[ $? -eq 0 ]] ; then        command     else        command     fi      Option 2               if ping -c1 "$host" ; then        command     else        command     fi      I know this is a simple command, but if it grows big, the difference might be significant.


title: Crunchbang Linux Waldorf: Sound Problems with NVIDIA Corporation MCP61 High Definition Audio (rev a2)

text: $ lspci | grep -i audio     00:05.0 Audio device: NVIDIA Corporation MCP61 High Definition Audio (rev a2)     02:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device aab0          $ sudo speaker-test          speaker-test 1.0.25          Wiedergabe-Gerät ist default     Stream-Parameter sind 48000 Hz, S16_LE, 1 Kanäle     Verwende 16 Oktaven rosa Rauschen     Kanal-Anzahl 1 nicht unterstützt: Das Argument ist ungültig     Fehler beim Setzen der Hardware-Parameter: Das Argument ist ungültig      I unmuted everything and independed is on in alsamixer, still it doesn't work. The Chip is VIA VT1705. Update 2014/09/10: It seems I got it works with kernel 3.13...


title: How can I scroll screen or tmux buffer without pausing the application?

text: I want to have the same behavior as `C-A`/`C-B`+`[` provides except i want to be able to return to my application to see that it has progressed in her calculations or has not disconnected to the server because of timeout. I've been told it's impossible because applications tend to keep modifying the buffer, but can't this be circumvented by, uh, actually modifying the buffer, or creating a temporary buffer?


title: How to design the table in awk?

text: My input file is file1               count  month          505  Apr-2010      252  Mar-2010      426  Feb-2010      201  Jan-2010      211  Dec-2009       Same file I want the output like this below               +-------+----------+     | count | month    |     +-------+----------+     |   505 | Apr-2010 |     |   252 | Mar-2010 |     |   426 | Feb-2010 |     |   201 | Jan-2010 |     |   211 | Dec-2009 |     +-------+----------+      I need your help.


title: Why is my keyboard typing the wrong letters?

text: While surfing with Iceweasel, I tried typing in a Web address, but I found, that every few keys, it started typing other letters instead of the ones I typed. For example, if I typed "c-c-c-c-c-c-c-c-c-c-c-c" it printed "ckexccccckex" or if I typed "a-b-c-d-e-f-g-h-j-i", it printed "abckexghi" instead.   * Each time this occurs, the misplaced letters are different, but always in some pattern. Sometimes, it places backspaces or spaces, not just letters.   * When I did not type anything, no words appeared.   * When I unplugged and replugged the USB keyboard, it still had the problem.   * The problem only appears in Iceweasel, in the URL bar or in text fields, but not in other applications.   * The problem went away after closing Iceweasel and reopening it.   * I can find no pattern in when it appears. How can I determine the cause? Could this be the result of a security issue? I am using Debian 7.0 with a Logitech K120 keyboard.


title: Awesome GNOME recognizes my media keys but fails to act upon them

text: I'm using Awesome GNOME. When I log into the GNOME Shell, my up and down volume keys work. When I login to Awesome GNOME, they don't. However, when I go into `gnome-control-center` to set them, the Keyboard section recognizes them just fine when I go to bind the keys to the volume actions. Basically I think what's happening is that GNOME understands the keys but doesn't have anything running to act upon them. How can I make Awesome GNOME work with the media keys? Note that I'm on Arch Linux, so I'm using GNOME 3.8 and Awesome 3.5.1 Ruby Tuesday. I'm using the `awesome-gnome` package from Arch's AUR. Also, the play/pause key doesn't work, but I didn't test this in the GNOME Shell.


title: Delete all files starting with a question mark

text: I have a folder in which I have around 4k files. Some of these files start with a a `?` or `!` character. I need to delete them but can't find an expression that would do so: `rm -f ./?*` just deletes everything. I can possibly use `grep` on ls and pipe it through `xargs` and move files to another folder but I was hoping there was a proper way of doing this. Need help on both the `?` and `!` files.


title: Compiling bitcoind on OpenBSD

text: The instructions to build bitcoind are vague enough, but I can't work out what to do on OpenBSD. I've installed boost, and the system has berkeley db 4.6, OpenSSL, etc already in the base install of OpenBSD.               # gmake -f makefile.unix                                  Building LevelDB ...     gmake[1]: Entering directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'     g++ -I. -I./include -fno-builtin-memcmp -D_REENTRANT -DOS_OPENBSD -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/bitcoin/bitcoin-0.8.3/src -I/root/bitcoin/bitcoin-0.8.3/src/obj -I/usr/local/include/boost -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/include -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c db/builder.cc -o db/builder.o     In file included from ./port/port.h:14,                  from ./db/filename.h:14,                  from db/builder.cc:7:     ./port/port_posix.h:80: error: '__BYTE_ORDER' was not declared in this scope     ./port/port_posix.h:80: error: '__LITTLE_ENDIAN' was not declared in this scope     gmake[1]: *** [db/builder.o] Error 1     gmake[1]: Leaving directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'     gmake: *** [leveldb/libleveldb.a] Error 2      Since writing I found I didn't have BDB 4.8 so I got it and compiled it into /usr/local/BerkeleyDB.4.8 I found some build instructions on github: https://github.com/bitcoin/bitcoin/pull/1815 I modified these as follows to suit where I installed BDB...               BOOST_INCLUDE_PATH=/usr/local/include \     BOOST_LIB_PATH=/usr/local/lib \     BDB_INCLUDE_PATH=/usr/local/BerkeleyDB.4.8/include \     BDB_LIB_PATH=/usr/local/BerkeleyDB.4.8/lib \     BOOST_LIB_SUFFIX=-mt \     gmake -f makefile.unix -j8 USE_UPNP= bitcoind test_bitcoin      Now the build fails, it looks boost related. There are hundreds of errors until some final ones...               db.cpp:510: error: 'boost' has not been declared     db.cpp:510: error: expected `;' before 'pathTmp'     db.cpp:511: error: 'pathTmp' was not declared in this scope     db.cpp:527: error: 'pathAddr' was not declared in this scope     db.cpp:527: error: 'RenameOver' cannot be used as a function     db.cpp: In member function 'bool CAddrDB::Read(CAddrMan&)':     db.cpp:536: error: 'pathAddr' was not declared in this scope     gmake: *** [obj/alert.o] Error 1     gmake: *** [obj/db.o] Error 1     gmake: *** [obj/checkpoints.o] Error 1


title: Remote SSH user always gets "connection closed"

text: I've tried `service sshd restart`, I've added `sshd:all:allow` to my `/etc/allow.hosts` and the remote user tried `rm ~/.ssh/known_hosts`. I also checked the logs: `cat /var/logs/secure | grep ssh` and it says `Accepted password for $user from ...` This is the first time this particular user has tried connecting but other users have successfully connected to my machine for several days. None of this has worked or pointed me to the error. Any ideas? Edit: I SSH-d into his machine to see if I could get an error log or something by SSH-ing back to me. If I use `ssh -vvv $host` I get various messages, one of which is `Unspecified GSS failure. Minor code may provide more information`. Here's the complete error log (hostnames and IPs left out):               OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to some_host [XX.XX.XX.XX] port 22.     debug1: Connection established.     debug1: identity file /home/ssr/.ssh/identity type -1     debug3: Not a RSA1 key file /home/ssr/.ssh/id_rsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'Proc-Type:'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'DEK-Info:'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /home/ssr/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/ssr/.ssh/id_dsa type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9     debug1: match: OpenSSH_5.9 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug3: Wrote 792 bytes for a total of 831     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug3: Wrote 24 bytes for a total of 855     debug2: dh_gen_key: priv key bits set: 132/256     debug2: bits set: 509/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug3: Wrote 144 bytes for a total of 999     debug3: check_host_in_hostfile: filename /home/ssr/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 8     debug3: check_host_in_hostfile: filename /home/ssr/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 9     debug1: Host 'xxx' is known and matches the RSA host key.     debug1: Found key in /home/ssr/.ssh/known_hosts:8     debug2: bits set: 502/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug3: Wrote 16 bytes for a total of 1015     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug3: Wrote 48 bytes for a total of 1063     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/ssr/.ssh/identity ((nil))     debug2: key: /home/ssr/.ssh/id_rsa (0x20d2d350)     debug2: key: /home/ssr/.ssh/id_dsa ((nil))     debug3: Wrote 64 bytes for a total of 1127     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password     debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password     debug3: authmethod_lookup gssapi-keyex     debug3: remaining preferred: gssapi-with-mic,gssapi,publickey,keyboard-interactive,password     debug3: authmethod_is_enabled gssapi-keyex     debug1: Next authentication method: gssapi-keyex     debug1: No valid Key exchange context     debug2: we did not send a packet, disable method     debug3: authmethod_lookup gssapi-with-mic     debug3: remaining preferred: gssapi,publickey,keyboard-interactive,password     debug3: authmethod_is_enabled gssapi-with-mic     debug1: Next authentication method: gssapi-with-mic     debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found          debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found          debug1: Unspecified GSS failure.  Minor code may provide more information               debug2: we did not send a packet, disable method     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Trying private key: /home/ssr/.ssh/identity     debug3: no such identity: /home/ssr/.ssh/identity     debug1: Offering public key: /home/ssr/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug3: Wrote 368 bytes for a total of 1495     Connection closed by $my.ip (no, don't want to share)      Another edit: other users seem to be able to connect. My version is: `OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012`. His is older, as can bee seen from the error log. New log


title: Canon Pixma MG4150 not working on Arch Linux

text: I’m trying to install a Canon Pixma MG4150 multifunction printer on Arch Linux 3.5.4-1-ARCH x86_64. The device is not working out of the box, I didn’t find anything about this printer on Google for a Linux system. Although, I found the PPD file for MG4100 (`canonmg4100.ppd`) and set it in CUPS, but it still doesn’t work. I tried to print the test page and a PDF document, the device doesn’t even react. Here is the AUR packages I tried to install:               extra/libxpm 3.5.10-1     extra/pixman 0.26.2-1     aur/cnijfilter-mx410 3.50-1      The `lsusb`:               Bus 001 Device 003: ID 04a9:1753 Canon, Inc.      CUPS doesn’t show me any error messages but I don’t know if we can get any extra debug informations. I don’t know what to do to get this printer working. Thanks.


title: Execute a process in the current pane, redirecting stdio to/from the pane

text: GNU Screen has a command called `exec` that will launch a subprocess and optionally let you do things with its file descriptors, including tying them in your window. I frequently use `:exec !! sx -b /tmp/file` to send a file over a serial link using the xmodem protocol. I'm looking for the same functionality in tmux so I can move away from screen without having to use minicom's (or picocom's, etc,) function for sending files.


title: Extracting column from comma separated text

text: I have a long comma-separated delimited file with 20K lines. Here's a sample:               "","id","number1","number2","number3","number4","number5","number6","number7"     "1","MRTAT_1of3.RTS",17.1464602742708,17.1796255746079,17.1132949739337,0.996138996138996,-0.0055810322632996,1,1     "2","MRTAT_2of3.RTS",3.88270908946253,6.13558056235995,1.62983761656512,0.265637065637066,-1.91247162787182,0.718084341158075,1     "3","MRTAT_3of3.RTS",3.87323328936623,1.22711611247199,6.51935046626046,5.31274131274131,2.40945646701554,0.676814519398334,1      I want to print like the columns with id, number4, number5 and number 6 with tab-delimited setting the condition number4 is greater than 4.0. Here's some sample output:               id         number4           number5           number6     MRTAT_3of3.RTS 5.31274131274131  2.40945646701554  0.676814519398334


title: Too large cache causes disks to grind, I/O to drop

text: This is a followup question to my earlier problem. In short I was experiencing massive I/O drops together with not-so-violent disk grinding, and with help I found out that the big caches were the problem. Now I'm trying to find a solution to it. I'm running a daily updated 32bit Debian testing on a computer with 16GB RAM, 120GB SSD and two 1TB HDDs. SSD stores read-heavy of the distribution and one of the 1TB disks store /var /tmp /media and other write heavy parts including a part of my home folder. 2nd HDD is a pure file storage. Everything is EXT4 formatted. The distribution's nominal RAM usage is 1 to 1.5GB. Remaining RAM is converted to cache at kernel's discretion. After cache grows beyond a point, I/O performance drops massively (from ~90MB/sec to ~5MB/sec). Dropping caches solves the problem but only temporarily. What can be the reason? While I'm a developer and a former cluster admin, caching is beyond my knowledge at this point.


title: What is a regular file?

text: $ rm foobar     rm: remove regular file `foobar'?      What does it mean for a file to be "regular" and why does `rm` treat such a file as a special case?


title: What keeps happening to my desktop icons?

text: I'm using Linux Mint 13 Cinnamon for an HTPC. When it originally boots, the desktop icons look like this: ![enter image description here](http://i.stack.imgur.com/lUyX1.jpg) After I come back to it some time later, the desktop icons have changed and they look like this: ![enter image description here](http://i.stack.imgur.com/njrTg.png) Does anyone know why this is happening? Is something crashing? I realize I'm being kind of vague, which is why I made sure to provide screenshots on this one.


title: iptables: rules for tftp server

text: I have a tftp server which listens on standard `UDP` port `69`. I have added following rule to my `iptables` to block everything except `UDP 69`.               -A INPUT -i eth0 -s 192.168.1.0/24 -p udp -m udp --dport 69 -j ACCEPT     -A INPUT                                                    -j   DROP      But with this rule the clients cannot access the tftp server. I have read that `tftp` is using higher port for the actual transfer (similar to `ftp`) and that I should use the `ip_conntrack_tftp` module.               # zcat /proc/config.gz  | grep -i tftp     CONFIG_NF_CONNTRACK_TFTP=m      I have the module in my kernel, but what else do I need to do?


title: RAID 1 + 0, Solaris 10

text: I create the meta devices: > >     metainit d102 1 1 /dev/dsk/c1t2d0s6 >     metainit d103 1 1 /dev/dsk/c1t3d0s6 >     metainit d104 1 1 /dev/dsk/c1t4d0s6 >     metainit d105 1 1 /dev/dsk/c1t5d0s6 >   then I make the mirrors : > >     metainit d120 -m d102 >     metattach d120 d104 >   >     metainit d121 -m d103 >     metattach d121 d105 >   and least, I want to make the stripe with : > metainit d130 1 2 d120 d121 and the system answers : d120 is a metadevice. metainit seems to want only a physical component ! So how can I create RAID 1 + 0


title: Why does only one network adapter ever get DHCP IP address?

text: I am using a Panda Board which is running a build of Angstrom. The Panda Board has an in build Ethernet port and this is working fine, getting a DHCP address successfully. I am going to be housing it in a larger container than the one supplied, which won't give me access to the internal port, so I am trying to use a USB Network Adapter. Angstrom correctly identifies the adapter but it never gets a DHCP address. I've tried connecting both and just the USB one, but only the internal one will ever get an address. Can someone help me? I'm new to linux! Output of `ifconfig -a`:               eth0      Link encap:Ethernet  HWaddr 2A:40:E0:FD:3B:0A                 inet addr:172.17.33.163  Bcast:172.17.33.255  Mask:255.255.255.128               UP BROADCAST RUNNING MULTICAST  MTU:1492  Metric:1               RX packets:112 errors:0 dropped:0 overruns:0 frame:0               TX packets:59 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:14645 (14.3 KiB)  TX bytes:11844 (11.5 KiB)          eth2      Link encap:Ethernet  HWaddr 00:0E:C6:88:F7:C6                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:62 errors:0 dropped:0 overruns:0 frame:0               TX packets:14 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:7116 (6.9 KiB)  TX bytes:4844 (4.7 KiB)          lo        Link encap:Local Loopback                 LOOPBACK  MTU:16436  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)          wlan0     Link encap:Ethernet  HWaddr 2A:00:E0:FD:3B:0A                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      The contents of `/etc/network/interfaces`:               wlan0     iface wlan0 inet dhcp         wpa-conf /etc/wpa_supplicant.conf         wpa-driver wext                     iface atml0 inet dhcp          # Wired or wireless interfaces     auto eth0     iface eth0 inet dhcp          auto eth1     iface eth1 inet dhcp          auto eth2     iface eth2 inet dhcp          auto eth3     iface eth3 inet dhcp          # Ethernet/RNDIS gadget (g_ether) or LAN9514     usb0     iface usb0 inet dhcp          usb1     iface usb1 inet dhcp          usb2     iface usb2 inet dhcp          usb3     iface usb3 inet dhcp          # Bluetooth networking     iface bnep0 inet dhcp


title: Putting a warning flag on a particular version

text: I have 4 versions of a file 1.21, 1.22, 1.23 and 1.24. After a month of time I came to know that the version 1.22 and 1.23 have some errors in them. Now I don't want anyone to use those versions. One way to solve it is to delete those versions, but I don't want to delete them. I just want to know a way so that if anyone checkout those obsolete versions they should get a warning or custom message that "don't use this version, this version has some problems". Is there any way to do this? Let me know, thanks.


title: Being not admin user how to install local GCC instead of provided?

text: So I came into my classrom Debian is installed, and gcc 4.1. I want to install (compile from sources is an option - I have time..) for my self GCC 4.7 and adress it in bash as gcc anywhere. Is such thing possible and how to do it?


title: Is it possible to install Windows and Linux on the same partition?

text: Just wonder is it possible to install Windows and Linux on a ntfs partition and have both OSes share a root filesystem as either one is booted? Then the partition will have /bin, /sbin, /home, /lib and "Program Files" ,"Windows" and "Document and Settings" in the same place! Will Windows and Linux both be bootable in this file system layout?


title: How to remove trailing whitespace at the end of the line in given files (more than one)?

text: I'm sooo fed up with useless spaces in source files that I've even configured vim to show them. The problem is that I'm very often (if not always) have to deal with useless spaces with my mates developpers. I'd just like to scan source files (given a regular expression) and remove whitespaces from all given files. I've search around the web ("bash remove whitespace" etc.) but did not find something useful.


title: What is the difference between reboot , init 6 and shutdown -r now?

text: I just want to know difference between in   * `reboot`   * `init 6`   * `shutdown -r now` and which is the safest and the best?


title: Predict filename before downloading from a URL, in shell script

text: I have a shell script that downloads files from a list using `wget`, and resumes automatically if there is any non-critical error (because of unstable WIFI during storms). The problem is, I want to write to a `filename.part` file and then remove the .part extension once completed (overwriting and such are handled at that point). This works for simple urls like `http://myserver.org/myfile.doc`, but completely fails to guess a filename like `http://myserver.org/index.php?file_id=foo`. (my method would try to write to `index.php.part` instead of the desired result) I can have wget get the "final" filename automatically and write to it, but that won't let me use the `-O` option to save with a different extension, it leaves no control. So my question is, is there any standard way (or tool) to get the "final" filename in a download URL so I can write to a file with the same name but an added extension? (using `-O` in wget or `-o` in curl, such as `wget $URL -O "$URL_GUESSED_FILENAME.part"`) My tools are either wget or curl, no preference even if I currently use wget. Alternatively, if there's a way to do it in Python, I can accept that too.


title: Binary compatibility between Mac OS X and Linux

text: Brace yourselves, this question will likely appear naive and/or foolish, seeing as I am relatively new to the inner workings of unix like systems, and programming in general. Ready? Ok! I will go through about 3 levels of ludicrosity, increasing as I go along. * * * We have two systems with similar hardware (main point being the processor, let us say a standard intel core 2 duo). One is running (insert your linux distro here: Ubuntu will be used henceforth), and the other is running let's say Mac OS X. One compiles an equivalent program, Let us say something like:               int main()     {         int cat = 33;         int dog = 5*cat;         return dog;     }      The code is extremely simple, because I don't want to consider the implications of shared libraries yet. When compiled on the respective systems. Is not the main difference between the output a matter of ELF vs Mach-O? If one were to strip each binary of the formatting, leaving a flat binary, wouldn't the disassembled machine instructions be the same? (with perhaps a few differences depending on the compilers habits/tendencies). **1.)** If one were to develop a program to repackage the flat binary produced from our Ubuntu system, in the Mach-O formatting, would it run in the Mac OS X system? Then, if one only had the compiled binary of the supposed program above, and one had this mystical tool for repackaging flat binaries, would simple programs be able to run on the Mac OS X system? * * * Now let us take it a bit further. We now have a program with source such as:               #include <stdio.h>     int main()     {         printf("I like tortoises, but not porpoises");         return 0;     }      **2.)** Assuming this program is compiled and statically linked, would our magical program still be able to repackage the raw binary in the Mach-O format and have it work on mac os X? Seeing as it would not need to rely on any other binaries, (for which the mac system would not have in this case) * * * And now for the final level; **3.)** What if we used this supposed program to convert all of the necessary shared libraries to the Mach-O format, and then instead compiled the program above with dynamic linking. Would the program still succeed to run? That should be it for now, obviously each step of absurdity relies on the previous base, to even make sense. so If the very first pillar gets destroyed, I doubt there would be much merit to the remaining tiers. I definitely would not even go as far as to think of this with programs with GUI's in mind. Windowing systems would likely be a whole other headache. I am only considering command line programs at this stage. Now, I invite the world to correct me,and tell me everything that is wrong with my absurd line of thinking.


title: How to know how long a process has been running?

text: > **Possible Duplicate:**   >  How to check how a long a program has been running? I am interested in doing this purely using bash.


title: Odd problem regarding 'apt-get update'

text: I was having some serious network troubles, and now running `sudo apt-get update` gives this error:               ...     Hit ftp://ftp.is.co.za experimental/contrib i386 Packages     Reading package lists... Error!     E: Encountered a section with no Package: header     E: Problem with MergeList /var/lib/apt/lists/ftp.is.co.za_debian_dists_testing_main_binary-i386_Packages     E: The package lists or status file could not be parsed or opened.      It's an odd one because I've never seen it before. Have you experienced it? How can I fix it?


title: Duplicate bash prompts

text: I'm having an interesting issue with XFCE Terminal/Gnome Terminal (not reproducible in XTerm), where executing `bash` or logging in using `login` or `su` will open a new Bash instance inside a Bash instance as shown: `_randall@manbearpig:/home/randall[root@manbearpig randall]#` Ctrl+D and exit both exit back to the original bash instance. How do I make these terminal emulators behave like Xterm, which opens the new user account or bash instance over the original one?


title: keyboard shortcut over vnc not working

text: I'm not sure if my issue is with linux or vnc or both. I'm running on a system with centos which I'm VNCing into. I want to be able to toggle between windows inside the linux box, but I want alt-tab to still work on my home desktop as well. Previously I fixed this by going into keyboard shortcuts and setting the "move between windows, using a popup window" hotkey to "alt-q", which I've learned to use as my linux toggle key. This worked fine on my old box, but I just switched over to a new box. I do the same steps, when I'm able to set the shortcut in keyboard shortcuts. However, the shortcut doesn't actually work. I think that they key stroke "alt+q" is getting through VNC, or else I wouldn't be able to set it in keyboard shortcuts. However, if that's the case I don't know why centos doesn't just work. do I need to restart some service that handles hotkeys to detect the changes?


title: Why did an update to gnome-terminal break my system-colours and how do I fix it?

text: I am on arch-linux and just upgraded to the latest version of `gnome- terminal`. I used to have both the terminal colour and theme set by `gnome- tweak-tool` having `Global Dark Theme` turned on. Does anyone know how to change this back without downgrading my terminal. You can see here what the terminal now looks like, and a window that looks correct. ![example showing the problem](http://i.stack.imgur.com/SJzz7.png) I downgraded my terminal to the last one that did not do this, so the problem is somewhere between: gnome-terminal 3.12.0-1 and 3.10.2-1 (3.10.2-1 is the working one, these are from the arch package manager).


title: Installing CPAN dists not in the Arch repos

text: There's a lot of CPAN distributions in the Arch repositories, but not all of them. How should I handle a situation when I need a dist that is not already in the repos? Should I use the `cpan` program then, or is there a better solution?


With GDB, I can remotely debug the Linux kernel. lldb, which promises to completely replace GDB, should be able to remotely debug the Linux kernel too. However, I cannot find any tutorial about this topic. Can I use lldb to remotely debug the Linux kernel?


title: How to change tty login prompt?

text: To be clear, I am not referring to `/etc/issue` (shown before the prompt) or `/etc/motd` (shown after login), but the prompt itself, which is currently               hostname login:      For good measure, I am running Arch Linux, but I believe the answer will likely be cross-distro.


title: Bash: How do I move my cursor to the left a word-at-a-time?

text: In OSX I can just hold down the `option` key and press the left cursor key until I get to the word I need to edit (or in Vi I can just hit `b`, but I haven't been able to figure out how to do this in Terminal yet...


anisha@linux-y3pi:~/> google-earth      ./googleearth-bin: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory          anisha@linux-y3pi:~/> locate libGL     /opt/google/earth/free/libGLU.so.1     /usr/lib64/libGL.so     /usr/lib64/libGL.so.1     /usr/lib64/libGL.so.1.2     /usr/lib64/libGLU.so.1     /usr/lib64/libGLU.so.1.3.070802          anisha@linux-y3pi:~/> uname -a     Linux linux-y3pi 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux      > > On OpenSUSE, try zypper in Mesa-32bit to install the 32 bit version of the > library.               linux-y3pi:# zypper in Mesa-32bit     Retrieving repository 'google-chrome' metadata [\]     Failed to download /repodata/repomd.xml from http://dl.google.com/linux/chrome/rpm/stable/x86_64     Abort, retry, ignore? [a/r/i/?] (a): r     Retrieving repository 'google-chrome' metadata [|]     Failed to download /repodata/repomd.xml from http://dl.google.com/linux/chrome/rpm/stable/x86_64     Abort, retry, ignore? [a/r/i/?] (a): i     Retrieving repository 'google-chrome' metadata [error]     Repository 'google-chrome' is invalid.     Can't provide /repodata/repomd.xml : User-requested skipping of a file     Please check if the URIs defined for this repository are pointing to a valid repository.     Warning: Disabling repository 'google-chrome' because of the above error.     Retrieving repository 'google-earth' metadata [/]     Failed to download /repodata/repomd.xml from http://dl.google.com/linux/earth/rpm/stable/i386     Abort, retry, ignore? [a/r/i/?] (a): r     Failed to download /repodata/repomd.xml from http://dl.google.com/linux/earth/rpm/stable/i386     Abort, retry, ignore? [a/r/i/?] (a):


title: What is the scheme for textual representation of keystrokes in screen?

text: How can I derive the character sequence that represents a certain keystroke in screen? I mean, what bind takes as input. For instance, 's' represents the obvious keystroke on the 's' key. 'S' represents 'shift+s'. But the representation of other more complex combinations are unclear to me and the scheme that is followed seems quite obscure. I have searched all around and asked before what the representation would be for the particular case 'tab' and 'shift+tab', but I couldn't find the answer. So I guess the best is to try to understand the general scheme. I have also seen this, but it's now working for me. Can someone explain what scheme/rules screen follows for this? What are the rules to derive the representation of any arbitrary key combination? And are they screen specific, or shared with other software? Other GNU software maybe? Where is this documented?


title: No default output device -9996: playing sound through Django

text: I'm facing a problem with my Raspberry Pi while playing a sound through a web page. The page is built in with Django and is quite simple: you push on a button and a sound is played (a Python script is executed). I tested it on a Debian 7 in a VirtualBox environment successfully, but then I decided to move to my Pi. Everything went ok but when I click on the "play" button, I receive a 500 error with the following message: > IOError at /alarma/triggerAlarm [Errno Invalid output device (no default > output device)] -9996 Request Method:                 GET Request URL: ttp://localhost/alarma/triggerAlarm Django Version:  1.5.4       Exception Type: **IOError Exception Value: [Errno Invalid output device (no default output device)] -9996 Exception**       Location: /usr/local/lib/python2.7/dist-packages/pyaudio.py in __init__, line 442 Python          Executable:   /usr/bin/python Python Version: 2.7.3 Python Path:          ['/var/www/webapps/example_django/example',           '/var/www/webapps/example_django/bin',           '/usr/local/lib/python2.7/dist-packages',           '/var/www/webapps/example_django/example', '/usr/lib/python2.7',           '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',           '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',           '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']           Server time: Sat, 19 Oct 2013 17:39:54 +0200      I tried to play the file by hand in the python console without any problems, but when I try to do it through django it seems it can't. I think the problem is related with this: > Ouput from aplay -L:               null     Discard all samples (playback) or generate zero samples (capture)     sysdefault:CARD=ALSA     bcm2835 ALSA, bcm2835 ALSA     Default Audio Device      I searched in Google and tried several solutions like create an asound.conf file in the home directory, but none of them worked out. I really don't understand why sound is working from the aplay command and the python shell but no while the python script is excuted by Django.


title: How to install FileZilla on CentOS?

text: I downloaded _FileZilla_ from here Now how to install this on CentOS? I used `yum install filezilla` but it is showing errors like:               Loaded plugins: fastestmirror, refresh-packagekit, security     You need to be root to perform this command.      How can I rectify this error?


title: bash script is trying to execute a variable

text: I have a very short Bash script, like this:               variable="3 things"     if $(echo $variable|grep "^[0-9]\{1,\}") #if $variable begins with [0-9]     then         echo $(echo $variable|sed 's/ .*$//')     else         echo "0"     fi      `$variable` will eventually be the output of a command which will be a string beginning with either a number or the word "No ". I want the script to return just the number or else the digit 0. I'm getting the error, `script.bash: line 2: 3: command not found` and I don't understand why bash is trying to execute "3" as a command. Any insight would be appreciated (or suggestions on better ways to write this---I'm not good with bash script). Thanks


title: Using FC 19 - How can I interact with very long menus?

text: I am using FC 19 with the default Gnome setup. Assuming this is Gnome shell, some version 3. Some common apps have very long menus. An easy example is Gedit and the languages menu. This is so large that it is taller than my desktop. I have looked in gconf-editor, and have searched the internet - I cannot find a way to get either a scrollbar, or columns or some other way to see all the options in the menu. How can I see and select options in this long menu?


title: Use of find in unix on strange file/directory names

text: Im a beginner scripter, writing scripts in tcsh and csh (these are taught in my course). I'm writing a script which uses find for putting path of directories this is the part of the script:               set list = (`find $PATH -type d`)      It works fine until the file or directory names aren't named such as:               fi@@lename&& or −filename or :−,?!drectoryanem!-      These special characters I couldn't handle, I changed the find script to:               set list = ("`find $PATH -type d`")      but none of these works, when I want to use the path from the list in this next script:               foreach i ($list:q)        foreach file (`find "$i" -maxdepth 1 -type f`)        ....        end     end      it couldn't handle these special file names, so I get many errors like find:               −."!filenda no such filename or directory


title: Install MySQL workbench on ubuntu

text: I am using **Ubuntu 9.10 - the Karmic Koala** - released in October 2009 I downloaded **mysql-workbench-gpl-5.2.33b-1ubu1004-i386.deb** from here But when I run this package it show me following error:               Error: Dependency is not satisfiable: libatk1.0-0 (>= 1.29.3)      I am new to ubuntu. I have tried many packages but unable to install MySQL Workbench. How can I install it on my ubuntu... Thanks


title: What do '+b#' packages versions mean in Debian?

text: Today I checked out my upgrades and saw 63 upgrades in Debian testing. Fine. I got curious because most of them are held back, so I used `-V` to see the versions. To my surprise, most of them where upgrading to `+b1` or `+b2` versions. Like a good boy I do `apt-get changelog libc6` (yeah, that one is important) just to see that the changelog has no `+b1` version. So, what are these versions for?               sudo apt-get -V upgrade     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages have been kept back:        gdm3 (3.4.1-9 => 3.4.1-9+b1)        libalgorithm-diff-xs-perl (0.04-2+b2 => 0.04-2+b3)        libapt-pkg-perl (0.1.29 => 0.1.29+b1)        libcairo-perl (1.103-2 => 1.103-2+b1)        libclass-c3-xs-perl (0.13-1+b2 => 0.13-1+b3)        libclone-perl (0.34-1 => 0.34-1+b1)        libcrypt-blowfish-perl (2.14-1 => 2.14-1+b1)        libcrypt-openssl-bignum-perl (0.04-4 => 0.04-4+b1)        libcrypt-ssleay-perl (0.58-1 => 0.58-1+b1)        libdbd-mysql-perl (4.023-1 => 4.023-1+b1)        libdbi-perl (1.628-1 => 1.628-1+b1)        libdigest-crc-perl (0.18-1+b1 => 0.18-1+b2)        libdigest-md4-perl (1.9+dfsg-1 => 1.9+dfsg-1+b1)        libfile-fcntllock-perl (0.14-2 => 0.14-2+b1)        libfile-fnmatch-perl (0.02-1+b2 => 0.02-1+b3)        libglib-perl (1.301-1 => 1.301-1+b1)        libgtk2-perl (1.247-2 => 1.247-2+b1)        libhtml-parser-perl (3.71-1 => 3.71-1+b1)        libio-pty-perl (1.08-1+b2 => 1.08-1+b3)        libjson-xs-perl (2.340-1 => 2.340-1+b1)        liblist-moreutils-perl (0.33-1+b1 => 0.33-1+b2)        liblocale-gettext-perl (1.05-7+b1 => 1.05-7+b2)        libmath-bigint-gmp-perl (1.37-2 => 1.37-3)        libnet-dbus-perl (1.0.0-2 => 1.0.0-2+b1)        libnet-dns-perl (0.68-1.1 => 0.68-1.2)        libnet-pcap-perl (0.17-1 => 0.17-1+b1)        libnet-rawip-perl (0.25-1+b2 => 0.25-1+b3)        libnet-ssleay-perl (1.55-1 => 1.55-1+b2)        libpam-systemd (44-12 => 44-12+b1)        libpango-perl (1.224-2 => 1.224-2+b1)        libparams-util-perl (1.07-1 => 1.07-1+b1)        libpurple0 (2.10.7-2 => 2.10.7-2+b1)        libsocket-perl (2.011-1 => 2.011-1+b1)        libsocket6-perl (0.23-1+b2 => 0.23-1+b3)        libsub-name-perl (0.05-1+b2 => 0.05-1+b3)        libsvn1 (1.6.17dfsg-4.1+b1 => 1.7.9-1+nmu4)        libterm-readkey-perl (2.30-4+b2 => 2.30-4+b3)        libterm-readline-gnu-perl (1.20-2+b1 => 1.20-2+b2)        libtext-charwidth-perl (0.04-7+b1 => 0.04-7+b2)        libtext-iconv-perl (1.7-5 => 1.7-5+b1)        libuuid-perl (0.02-5 => 0.02-5+b1)        libxml-libxml-perl (2.0010+dfsg-1 => 2.0010+dfsg-1+b1)        libxml-parser-perl (2.41-1+b1 => 2.41-1+b2)        libyaml-libyaml-perl (0.38-3 => 0.38-3+b1)        perl (5.14.2-21 => 5.18.1-3)        perl-base (5.14.2-21 => 5.18.1-3)        perl-modules (5.14.2-21 => 5.18.1-3)        perl-tk (804.031-1 => 804.031-1+b1)        subversion (1.6.17dfsg-4.1+b1 => 1.7.9-1+nmu4)        systemd (44-12 => 44-12+b1)        vim (7.3.923-3 => 7.3.923-3+b1)        vim-common (7.3.923-3 => 7.3.923-3+b1)        vim-gtk (7.3.923-3 => 7.3.923-3+b1)        xchat (2.8.8-7.1 => 2.8.8-7.1+b1)        xserver-xorg-core (1.12.4-6.1 => 1.12.4-6.2+b1)     The following packages will be upgraded:        libc-dev-bin (2.17-92 => 2.17-92+b1)        libc6 (2.17-92 => 2.17-92+b1)        libc6-dbg (2.17-92 => 2.17-92+b1)        libc6-dev (2.17-92 => 2.17-92+b1)        libc6-i686 (2.17-92 => 2.17-92+b1)                    apt-cache policy libc6     libc6:       Installed: 2.17-92       Candidate: 2.17-92+b1       Version table:          2.17-92+b1 0             500 http://ftp.us.debian.org/debian/ testing/main i386 Packages             500 http://http.debian.net/debian/ jessie/main i386 Packages      *** 2.17-92 0             100 /var/lib/dpkg/status                    apt-get changelog libc6     eglibc (2.17-92) unstable; urgency=low            * kfreebsd/local-sysdeps.diff: update to revision 4839 (from glibc-bsd).           -- Petr Salinger <petr.salinger@seznam.cz>  Wed, 31 Jul 2013 22:38:47 +0100          eglibc (2.17-91) unstable; urgency=low            [ Petr Salinger ]       * switch libpthread implementation on kfreebsd-* to fbtl.         Closes: #703545. Closes: #665287. Closes: #683825. Closes: #489066.       * split some parts of kfreebsd/local-linuxthreads29.diff         into  kfreebsd/local-nscd-no-sockcloexec.diff and               kfreebsd/local-linuxthreads-tlsdesc.diff       * add kfreebsd/local-fbtl.diff and kfreebsd/local-fbtl-depends.diff       * kfreebsd/local-sysdeps.diff: update to revision 4809 (from glibc-bsd).         Closes: #718181. Addresses: #717032 in new binutils.       * update testsuite-checking/expected-results-*-kfreebsd-gnu-*         by fbtl tests that are known to fail.     (snip)


title: diff binary files of different sizes?

text: Is there a neat way to see the difference between two binary files? They are mostly the same, but some bytes are changed, and one of the files has sequences inserted in some places. Diffing the output of `xxd` would work if bytes were only changed, and not inserted.


title: run 'service php5-fpm restart' without using sudo

text: I am integrating my cakephp projects using jenkins. Right now, I am exploring the use of Phing. There is one task where I need to run               service php5-fpm restart      So far I tried to do this manually. I cannot do so unless i do it with `sudo` Please advise how I can execute this command without using sudo at all? I know there is an option where I can simply put the user that Phing is using inside sudoers and then not prompt for password, but for security reasons, that is not ideal. So I prefer to ask how to do this without getting prompted for password.


title: Is tshark using different syntax with wireshark?

text: The filter `!ssh` works in wireshark but not in tshark!, When I do `tshark '!ssh'`, it complains about the filter, so what's wrong here?


title: Can (CUPS) ppd files for Mac OS X be used for linux?

text: I am looking at buying a printer (actually an all-in-one I prefer for the features it provides, but I want to focus on the printer part here) which does not provide linux drivers, but does provide Mac OS X drivers. I know that both operating systems (can) use CUPS for printing. Does this mean that I could copy the ppd (driver) file from the Mac OS X driver package and use it (modified) under linux? When looking into the file, there are Mac OS X print dialog-specific lines such as               *APPrinterIconPath: "/Library/Printers/<path to icons file>.icns"          *APDialogExtension: "/Library/Printers/<path to Mac OS X plugin file>.plugin"          *APAutoSetupTool: "/Library/Printers/<path to autoconfig utility>"      that I think I can safely remove. There are also lines with OS X-specific paths such as               *cupsFilter:        "application/vnd.cups-raster 0 /Library/Printers/<path to filter file>"          *OKDitherLibrary: "/Library/Printers/<path to dither library>.dylib"      that I don't know what to do with. As with the last line, there are quite a number of other lines with keywords starting with 'OK', which I think are vendor-specific, such as               *OKPaperCheckManualFeed_CheckOFF: True          *OKSupportCUPaperSizeCheck: True     *OKSupportCustomManualFeed_CheckOFF: True          *OKSupportPCLMediaTypeUSERTYPE: Yes          *OKSupportMarginCentering: True      which I also don't know what to do with. (As a fallback, given that the printer supports PCL6, I could use the generic driver for that, but then miss out on miss out on possibly interesting functionality.)


title: mint4win.exe doesn't run in Windows 7 64 bit

text: I have been facing an issue with `mint4win.exe`. The package as a whole works since I have driven the OS live using a flash drive. I wanted to install it alongwith Windows 7 but when I try to open mint4win.exe, it doesn't runs. Why?


title: Gnome 3 on FreeBSD 9

text: I recently installed FreeBSD 9-Release and I want to install Gnome 3 after having installed marcuscom ports. However after a long time, it stops with an error in `libgdata`. How can I solve this problem to install Gnome Shell on FreeBSD 9?


title: Simple way to create a tunnel from one local port to another?

text: I have a development server, which is only accessible from 127.0.0.1:8000, not 192.168.1.x:8000. As a quick hack, is there a way to set up something to listen on another port (say, 8001) so that from the local network I could connect 192.168.1.x:8001 and it would tunnel the traffic between the client and 127.0.0.1:8000?


title: Different count for compressed file listing vs directory listing

text: I was taking a backup of a folder, where I used the following command : `sudo tar -zcvf www.tar.gz /var/www/` It successfully compressed, just for verifying the number of files in the compressed archive, and the directory I ran the following commands : `sudo tar -ztvf www.tar.gz | wc -l` -> `186364` `ls -R /var/www | wc -l` -> `196440` How come the count is different, what am I missing ?


title: Create new temporary directory

text: What's an effective way of creating a new `/tmp` directory, that behaves just like `/tmp` (purged on reboot, etc.), but in a different location? In my case, I want to create a `~/dev/tmp` directory where I want to do quick tests, and I want that directory not to bloat and to be automatically emptied. I'm looking for something that could be the most standard and could potentially work in a variety of distributions. Thanks


title: What happens when I plug a Ethernet cable?

text: What happens when I plug in a Ethernet cable? I want to be able to see what's happening on the Level 2/3 (I believe the protocols I'm trying to watch is Ethernet, IP (v4 and v6) and DHCP for IP connections). So, when I plug a cable and the connection is refused, can I try again seeing/debugging what really happen?


title: Is there a way to make perl -i not clobber symlinks?

text: A friend of mine points out that if you do:               perl -pi.bak -e 's/foo/bar/' somefile      when "somefile" is actually a symlink, perl does just what the docs say it will do: > It does this by renaming the input file, opening the output file by the > original name, and selecting that output file as the default for print() > statements. The extension, if supplied, is used to modify the name of the > old file to make a backup copy [...] Which results in a new symlink "somefile.bak" pointing to the unchanged real file, and a new, changed regular file "somefile" with the changes. In many cases, following the symlink would be the desired behavior (even if it leaves the correct location of the .bak file ambiguous). Is there a simple way to do this other than testing for symlinks in a wrapper and handling the case appropriately? (`sed` does the same thing, for what that's worth.)


title: Why is my EC2 server's time off by ~10 seconds every day?

text: I have what I believe is a system file, `/etc/cron.daily/ntpupdate` which runs   `ntpdate ntp.ubuntu.com` daily to sync with the network time. Every day it generates output very similar to this:               /etc/cron.daily/ntpupdate:     16 Jan 06:30:42 ntpdate[21446]:     step time server 91.189.94.4 offset -12.646804 sec      I'm not positive what the `91.189.94.4` means but I'm pretty sure `-12.646804 sec` means that my server is off by around 12 seconds. But I don't know why it is off by around the same amount every day. This is an Amazon EC2 instance running Ubuntu. I can only guess that either it is losing / gaining 12 seconds per day, or something else is syncing the time with another clock that is off by 12 seconds and then I am re-syncing it. What should I do to try and track this down further? I don't see any other cron jobs in the `/etc/cron.*` directories or in the users' cron jobs... **UPDATE** Just thought I'd share that I started running this hourly to see if there would be a big jump at a certain hour. This is what the hourly output is:               16 Jan 15:17:04 ntpdate[8346]:     adjust time server 91.189.94.4 offset -0.464418 sec      So apparently every hour the clock is off by around half a second, so that makes sense that each day (24 hours) the clock would be off by around 12 seconds. Guess the clock is just running fast! Thanks!


title: Virtual Python installation not allowing ez_setup?

text: I don't have root on my system, so I'm trying to create a virtual Python installation. I ran `virtual-python.py`, and it told me to run `ez_setup.py`. I found it online and ran it with the command `virtual-python.py` gave me, and it told me I don't have permission to edit some folder in /Library (which I don't). What would be something I can do instead of this? Also, how could I install py2app in this virtual installation?


title: Set default sound card in Pulse Audio

text: I have two soundcards on my systems and pulseaudio always picks the wrong one. How do I set up the default soundcard in the pulse audio preferences?


title: Looking for an ISO creator

text: I'm looking for a ISO image creator, already tried `isomaster`, but it doesn't work with unicode chars, it just take it as bad chars, so what other tool can I use? I don't need booting, just archive them. (Please don't tell me to use tar or whatever, I'm doing so for reasons)


title: Number of lines outputted by ls

text: When `ls` is called, it outputs all the files/directories in the current directory, attempting to fit as many as possible on each line. Why is it that when passed to `wc -l`, it outputs the number of files? How does it decide how many lines to output its results in?


title: Is there a good command line tool for converting to and from FLAC audio format?

text: Ideally, I want to convert from MP3 to FLAC and back. I also need to be able to script this.


title: Reboot when no network connection does not work!

text: I have a Raspberry Pi that I use as a NAS for my local network. It works fine, but when I turn off the router to which the pi is connected, it permanently loses the connection. To be able to connect to the network again it has to be restarted. Therefore I have written this script:               #!/bin/bash          if ! ping -q -w 1 -c 1 $(ip r | grep default | cut -d ' ' -f 3)     then             service networking restart                  sleep 60                  if ! ping -q -w 1 -c 1 $(ip r | grep default | cut -d ' ' -f 3)             then                     reboot             fi     fi      It basically tries to ping the router. If it fails it restarts the networking service (for when a simple error occurred and a reboot is not necessary). If it then still can't ping to the router it reboots. I set this up as a cronjob every 10 minutes, but it does not work. What am I doing wrong? I put this line in the crontab:               0,10,20,30,40,50 * * * * /root/rebooter.sh >> rebooter.log 2>&1      Whit no connection this is the output:               Usage: ping [-LRUbdfnqrvVaAD] [-c count] [-i interval] [-w deadline]                 [-p pattern] [-s packetsize] [-t ttl] [-I interface]                 [-M pmtudisc-hint] [-m mark] [-S sndbuf]                 [-T tstamp-options] [-Q tos] [hop1 ...] destination     /root/rebooter.sh: Line 5: service: Command not found.     Usage: ping [-LRUbdfnqrvVaAD] [-c count] [-i interval] [-w deadline]                 [-p pattern] [-s packetsize] [-t ttl] [-I interface]                 [-M pmtudisc-hint] [-m mark] [-S sndbuf]                 [-T tstamp-options] [-Q tos] [hop1 ...] destination     /root/rebooter.sh: Line 11: reboot: Command not found.      With connection this is the output:               PING 192.168.178.1 (192.168.178.1) 56(84) bytes of data.          --- 192.168.178.1 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.985/0.985/0.985/0.000 ms


title: Spotlight/Search on Fedora

text: I apologize for the MacOSX reference, but is there an equivalent of Spotlight- Search in Fedora, specifically FC14 x86_64 ?


title: How to send input to a C program using a shell script

text: I have a C program in which I use `scanf` to get user input. Now, I would like to make a .sh script that automatically test this program with pre-defined user input, but I'm not sure how I can send the input every time the program needs it.


title: Reset all groups to default

text: I recently set up some groups and users on my machine, and now I want to remove all those users and all those groups. Somewhat stupidly, I read on an Ubuntu forum or something like that that it was possible to just edit the textfile that contains all the group info. But now, whenever I start a terminal, I get               groups: cannot find name for group ID 1002      which is obviously not The Right Thing. So, how can I remove all the groups and users I created a few months ago?


title: How can I "lazily" read output from xrandr?

text: I have a bash script that I use to adjust my monitor brightness that uses `xrandr --verbose` to get the current brightness. It works fine, but using `xrandr` is kind of slow on my machine, as you can see here:               [PROMPT REDACTED]$ time xrandr --verbose     # xrandr output omitted for brevity     real    0m0.976s     user    0m0.003s     sys     0m0.002s      This outputs lots of information that I don't need, in addition to taking almost a full second. The only line out of the output that I actually need is `Brightness: X`. I am currently using this line to get the value from it:               BRIGHTNESS=`xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1`      _Side note:`head` is called at the end because I have 2 monitors, so I end up with 2 values, but only need 1, since I am keeping them both at the same brightness._ Since I only need that one line from `xrandr --verbose`, I was wondering if there is a way I could "lazily" evaluate it, by doing something like:   * Stopping `xrandr` outputting once it reaches that line   * Ignoring the rest of the output from `xrandr` once I have read that line   * Something else? I realize bash may not be the language best suited for this, so I am open to solutions in other languages as well.


title: recursive 'ls' giving absolute filenames

text: When I do 'ls -R' in a directory, I get something like               ./dir1     dir2 file1.txt file2.txt          ./dir1/dir2     file3.txt file4.txt      but I would like a command that gives me               ./dir1/file1.txt     ./dir1/file2.txt     ./dir1/dir2/file3.txt     ./dir1/dir2/file4.txt      such that I can use it in a for-loop to process all files.


title: MySQL Linux Client Timeout/Keepalive

text: Is there a way to set a keepalive in the command-line MySQL client on Linux? Our network recently moved to a VLAN setup, and our systems department no longer has control of the firewall. The powers-that-be decided to set a rule in their firewall to kill all connections after 30 minutes if no data has passed through (something about having to keep track of connections and limited resources). I have no control over this. As a server admin and programmer, my problem is that this means I can not have a mysql command-line client running in the background while I do programming. If I don't send a query (or otherwise send data), when I try 35 minutes later, the client detects it no longer has a connection. I must reconnect every time. In SSH, I am able to set a keepalive so that I can keep connections open throughout the day. Is there a similar configurable option for the mysql command-line client? I am having trouble finding anything, because "Mysql Keepalive" and similar searches all return results for a backend connection within a programming language.


title: What’s the difference between a “raw” and a “cooked” device driver?

text: Does this concept only apply to terminal drivers (which is what most sites cover) or to any driver in general?


title: Use Linux to backup a MSWindows network?

text: Is it possible to use a Linux machine to backup everything on a Windows network? I would like to backup MS databases and also drives, so if a database record needs restoring, it can be done easily, and if a drive gets corrupted, it can be re-imaged easily.


title: How to "grab" matching files from a lookup file in bash?

text: I have a lookup file containing filenames. I also have a directory containing files, some of which have the names that correspond to some of the names in the directory. How can I:   1. Move exact matching files to a new directory or    2. Remove non-matching files from the existing directory Also, how can I do this recursively through a top-level directory and its subdirectories?


title: AES-NI on Dell Vostro 3360

text: I don't have AES-NI available on my Dell Vostro 3360 laptop. Why? Does this machine not support it? My `/proc/cpuinfo`:               processor   : 0     vendor_id   : GenuineIntel     cpu family  : 6     model       : 58     model name  : Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz     stepping    : 9     microcode   : 0x15     cpu MHz     : 782.000     cache size  : 3072 KB     physical id : 0     siblings    : 4     core id     : 0     cpu cores   : 2     apicid      : 0     initial apicid  : 0     fpu     : yes     fpu_exception   : yes     cpuid level : 13     wp      : yes     flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms     bogomips    : 3392.17     clflush size    : 64     cache_alignment : 64     address sizes   : 36 bits physical, 48 bits virtual     power management:


title: Default value for SO_RCVTIMEO option on Solaris

text: Is there any way to find out what is the default value set for option SO_RCVTIMEO on Solaris 10? If there is a way to find out how would one go about changing it? P.S. I am aware of ability of using `getsockopt` after creation to see what the setting is, but I am looking for a way of setting this globally and not individually.


title: procmail save into a dir and execute a script?

text: I'm using `procmail` with `Maildir/` and easy rules like the one below to save incoming emails into directories:               :0:     * ^X-Spam-Status: Yes     Spam/      Now I would like a desktop notification on new emails in certain directories/rules, I know already how to handle notifications but how to tell `procmail` to save into a directory **and** execute a script? I know I can _pipe_ a `|command` but I would prefer to let `procmail` saving the file, then just run a script. Having the email (headers at least) in pipe or the dir+file path as arguments would be nice, run the script asynchronous would also be nice. **update** So, based on @slm's answer that's the result:               :0 c:     * ^X-Spam-Status: Yes     Spam/          :0 Whi     * ^X-Spam-Status: Yes     | $HOME/install/bin/notify.sh      `c` _copy_ the message in the directory but goes on with next rules I'm not using `f` becase that's not a filter, if the rule match I want procmail to stop here (I hope I'm not misunderstanding the manual here) `W` to suppress any program failure `h` to _pipe_ only headers `i` to ignore any write error to the pipe I'm not using `w` because don't want to wait the script to return I think I don't need a lock file too (no `:` after `Whi`) **update 12/5/14** In the end I've adopted exactly the solution @tripleee proposed. Played around also with `mailutils-comsatd` for few minutes before give up. .procmailrc:               COMSAT=no


title: Difference between "define-key global-map" and "global-set-key" in Emacs

text: Looking at how people program their keyboard shortcuts in Emacs, I have noticed two different patterns: One uses:               (global-set-key (kbd "M-N) 'select-next-window)      The other one:               (define-key global-map (kbd "M-N") 'select-next-window)      What's the difference between them? Don't they both define "global" keyboard shortcuts in Emacs?


title: Toshiba Drive Sleeping - SDPARM

text: My toshiba 1tb external keeps going to sleep and I can't seem to locate anything that resembles a standby parameter. Does anyone know a way to get this drive to quit sleeping? Here is the output of `sdparm -a /dev/sdc`:                   sudo sdparm -a /dev/sdc         /dev/sdc: TOSHIBA   External USB 3.0  0001     Read write error recovery mode page:       AWRE        1  [cha: n, def:  1, sav:  0]       ARRE        0  [cha: n, def:  0, sav:  0]       TB          0  [cha: n, def:  0, sav:  0]       RC          0  [cha: n, def:  0, sav:  0]       EER         0  [cha: n, def:  0, sav:  0]       PER         0  [cha: n, def:  0, sav:  0]       DTE         0  [cha: n, def:  0, sav:  0]       DCR         0  [cha: n, def:  0, sav:  0]       RRC         3  [cha: n, def:  3, sav:  0]       COR_S       0  [cha: n, def:  0, sav:  0]       HOC         0  [cha: n, def:  0, sav:  0]       DSOC        0  [cha: n, def:  0, sav:  0]       LBPERE      0  [cha: n, def:  0, sav:  0]       WRC         3  [cha: n, def:  3, sav:  0]       RTL         0  [cha: n, def:  0, sav:  0]     Caching (SBC) mode page:       IC          0  [cha: n, def:  0, sav:  0]       ABPF        0  [cha: n, def:  0, sav:  0]       CAP         0  [cha: n, def:  0, sav:  0]       DISC        0  [cha: n, def:  0, sav:  0]       SIZE        0  [cha: n, def:  0, sav:  0]       WCE         0  [cha: n, def:  0, sav:  0]       MF          0  [cha: n, def:  0, sav:  0]       RCD         0  [cha: n, def:  0, sav:  0]       DRRP        0  [cha: n, def:  0, sav:  0]       WRP         0  [cha: n, def:  0, sav:  0]       DPTL        0  [cha: n, def:  0, sav:  0]       MIPF        0  [cha: n, def:  0, sav:  0]       MAPF        0  [cha: n, def:  0, sav:  0]       MAPFC       0  [cha: n, def:  0, sav:  0]       FSW         0  [cha: n, def:  0, sav:  0]       LBCSS       0  [cha: n, def:  0, sav:  0]       DRA         1  [cha: n, def:  1, sav:  0]       NV_DIS      0  [cha: n, def:  0, sav:  0]       NCS         0  [cha: n, def:  0, sav:  0]       CSS         0  [cha: n, def:  0, sav:  0]     Informational exceptions control mode page:       PERF        0  [cha: n, def:  0, sav:  0]       EBF         0  [cha: n, def:  0, sav:  0]       EWASC       0  [cha: n, def:  0, sav:  0]       DEXCPT      0  [cha: n, def:  0, sav:  0]       TEST        0  [cha: n, def:  0, sav:  0]       EBACKERR    0  [cha: n, def:  0, sav:  0]       LOGERR      0  [cha: n, def:  0, sav:  0]       MRIE        6  [cha: n, def:  6, sav:  0]       INTT        0  [cha: n, def:  0, sav:  0]     Background control (SBC) mode page:       S_L_FULL    0  [cha: n, def:  0, sav:  0]       LOWIR       0  [cha: n, def:  0, sav:  0]       EN_BMS      0  [cha: n, def:  0, sav:  0]       EN_PS       0  [cha: n, def:  0, sav:  0]       BMS_I       0  [cha: n, def:  0, sav:  0]     Logical block provisioning (SBC) mode page:       SITUA       0  [cha: n, def:  0, sav:  0]      The following appears to be working, I'll update this question if the drive does indeed sleep again.               sudo hdparm --prefer-ata12 -S 0 /dev/sdc          /dev/sdc:      setting standby to 0 (off)     SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 40 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


title: Some really insane values in sys part of process' timing

text: real    108m1.284s     user    108m51.617s     sys     307445734m57.875s      — **307445734** min 57.875s is something really went crazy. Linux kernel 3.1.5 x86_64. A pitty thing regarding this issue is it's hard to search on web since keywords are quite irrelevant to this very problem.


title: how to set what route would be added when bringing interface up

text: I have one two interfaces on one machine, one is the Internet connection that get its IP from a DHCP, no problem. The other interface (eth1) is to local machines, and it has the `gateway 192.168.3.1` is set in its configuration file (Ubuntu based distro). The problem is, that when i am bring the `eth1` interface up, it automatically add a default (0.0.0.0) route to the route table (as it should do), and i can't connect to the Internet, since it try to send the packets to the local network. Until now i have had to do it manually by deleting the default route with the `192.168.3.1` gateway. Is there a way to set that it wouldn't add a default route once i bring up the interface ? I am still need the `gateway 192.168.3.1` to stay in the configuration file since i have to have some specific route to the `3.x` network. Here is my route table:               192.168.3.0     *               255.255.255.0   U     0      0        0 eth1     192.168.1.0     *               255.255.255.0   U     0      0        0 eth0     default         192.168.3.1     0.0.0.0         UG    100    0        0 eth1     default         DD-WRT          0.0.0.0         UG    100    0        0 eth0


title: Controlling what files to display

text: I recently changed my emacs config to hide backup files by prepending a dot to the file name. This got me to thinking - is there a ready way to change the behavior within Bash to use a list of arbitrary globs for what files to hide? A quick scan of the bash and ls man pages didn't turn up anything.


title: Deadlock with yes command

text: I have a script called `setup.sh`:               . install.sh && . tolinux.sh && . startn.sh && . startm.sh      This is `install.sh`:               yes | sudo apt-get update     yes | sudo apt-get install default-jdk     yes | sudo apt-get install expect     sudo apt-get install lftp          cd /usr/local/src/     wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz     tar xf noip-duc-linux.tar.gz     cd noip-2.1.9-1/          /usr/bin/expect <<END_SCRIPT     spawn make install     expect "Please enter the login/email*" { send "Username\r" }     expect "Please enter the password for user*" { send "password\r" }     expect "Please enter an update interval*" { send "30\r" }     expect "Do you wish to run something at successful update*" {send "N\r" }     END_SCRIPT      This is how I run the whole thing in the terminal:               . setup.sh      The `yes` command causes problem somewhere within the first two lines. I know both of those installs ask for confirmation. What happens is output similar to this:               y     y     y     y     y     y     y     y     y     y     y     y     y     y     y     ySelecting previously unselected package libdatrie1:amd64.     Preparing to unpack .../libdatrie1_0.2.8-1_amd64.deb ...     Unpacking libdatrie1:amd64(0.2.8-1) ...     [several similar lines]     Selecting previously unselected package libpango-1.0-0:amd64.     Preparing to unpack .../libpango-1.0-0_1.36.3-1ubuntu1_amd64.deb ...     Unpacking libpango-1.0-0:amd64 (1.36.3-1ubuntu1) ...     _      (last underscore is where cursor keeps blinking) I'm guessing that `yes` command has somehow interrupted the install, but I don't understand why or how... Any ideas?


title: Cannot find Nvidia driver with pacman

text: I am following this: https://wiki.archlinux.org/index.php/Nvidia#Installing The command `pacman -S nvidia` fails with `error: target not found: nvidia`, indeed, even `packman -Ss nvidia` to search for it results in no matches, the only package found under extra that matches "nvidia" is `extra/libcl`. My `/etc/pacman.conf` does have `[extra]` repository enabled (as can be seen in the search successfully finding one item in the extra repository). Maybe pacman's list is out of date. I have run `pacman -Sy`. This means that I'm completely stuck now.


title: how to run a user script after systemd wakeup?

text: When my debian jessie desktop box wakes up from sleep (via the new shiny systemd) my mouse settings are returned to their defaults, having reset my customisation               xinput set-prop 12 'Device Accel Constant Deceleration' 2.5      which runs when I log in. **how can I run an arbitrary user script on wakeup?** (assume that the user is the owner of the X session) As far as I can recall, the following is the only customisation I've made of the `systemd` setup (yes, I know it's completely wrong because it doesn't work for arbitrary users, but I've not worked out how to do that yet... this is somewhat related) **additionally, how can I run an arbitrary user script before wakeup, as the user who is currently using the X screen?** `cat /etc/systemd/system/i3lock.service`               #systemctl enable i3lock.service          [Unit]     Description=i3lock     Before=sleep.target          [Service]     User=fommil     Type=forking     Environment=DISPLAY=:0     ExecStart=/usr/bin/i3lock -c 000000          [Install]     WantedBy=sleep.target


title: Archlinux dm-crypt setup problem

text: I'm trying to setup dm-crypt to have complete encrypted volume and flash drive, that contains all the `/boot` partition.(i.e. in terms of archwiki I want to achieve `#Plain dm-crypt`(bit.ly/VNLKw0) encryption scenario) So, here is list of steps that I tried(all according to archwiki)   1. `cryptsetup`(if I got it right, this util interacts with CYPHER_OPTIONS on flash drive)   2. `pvccreate /dev/mapper/enc`   3. `vgcreate store /dev/mapper/enc`   4. `lvcreate -l 100%VG store n root`   5. `mkfs.ext4 /dev/store/root`   6. `mount /dev/store/root /mnt`   7. `mkdir /mnt/boot`   8. `cp -ax / /mnt` // _slow_   9. `mount /dev/sda3 /mnt/boot`   10. `nano /mnt/etc//mkinitcpio.conf` to insert into `HOOKS` entities `"...encrypt lvm2 ... filesystems ..."`   11. `nano /mnt/etc/dafault/grub` to insert into `GRUB_CMDLINE_LINUX_DEFAULT="... cryptdevice=/dev/sda1:enx crypto = :aes-cbc-essiv:192:0:"`   12. `grub-install /dev/sda3`   13. `grub-mkconfig > /mnt/boot/grub/grub.cfg`   14. `for f in dev proc sys; do mount -o bind /$f /mnt/$f; done; chroot /mnt mkinitcpio -g /boot/initramfs-linux.img` * * *               CIPHER_OPTIONS          cryptsetup --hash=sha512 --cipher=aes-cbc-essiv:sha256 --offset=0  --key-size=192 open --type=plain /dev/sda1 enc      * * * Finally, the problem is, that after booting the system loader needs password to be prompted. After some actions about decrypting system(pass is 123, so the wrong password is not an option) falls to kernel panic(will update the question with exact message later). I suppose, that problem is located somewhere in grub config or initramfs, but it can be elsewhere too.


title: Memory allocation issue on NOMMU?

text: I have a memory allocation issue on an embedded NOMMU linux. Or that is, I might have an issue, I'm not sure. The system has 15M free ram when booted. I have one small app (a Dropbox/REST communication app) that will allocate up to 500k. Once a while the kernel will throw an allocation error report. Like so: ==================================================               Aug 25 08:11:57 kernel: Source : <0x00011058> { ___local_bh_enable + 0x38 } RTS     Aug 25 08:11:57 kernel: CPU: 0 PID: 17233 Comm: dropbox Not tainted 3.10.10-ADI-2013R1-svn10397 #747     Aug 25 08:11:57 kernel: Stack info:     Aug 25 08:11:57 kernel: SP: [0x01d73d8c] <0x01d73d8c> /* kernel dynamic memory */     Aug 25 08:11:57 kernel: FP: (0x01d73eec)     Aug 25 08:11:57 kernel: Memory from 0x01d73d80 to 01d74000     Aug 25 08:11:57 kernel: 01d73d80: 00000000 01d73d8c 00000000 [00000000] 00041580 00210cd8 000000d0 00210ce4     Aug 25 08:11:57 kernel: 01d73da0: 01752c64 00000007 000000d0 0004186c 00210cd8 00000000 00041888 00000000     Aug 25 08:11:57 kernel: 01d73dc0: 000000d0 00000001 00000010 000000d0 00000000 00000007 00210cd8 00000001     Aug 25 08:11:57 kernel: 01d73de0: 00000040 002103e4 00000000 01d72008 01d72000 01d72008 01d72000 00000040     Aug 25 08:11:57 kernel: 01d73e00: 01d72000 01d73eec 00000080 0000002f 0000002f 00000040 00000000 00000040     Aug 25 08:11:57 kernel: 01d73e20: 002103e4 00000000 00000000 002103e4 002103e4 00418e50 0004cc20 00000000     Aug 25 08:11:57 kernel: 01d73e40: 00a441d8 009447c0 00000000 000000ff 00000007 00000008 00000000 00000007     Aug 25 08:11:57 kernel: 01d73e60: 00000000 00000000 00000002 00000042 00042000 00000042 00100100 00200200     Aug 25 08:11:57 kernel: 01d73e80: 01ebfaf0 0004879c 00000000 00041038 <00731bb0> 009447c0 015e0694 00000000     Aug 25 08:11:57 kernel: 01d73ea0: 00041038 00000001 00000001 00100100 00000005 00000002 00000000 01d73ec0     Aug 25 08:11:57 kernel: 01d73ec0: 00000000 0004c81c 00001802 009447c0 00000005 00000000 00001000 53faefc4     Aug 25 08:11:57 kernel: 01d73ee0: 0ca2dd00 00000005 00000002 (00000000) 0004c7e0 000000c0 00000000     Aug 25 08:11:57 kernel: 01d73fc0:<00751278><00731bb0> 00731d24 00711000 000000c0 7ffff000 00000000 00000000     Aug 25 08:11:57 kernel: 01d73fe0: 00000003 00001802 00000005 00041038 00000000 00000000 000000c0 00000006     Aug 25 08:11:57 kernel: Return addresses in stack:     Aug 25 08:11:57 kernel: address : <0x00731bb0> /* kernel dynamic memory */     Aug 25 08:11:57 kernel: frame 1 : <0xffa0071e> { _system_call + 0x6a }     Aug 25 08:11:57 kernel: address : <0x00751278> /* kernel dynamic memory */     Aug 25 08:11:57 kernel: address : <0x00731bb0> /* kernel dynamic memory */     Aug 25 08:11:57 kernel: Mem-Info:     Aug 25 08:11:57 kernel: DMA per-cpu:     Aug 25 08:11:57 kernel: CPU 0: hi: 0, btch: 1 usd: 0     Aug 25 08:11:57 kernel: active_anon:0 inactive_anon:0 isolated_anon:0     Aug 25 08:11:57 kernel: active_file:437 inactive_file:433 isolated_file:0     Aug 25 08:11:57 kernel: unevictable:1239 dirty:11 writeback:0 unstable:0     Aug 25 08:11:57 kernel: free:2571 slab_reclaimable:849 slab_unreclaimable:416     Aug 25 08:11:57 kernel: mapped:0 shmem:0 pagetables:0 bounce:0     Aug 25 08:11:57 kernel: free_cma:0     Aug 25 08:11:57 kernel: DMA free:10284kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:1748kB inactive_file:1732kB unevictable:4956kB isolated(anon):0kB isolated(file):0kB present:31744kB managed:25176kB mlocked:0kB d     Aug 25 08:11:57 kernel: lowmem_reserve[]: 0 0 0     Aug 25 08:11:57 kernel: DMA: 249*4kB (UM) 41*8kB (U) 6*16kB (UM) 79*32kB (U) 85*64kB (UM) 1*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 10284kB     Aug 25 08:11:57 kernel: 2109 total pagecache pages     Aug 25 08:11:58 kernel: CPU 0: hi: 0, btch: 1 usd: 0     Aug 25 08:11:58 kernel: active_anon:0 inactive_anon:0 isolated_anon:0     Aug 25 08:11:58 kernel: active_file:437 inactive_file:433 isolated_file:0     Aug 25 08:11:58 kernel: unevictable:1239 dirty:11 writeback:0 unstable:0     Aug 25 08:11:58 kernel: free:2571 slab_reclaimable:849 slab_unreclaimable:416     Aug 25 08:11:58 kernel: mapped:0 shmem:0 pagetables:0 bounce:0     Aug 25 08:11:58 kernel: free_cma:0     Aug 25 08:11:58 kernel: DMA free:10284kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:1748kB inactive_file:1732kB unevictable:4956kB isolated(anon):0kB isolated(file):0kB present:31744kB managed:25176kB mlocked:0kB d     Aug 25 08:11:58 kernel: lowmem_reserve[]: 0 0 0     Aug 25 08:11:58 kernel: DMA: 249*4kB (UM) 41*8kB (U) 6*16kB (UM) 79*32kB (U) 85*64kB (UM) 1*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 10284kB     Aug 25 08:11:58 kernel: 2109 total pagecache pages     Aug 25 08:11:58 kernel: dropbox: page allocation failure: order:7, mode:0xd0     Aug 25 08:11:58 kernel: Hardware Trace:     Aug 25 08:11:58 kernel: 0 Target : <0x00171b8c> { _dump_stack + 0x0 }     Aug 25 08:11:58 kernel: Source : <0x0004157c> { _warn_alloc_failed + 0xa4 } CALL pcrel     Aug 25 08:11:58 kernel: 1 Target : <0x0004157c> { _warn_alloc_failed + 0xa4 }     Aug 25 08:11:58 kernel: Source : <0x00171df6> { _printk + 0x26 } RTS     Aug 25 08:11:58 kernel: 2 Target : <0x00171df2> { _printk + 0x22 }     Aug 25 08:11:58 kernel: Source : <0x0000d7c8> { _vprintk_emit + 0x12c } RTS     Aug 25 08:11:58 kernel: 3 Target : <0x0000d7be> { _vprintk_emit + 0x122 }     Aug 25 08:11:58 kernel: Source : <0xffa00ad4> { __common_int_entry + 0xcc } RTI     Aug 25 08:11:58 kernel: 4 Target : <0xffa00a72> { __common_int_entry + 0x6a }     Aug 25 08:11:58 kernel: Source : <0xffa008b8> { _return_from_int + 0x58 } RTS     Aug 25 08:11:58 kernel: 5 Target : <0xffa008b8> { _return_from_int + 0x58 }     Aug 25 08:11:58 kernel: Source : <0xffa0088e> { _return_from_int + 0x2e } IF !CC JUMP pcrel     Aug 25 08:11:58 kernel: 6 Target : <0xffa00860> { _return_from_int + 0x0 }     Aug 25 08:11:58 kernel: Source : <0xffa00a6e> { __common_int_entry + 0x66 } JUMP.L     Aug 25 08:11:58 kernel: 10 Target : <0x0003b366> { _rcu_irq_exit + 0x32 }     Aug 25 08:11:58 kernel: Source : <0x0003b2da> { _rcu_idle_enter_common + 0x56 } RTS     Aug 25 08:11:58 kernel: 11 Target : <0x0003b2c8> { _rcu_idle_enter_common + 0x44 }     Aug 25 08:11:58 kernel: Source : <0x0003b290> { _rcu_idle_enter_common + 0xc } IF !CC JUMP pcrel     Aug 25 08:11:58 kernel: 12 Target : <0x0003b284> { _rcu_idle_enter_common + 0x0 }     Aug 25 08:11:58 kernel: Source : <0x0003b362> { _rcu_irq_exit + 0x2e } CALL pcrel     Aug 25 08:11:58 kernel: 13 Target : <0x0003b334> { _rcu_irq_exit + 0x0 }     Aug 25 08:11:58 kernel: Source : <0x00011872> { _irq_exit + 0x56 } CALL pcrel     Aug 25 08:11:58 kernel: 14 Target : <0x0001186e> { _irq_exit + 0x52 }     Aug 25 08:11:58 kernel: Source : <0x00011798> { ___do_softirq + 0x128 } RTS     Aug 25 08:11:58 kernel: 15 Target : <0x00011776> { ___do_softirq + 0x106 }     Aug 25 08:11:58 kernel: Source : <0x00011058> { ___local_bh_enable + 0x38 } RTS     Aug 25 08:11:58 kernel: CPU: 0 PID: 17233 Comm: dropbox Not tainted 3.10.10-ADI-2013R1-svn10397 #747     Aug 25 08:11:58 kernel: Stack info:     Aug 25 08:11:58 kernel: SP: [0x01d73d8c] <0x01d73d8c> /* kernel dynamic memory */     Aug 25 08:11:58 kernel: FP: (0x01d73eec)     Aug 25 08:11:58 kernel: Memory from 0x01d73d80 to 01d74000     Aug 25 08:11:58 kernel: 01d73d80: 00000000 01d73d8c 00000000 [00000000] 00041580 00210cd8 000000d0 00210ce4     Aug 25 08:11:58 kernel: 01d73e40: 017a6798 0038bac0 00000000 000000ff 00000007 00000008 00000000 00000007     Aug 25 08:11:58 kernel: 01d73e60: 00000000 00000000 00000002 00000042 00042000 00000042 00100100 00200200     Aug 25 08:11:58 kernel: 01d73e80: 01ebf2a4 0004879c 00000000 00041038 <00731bb0> 0038bac0 015e0694 00000000     Aug 25 08:11:58 kernel: 01d73ea0: 00041038 00000001 00000001 00100100 00000005 00000002 00000000 01d73ec0     Aug 25 08:11:58 kernel: 01d73ec0: 00000000 0004c81c 00001802 0038bac0 00000005 00000000 00001000 53faefcd     Aug 25 08:11:58 kernel: 01d73ee0: 0b71b000 00000005 00000002 (00000000) 0004c7e0 000000c0 00000000     Aug 25 08:11:58 kernel: 01d73f00: ffffe000 00000000 00000003 <00731bb0> 00000100 ffffe000 00001802 00000003     Aug 25 08:11:58 kernel: 01d73f20: 00000000 0021ab00 00008000 00002000 00000000 01d74000 0021ab00 0021ab00     Aug 25 08:11:58 kernel: 01d73f40: 0021a436 ffa00e2c 02002021 0021ad93 016dd77b 0021ad90 016dd77a 00000000     Aug 25 08:11:58 kernel: 01d73f60: 00000000 00000004 00000000 00000004 00000000 00000000 7ffff000 000000c0     Aug 25 08:11:58 kernel: 01d73f80: 00000137 00000000 00000000 00000000 00000000 0000005b 00001802 00000001     Aug 25 08:11:58 kernel: 01d73fa0: 000000b4 00000000 00000002 00000fff 00001454 01ebf1a0 01ebf2a4 00711034     Aug 25 08:11:58 kernel: 01d73fc0: 00751294 <00731bb0> 00731d24 00711000 000000c0 7ffff000 00000000 00000000     Aug 25 08:11:58 kernel: 01d73fe0: 00000003 00001802 00000005 00041038 00000000 00000000 000000c0 00000006     Aug 25 08:11:58 kernel: Return addresses in stack:     Aug 25 08:11:58 kernel: address : <0x00731bb0> /* kernel dynamic memory */     Aug 25 08:11:58 kernel: frame 1 : <0xffa0071e> { _system_call + 0x6a }     Aug 25 08:11:58 kernel: address : <0x00731bb0> /* kernel dynamic memory */     Aug 25 08:11:58 kernel: address : <0x00731bb0> /* kernel dynamic memory */     Aug 25 08:11:58 kernel: Mem-Info:     Aug 25 08:11:58 kernel: DMA per-cpu:     Aug 25 08:11:58 kernel: CPU 0: hi: 0, btch: 1 usd: 0     Aug 25 08:11:58 kernel: active_anon:0 inactive_anon:0 isolated_anon:0     Aug 25 08:11:58 kernel: active_file:63 inactive_file:392 isolated_file:0     Aug 25 08:11:58 kernel: unevictable:1239 dirty:11 writeback:0 unstable:0     Aug 25 08:11:58 kernel: free:3149 slab_reclaimable:681 slab_unreclaimable:417     Aug 25 08:11:58 kernel: mapped:0 shmem:0 pagetables:0 bounce:0     Aug 25 08:11:58 kernel: free_cma:0     Aug 25 08:11:58 kernel: DMA free:12596kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:252kB inactive_file:1568kB unevictable:4956kB isolated(anon):0kB isolated(file):0kB present:31744kB managed:25176kB mlocked:0kB di     Aug 25 08:11:58 kernel: lowmem_reserve[]: 0 0 0     Aug 25 08:11:58 kernel: DMA: 393*4kB (UM) 126*8kB (U) 40*16kB (UM) 81*32kB (U) 78*64kB (UM) 8*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 12596kB     Aug 25 08:11:58 kernel: 1696 total pagecache pages     Aug 25 08:11:58 kernel: 7936 pages RAM     Aug 25 08:11:58 kernel: 614 pages reserved     Aug 25 08:11:58 kernel: 262586 pages shared     Aug 25 08:11:58 kernel: 3706 pages non-shared     Aug 25 08:11:58 kernel: Allocation of length 270336 from process 17233 (dropbox) failed     Aug 25 08:11:58 kernel: DMA per-cpu:     Aug 25 08:11:58 kernel: CPU 0: hi: 0, btch: 1 usd: 0     Aug 25 08:11:58 kernel: active_anon:0 inactive_anon:0 isolated_anon:0     Aug 25 08:11:58 kernel: active_file:63 inactive_file:392 isolated_file:0     Aug 25 08:11:58 kernel: DMA: 393*4kB (UM) 126*8kB (U) 40*16kB (UM) 81*32kB (U) 78*64kB (UM) 8*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 12596kB     Aug 25 08:11:58 kernel: 1696 total pagecache pages      ================================================== The system doesn't seem to suffer though. It continues. It looks like the kernel might dump some of the cache, when it happens: http://www.linuxatemyram.com/ But I'm not sure. Also the kernel is compiled with debug features included. The reports might not come if I build it in 'release' mode. My question is: Is this something I should be concerned about? (It doesn't look very nice.) Is there a way to disable or reduce the caching? I imagine that caching will create these issues on NOMMU systems, as the kernel cannot relocate mem on- the-fly, as it does with an MMU. Btw, it's an ucLinux, kernel 3.10.


title: at job seems to be running using /bin/sh though I have a #!/bin/bash

text: I am trying to run a job using `at`, and I have a `bash` script (I do have `#!/bin/bash` as the first line), but the job fails because of use of `[[` and `]]` in the script, I see the following in the `mail` that it generates:               =sh: 58: [[: not found     =sh: 58: [[: not found     =sh: 58: [[: not found     =sh: 58: [[: not found     =sh: 58: [[: not found      The `/bin/sh` is a link to `dash`, but if I have the she-bang line as `#!/bin/bash` in my script - should it not use `bash` instead? P.S If I just run the script on my `bash` prompt - it works fine with no errors (and it has executable permissions). --EDIT-- I am adding the job like this:               $ at 1:30 am today -f /path/to/my/script.sh                    $ which bash      /bin/bash          $ ls -l /bin/sh     lrwxrwxrwx 1 root root 4 Mar 30  2012 /bin/sh -> dash          $ uname -a     Linux server1 3.5.0-46-generic #70~precise1-Ubuntu SMP Thu Jan 9 23:55:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


title: /mnt Directories Disappearing

text: I'm trying to mount some smb shares on bootup using `fstab` on a Kbuntu box. Here are the steps I using to accomplish this:               sudo mkdir /mnt/MyShare      Then I add this line to my fstab file:               //myserver/myshare /mnt/MyShare smbfs username=user1,password=password1 0 0      However after restarting the `/mnt/MyShare` folder is removed. If i re-create this directory and run `sudo mount -a`, everything works fine. Can browse the share. But when I reboot, `/mnt/MyShare` is gone. Any hints as to what I am doing wrong?


title: QLogic 42C1831 HBA drivers on RHEL 4.8? Using Kernel 2.6.x

text: We're trying to get a QLogic 42C1831 HBA installed on a system using RHEL 4.8. We've tried the drivers from QLogic for Linux Kernel 2.6.x (which this system is running) and are getting all sorts of errors trying to install them. The drivers to specifically mention that they're for RHEL 5.x, but I was wondering if anyone has gotten this to work? If you'd like to look at the driver files we're using they're here


title: tmux malloc() fault on sorting mailbox

text: I am getting a lot of these errors from `mutt`:               Sorting mailbox...*** glibc detected *** mutt: malloc(): smallbin double linked list corrupted: 0x08f12d20 ***      No particular condition triggers the fault yet no state is immune from it as a haven (message previews, index browsing, etc...). Any idea as to how to go about troubleshooting this? I am sure the C hackers out there will know exactly what to do with this... `strace`?


title: Can't use peewee on Mac OS X Mountain Lion

text: I am getting an error when I run Python programs that imports peewee:               ImportError: No module named peewee      The same program works fine under Ubuntu 12.04. I used pip to install peewee, and it confirms that it is installed:               $ pip install --upgrade peewee     Requirement already up-to-date: peewee in /usr/local/lib/python2.7/site-packages     Cleaning up...      Any ideas?


title: GNU screen - Restore a session with splitted screen

text: When I restore a splitted session of `screen`, I've got only one print session and have to reconfigure the number of display session. Is there another way to have the original `screen` configuration?


title: How to turn off Nautilus autoplay under KDE?

text: Does anyone have an idea why when I insert a CD/DVD/flash nautilus opens as a default file manager under KDE instead of dolphin krusader? In my system settings krusader is set as the default manager, but still nautilus somehow keeps showing up, and I'm wondering how to change that? I keep nautilus because it's a dropbox dependency... Ok, I know there are workarounds so one could use dropbox without nautilus but I didn't bother trying that out... I don't mind keeping nautilus but I just want it to be quiet :D I have KDE 4.5.1 installed on an up-to-date Arch if that helps.


title: Bash script for loop with find and many directories

text: I'm writing a bash script to do some work on a directory that contains many (100,000+) sub-directories. Is there a predefined limit to how many arguments you can pass to a for loop such as the following?               for dir in $(find . -type d)     do       # My code     done      I'm worried the script will bork if the find command returns too many directories.