title: How to validate X.509 certificate?

text: I have a following expired X.509 certificate:               $ openssl x509 -in openvpn.net -text -noout     Certificate:         Data:             Version: 3 (0x2)             Serial Number:                 03:fa:55:a7:80:b5:b5             Signature Algorithm: sha256WithRSAEncryption             Issuer: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2             Validity                 Not Before: Dec 10 20:42:04 2013 GMT                 Not After : Mar  5 17:46:58 2014 GMT             Subject: OU=Domain Control Validated, CN=*.openvpn.net             Subject Public Key Info:                 Public Key Algorithm: rsaEncryption                 RSA Public Key: (2048 bit)                     Modulus (2048 bit):                         00:d8:1c:cd:03:64:34:52:e3:6a:fd:96:10:4d:76:                         c6:33:f8:70:fb:6c:0d:93:ac:3c:49:1b:bf:c4:9a:                         c3:b5:08:87:c8:1c:fc:81:64:91:41:45:81:e0:70:                         63:69:e0:86:ec:e1:48:84:26:2f:3f:4b:7d:6d:6c:                         88:bc:44:11:ff:72:b1:32:d9:30:24:e4:78:78:0c:                         fb:73:5d:43:05:4e:5c:5a:05:f7:85:e0:69:c9:b8:                         ca:7d:0a:33:b9:12:ee:ff:ed:20:7b:8d:04:89:05:                         74:80:7a:5c:4a:39:07:70:14:56:31:59:ae:4f:6f:                         3d:5d:c6:36:00:b6:aa:7e:45:6b:bc:cb:4a:8f:cc:                         20:69:f6:39:ec:29:e9:6a:14:6e:42:ca:99:d1:d7:                         08:23:31:5c:5b:b3:48:13:01:fe:bc:44:34:62:c7:                         81:2e:4e:74:1e:73:42:b3:5f:ee:23:55:9f:62:d0:                         46:5e:c2:00:14:7b:b5:e5:26:40:12:a6:32:50:22:                         b3:a6:df:b6:a3:90:d4:39:ae:ea:3e:53:f5:58:89:                         7a:b7:6a:d8:6f:d3:ae:1b:e0:7c:90:86:04:39:c3:                         a3:c8:8a:52:5a:d5:83:e7:07:80:5b:b2:e2:7a:5a:                         24:b2:d8:53:34:ad:2a:e2:d4:3a:57:5c:6e:3c:46:                         58:b5                     Exponent: 65537 (0x10001)             X509v3 extensions:                 X509v3 Basic Constraints: critical                     CA:FALSE                 X509v3 Extended Key Usage:                      TLS Web Server Authentication, TLS Web Client Authentication                 X509v3 Key Usage: critical                     Digital Signature, Key Encipherment                 X509v3 CRL Distribution Points:                      URI:http://crl.godaddy.com/gdig2s1-6.crl                      X509v3 Certificate Policies:                      Policy: 2.16.840.1.114413.1.7.23.1                       CPS: http://certificates.godaddy.com/repository/                      Authority Information Access:                      OCSP - URI:http://ocsp.godaddy.com/                     CA Issuers - URI:http://certificates.godaddy.com/repository/gdig2.crt                      X509v3 Authority Key Identifier:                      keyid:40:C2:BD:27:8E:CC:34:83:30:A2:33:D7:FB:6C:B3:F0:B4:2C:80:CE                      X509v3 Subject Alternative Name:                      DNS:*.openvpn.net, DNS:openvpn.net                 X509v3 Subject Key Identifier:                      DA:4D:97:2B:F8:A2:C5:E9:9D:A2:E4:CB:56:01:0B:9B:74:24:01:01         Signature Algorithm: sha256WithRSAEncryption             9b:b7:07:59:02:0c:67:f3:c1:49:45:fe:30:9a:1a:39:19:cb:             42:33:fc:62:02:29:fc:f5:ef:5d:61:36:4a:e2:c5:f6:52:04:             57:81:28:18:77:60:c0:99:1a:4a:45:e5:f7:eb:03:36:d2:bf:             9d:b6:93:38:98:06:b4:81:fb:5c:ff:e6:ef:7c:8d:ff:cd:5f:             53:b1:10:23:03:38:12:12:a8:99:c8:35:a1:6a:60:ba:4a:f4:             61:7f:96:cb:81:70:f3:c6:d8:2a:b5:69:b8:d9:56:0a:46:73:             9b:d0:d7:c1:2f:9a:d8:94:ac:37:0b:57:80:f9:a1:ec:e1:bf:             43:76:c6:ea:01:c6:97:c8:55:29:a8:b6:b9:19:bd:81:92:9a:             a9:ec:be:b0:4c:3e:11:f5:8b:8c:8f:af:fa:f5:d4:4d:d7:77:             c0:1f:aa:cd:f7:01:80:ad:62:d4:db:1d:e3:a0:23:77:2f:4b:             ea:65:5c:9e:9c:46:bc:be:ce:f3:71:79:cd:19:c3:44:f5:49:             de:4b:24:a5:8b:48:3e:60:4d:9d:dd:1d:50:35:66:6a:d6:96:             77:7c:19:9b:66:e1:46:de:4e:c2:ce:c5:96:88:2c:d7:7d:cc:             94:ac:1f:23:d4:a8:e9:6d:c0:f3:9f:a8:21:a7:fd:dc:25:95:             6f:eb:e3:a0     $       As I understand, this certificate is issued from `Go Daddy Secure Certificate Authority` to `*.openvpn.net`. I think that in order to verify, that this certificate is indeed issued by GoDaddy, I should download one of the GoDaddy root certificated from here. However, which one? And how can I verify that the certificate above is indeed issued by GoDaddy using `openssl` utility?


title: My /var/www directory is full

text: I am using Debian 7 on VirutalBox as my virtual web server. Now, my `/var/www` directory is almost full. I added 27 GB of space to my VM as a new partition, formatted the partition with `ext4` but my `/var/www` directory still doesn't have enough space. How can I resize `/var/www`? The output of df -h:   ![enter image description here](http://i.stack.imgur.com/Krjhs.png)


title: How to print a Bind10 cache dump?

text: How can you print the current state of the bind10 cache? I searched the bind10 manual and tried to figure it out using `bindctl`.


title: Environment variable for command called via nice

text: I need to set an environment variable for a command that is being called via nice. [Bash and dash, Slackware and FreeBSD.]                $ JIM=20 nice -n 10 echo $JIM           $      Nope, `echo` can't see JIM                $ nice -n 10 JIM=20 echo $JIM      nice: JIM=20: No such file or directory      $      `nice` don't like it. I can export JIM and then echo can see it, but now I'm polluting the environment. Unclean! I tried the "--" option to signify end of command line variables for `nice`, but it makes no difference, `nice` complains. I can't believe no one has wanted to do this before, so I'm probably making a very basic error. Any ideas?


title: How would I detect a non-login shell? (In Zsh)

text: I want to create a script that runs when a Zsh instance starts, but only if the instance is:   * Non-login.   * Interactive I think I'm right to say `.zshrc` runs for all interactive shell instances, `.zprofile` and `.zlogin` run for all login shells, and `.zshenv` runs in all cases. The reason I want to do this is to check if there is an existing ssh-agent running, and make use of it in the newly opened shell if there is. I imagine any tests carried out would be best placed in `.zshrc` (as this guarantees an interactive shell) and the designated "non-login event" script called from there. I probably first want to check if the new shell is already running as part of an existing remote SSH session before testing for the ssh-agent, but I have found this SE recipe for this purpose. I pick Zsh as it is the shell I favor, but I imagine any correct technique to do this would apply similarly to other shells.


title: Parsing an xml RSS feed file

text: What I would like to achieve is to receive an email with the failures of my VPS. I tried to do that by downloading an rss feed XML file from my VPS provider which contains all the failures, down states etc. of their servers. Once I downloaded it, I would like to parse it in order to see if my Virtual Host number is included in any of the entries of the XML file. If yes, I should receive an email containing the entire entry that contains my Virtual Host number (well, this is not a problem at all using `sendmail`). I have been unsuccessfully trying to use a simple and dirty `wget` and `grep`. This is the file I would like to parse: http://www.hetzner-status.de/en.atom


title: What does /etc/cron.daily/apt do?

text: Could someone explain what the `apt` script is doing in `cron.daily` please? I can't find any documentation on it. **NOTE:** I'm trying to investigate a server-server communications issue which frequently occurs around midnight - and I want to rule out the cron dailies.


How to compute Linux slab memory leak in GNU/Linux ( proc/slabinfo ) of running process ? I'm want to free usage is not working properly . I want to way how to check Memory Usage & Memory Leak for my running process               ~ # cat /proc/slabinfo     cat /proc/slabinfo     slabinfo - version: 2.1     # name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>     bridge_fdb_cache      12     59     64   59    1 : tunables  120   60    0 : slabdata      1      1      0     rpc_buffers            8      8   2048    2    1 : tunables   24   12    0 : slabdata      4      4      0     rpc_tasks              8     24    160   24    1 : tunables  120   60    0 : slabdata      1      1      0     rpc_inode_cache        0      0    416    9    1 : tunables   54   27    0 : slabdata      0      0      0     fib6_nodes            21    113     32  113    1 : tunables  120   60    0 : slabdata      1      1      0     ip6_dst_cache         33     34    224   17    1 : tunables  120   60    0 : slabdata      2      2      0     ndisc_cache            2     24    160   24    1 : tunables  120   60    0 : slabdata      1      1      0     RAWv6                  4      6    608    6    1 : tunables   54   27    0 : slabdata      1      1      0     UDPLITEv6              0      0    608    6    1 : tunables   54   27    0 : slabdata      0      0      0     UDPv6                  0      0    608    6    1 : tunables   54   27    0 : slabdata      0      0      0     tw_sock_TCPv6          0      0    160   24    1 : tunables  120   60    0 : slabdata      0      0      0     request_sock_TCPv6      0      0    128   30    1 : tunables  120   60    0 : slabdata      0      0      0     TCPv6                  0      0   1184    6    2 : tunables   24   12    0 : slabdata      0      0      0     UNIX                   3     10    384   10    1 : tunables   54   27    0 : slabdata      1      1      0     nf_conntrack_expect      0      0    140   28    1 : tunables  120   60    0 : slabdata      0      0      0     nf_conntrack           0      0    196   20    1 : tunables  120   60    0 : slabdata      0      0      0     flow_cache             0      0     80   48    1 : tunables  120   60    0 : slabdata      0      0      0     cfq_io_context         0      0     96   40    1 : tunables  120   60    0 : slabdata      0      0      0     cfq_queue              0      0     84   46    1 : tunables  120   60    0 : slabdata      0      0      0     mqueue_inode_cache      1      8    480    8    1 : tunables   54   27    0 : slabdata      1      1      0     jffs2_inode_cache      0      0     24  145    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_node_frag        0      0     24  145    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_refblock         0      0    252   15    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_tmp_dnode        0      0     32  113    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_raw_inode        0      0     68   56    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_raw_dirent       0      0     40   92    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_full_dnode       0      0     16  203    1 : tunables  120   60    0 : slabdata      0      0      0     jffs2_i                0      0    336   11    1 : tunables   54   27    0 : slabdata      0      0      0     nfs_write_data        36     40    480    8    1 : tunables   54   27    0 : slabdata      5      5      0     nfs_read_data         32     36    448    9    1 : tunables   54   27    0 : slabdata      4      4      0     nfs_inode_cache        0      0    576    7    1 : tunables   54   27    0 : slabdata      0      0      0     nfs_page               0      0     64   59    1 : tunables  120   60    0 : slabdata      0      0      0     fat_inode_cache        0      0    352   11    1 : tunables   54   27    0 : slabdata      0      0      0     fat_cache              0      0     20  169    1 : tunables  120   60    0 : slabdata      0      0      0     ext2_inode_cache       3      9    416    9    1 : tunables   54   27    0 : slabdata      1      1      0     journal_handle         0      0     20  169    1 : tunables  120   60    0 : slabdata      0      0      0     journal_head           0      0     52   72    1 : tunables  120   60    0 : slabdata      0      0      0     revoke_table           0      0     12  254    1 : tunables  120   60    0 : slabdata      0      0      0     revoke_record          0      0     16  203    1 : tunables  120   60    0 : slabdata      0      0      0     ext3_inode_cache       0      0    432    9    1 : tunables   54   27    0 : slabdata      0      0      0     ext3_xattr             0      0     44   84    1 : tunables  120   60    0 : slabdata      0      0      0     dnotify_cache          0      0     20  169    1 : tunables  120   60    0 : slabdata      0      0      0     inotify_event_cache      0      0     28  127    1 : tunables  120   60    0 : slabdata      0      0      0     inotify_watch_cache      0      0     40   92    1 : tunables  120   60    0 : slabdata      0      0      0     kioctx                 0      0    160   24    1 : tunables  120   60    0 : slabdata      0      0      0     kiocb                  0      0    160   24    1 : tunables  120   60    0 : slabdata      0      0      0     fasync_cache           0      0     16  203    1 : tunables  120   60    0 : slabdata      0      0      0     shmem_inode_cache    601    610    392   10    1 : tunables   54   27    0 : slabdata     61     61      0     nsproxy                0      0     28  127    1 : tunables  120   60    0 : slabdata      0      0      0     posix_timers_cache      7     37    104   37    1 : tunables  120   60    0 : slabdata      1      1      0     uid_cache              0      0    128   30    1 : tunables  120   60    0 : slabdata      0      0      0     UDP-Lite               0      0    480    8    1 : tunables   54   27    0 : slabdata      0      0      0     tcp_bind_bucket        2    113     32  113    1 : tunables  120   60    0 : slabdata      1      1      0     inet_peer_cache        1     59     64   59    1 : tunables  120   60    0 : slabdata      1      1      0     secpath_cache          0      0     32  113    1 : tunables  120   60    0 : slabdata      0      0      0     xfrm_dst_cache         0      0    288   13    1 : tunables   54   27    0 : slabdata      0      0      0     ip_fib_alias           0      0     16  203    1 : tunables  120   60    0 : slabdata      0      0      0     ip_fib_hash           10    101     36  101    1 : tunables  120   60    0 : slabdata      1      1      0     ip_dst_cache           4     15    256   15    1 : tunables  120   60    0 : slabdata      1      1      0     arp_cache              2     30    128   30    1 : tunables  120   60    0 : slabdata      1      1      0     RAW                    8      8    480    8    1 : tunables   54   27    0 : slabdata      1      1      0     UDP                   16     16    480    8    1 : tunables   54   27    0 : slabdata      2      2      0     tw_sock_TCP            0      0    128   30    1 : tunables  120   60    0 : slabdata      0      0      0     request_sock_TCP       0      0     96   40    1 : tunables  120   60    0 : slabdata      0      0      0     TCP                    4      7   1088    7    2 : tunables   24   12    0 : slabdata      1      1      0     sgpool-128             2      3   2560    3    2 : tunables   24   12    0 : slabdata      1      1      0     sgpool-64              2      3   1280    3    1 : tunables   24   12    0 : slabdata      1      1      0     sgpool-32              2      6    640    6    1 : tunables   54   27    0 : slabdata      1      1      0     sgpool-16              2     12    320   12    1 : tunables   54   27    0 : slabdata      1      1      0     sgpool-8               2     24    160   24    1 : tunables  120   60    0 : slabdata      1      1      0     scsi_bidi_sdb          0      0     20  169    1 : tunables  120   60    0 : slabdata      0      0      0     scsi_io_context        0      0    104   37    1 : tunables  120   60    0 : slabdata      0      0      0     blkdev_queue          25     28    952    4    1 : tunables   54   27    0 : slabdata      7      7      0     blkdev_requests        4     21    184   21    1 : tunables  120   60    0 : slabdata      1      1      0     blkdev_ioc             1     84     44   84    1 : tunables  120   60    0 : slabdata      1      1      0     biovec-256             2      2   3072    2    2 : tunables   24   12    0 : slabdata      1      1      0     biovec-128             2      5   1536    5    2 : tunables   24   12    0 : slabdata      1      1      0     biovec-64              2      5    768    5    1 : tunables   54   27    0 : slabdata      1      1      0     biovec-16              2     20    192   20    1 : tunables  120   60    0 : slabdata      1      1      0     biovec-4               2     59     64   59    1 : tunables  120   60    0 : slabdata      1      1      0     biovec-1               2    203     16  203    1 : tunables  120   60    0 : slabdata      1      1      0     bio                    2     59     64   59    1 : tunables  120   60    0 : slabdata      1      1      0     sock_inode_cache      66     66    352   11    1 : tunables   54   27    0 : slabdata      6      6      0     skbuff_fclone_cache      7      7   1056    7    2 : tunables   24   12    0 : slabdata      1      1      0     skbuff_head_cache    757    784    544    7    1 : tunables   54   27    0 : slabdata    112    112      0     file_lock_cache        0      0     96   40    1 : tunables  120   60    0 : slabdata      0      0      0     proc_inode_cache      16     24    312   12    1 : tunables   54   27    0 : slabdata      2      2      0     sigqueue               8     27    144   27    1 : tunables  120   60    0 : slabdata      1      1      0     radix_tree_node      216    221    288   13    1 : tunables   54   27    0 : slabdata     17     17      0     bdev_cache             3      9    416    9    1 : tunables   54   27    0 : slabdata      1      1      0     sysfs_dir_cache     4793   4872     44   84    1 : tunables  120   60    0 : slabdata     58     58      0     mnt_cache             18     30    128   30    1 : tunables  120   60    0 : slabdata      1      1      0     inode_cache         3568   3575    296   13    1 : tunables   54   27    0 : slabdata    275    275      0     dentry              4249   4309    124   31    1 : tunables  120   60    0 : slabdata    139    139      0     filp                 210    480    128   30    1 : tunables  120   60    0 : slabdata     16     16      0     names_cache            2      2   4096    1    1 : tunables   24   12    0 : slabdata      2      2      0     idr_layer_cache       91    116    136   29    1 : tunables  120   60    0 : slabdata      4      4      0     buffer_head           28     72     52   72    1 : tunables  120   60    0 : slabdata      1      1      0     mm_struct             18     18    416    9    1 : tunables   54   27    0 : slabdata      2      2      0     vm_area_struct       228    276     84   46    1 : tunables  120   60    0 : slabdata      6      6      0     fs_cache              24    113     32  113    1 : tunables  120   60    0 : slabdata      1      1      0     files_cache           25     40    192   20    1 : tunables  120   60    0 : slabdata      2      2      0     signal_cache          63     63    416    9    1 : tunables   54   27    0 : slabdata      7      7      0     sighand_cache         27     27   1312    3    1 : tunables   24   12    0 : slabdata      9      9      0     task_struct           64     64   1024    4    1 : tunables   54   27    0 : slabdata     16     16      0     anon_vma             123    339      8  339    1 : tunables  120   60    0 : slabdata      1      1      0     pid                   76    118     64   59    1 : tunables  120   60    0 : slabdata      2      2      0     size-4194304(DMA)      0      0 4194304    1 1024 : tunables    1    1    0 : slabdata      0      0      0     size-4194304           0      0 4194304    1 1024 : tunables    1    1    0 : slabdata      0      0      0     size-2097152(DMA)      0      0 2097152    1  512 : tunables    1    1    0 : slabdata      0      0      0     size-2097152           0      0 2097152    1  512 : tunables    1    1    0 : slabdata      0      0      0     size-1048576(DMA)      0      0 1048576    1  256 : tunables    1    1    0 : slabdata      0      0      0     size-1048576           1      1 1048576    1  256 : tunables    1    1    0 : slabdata      1      1      0     size-524288(DMA)       0      0 524288    1  128 : tunables    1    1    0 : slabdata      0      0      0     size-524288            0      0 524288    1  128 : tunables    1    1    0 : slabdata      0      0      0     size-262144(DMA)       0      0 262144    1   64 : tunables    1    1    0 : slabdata      0      0      0     size-262144            0      0 262144    1   64 : tunables    1    1    0 : slabdata      0      0      0     size-131072(DMA)       0      0 131072    1   32 : tunables    8    4    0 : slabdata      0      0      0     size-131072            0      0 131072    1   32 : tunables    8    4    0 : slabdata      0      0      0     size-65536(DMA)        0      0  65536    1   16 : tunables    8    4    0 : slabdata      0      0      0     size-65536             2      2  65536    1   16 : tunables    8    4    0 : slabdata      2      2      0     size-32768(DMA)        0      0  32768    1    8 : tunables    8    4    0 : slabdata      0      0      0     size-32768             2      2  32768    1    8 : tunables    8    4    0 : slabdata      2      2      0     size-16384(DMA)        0      0  16384    1    4 : tunables    8    4    0 : slabdata      0      0      0     size-16384             2      2  16384    1    4 : tunables    8    4    0 : slabdata      2      2      0     size-8192(DMA)         0      0   8192    1    2 : tunables    8    4    0 : slabdata      0      0      0     size-8192              9      9   8192    1    2 : tunables    8    4    0 : slabdata      9      9      0     size-4096(DMA)         0      0   4096    1    1 : tunables   24   12    0 : slabdata      0      0      0     size-4096            625    625   4096    1    1 : tunables   24   12    0 : slabdata    625    625      0     size-2048(DMA)         0      0   2048    2    1 : tunables   24   12    0 : slabdata      0      0      0     size-2048            588    588   2048    2    1 : tunables   24   12    0 : slabdata    294    294      0     size-1024(DMA)         0      0   1024    4    1 : tunables   54   27    0 : slabdata      0      0      0     size-1024            136    136   1024    4    1 : tunables   54   27    0 : slabdata     34     34      0     size-512(DMA)          0      0    512    8    1 : tunables   54   27    0 : slabdata      0      0      0     size-512            1000   1000    512    8    1 : tunables   54   27    0 : slabdata    125    125      0     size-256(DMA)          0      0    256   15    1 : tunables  120   60    0 : slabdata      0      0      0     size-256             120    120    256   15    1 : tunables  120   60    0 : slabdata      8      8      0     size-192(DMA)          0      0    192   20    1 : tunables  120   60    0 : slabdata      0      0      0     size-192             120    120    192   20    1 : tunables  120   60    0 : slabdata      6      6      0     size-128(DMA)          0      0    128   30    1 : tunables  120   60    0 : slabdata      0      0      0     size-128             617    630    128   30    1 : tunables  120   60    0 : slabdata     21     21      0     size-96(DMA)           0      0     96   40    1 : tunables  120   60    0 : slabdata      0      0      0     size-96              151    160     96   40    1 : tunables  120   60    0 : slabdata      4      4      0     size-64(DMA)           0      0     64   59    1 : tunables  120   60    0 : slabdata      0      0      0     size-32(DMA)           0      0     32  113    1 : tunables  120   60    0 : slabdata      0      0      0     size-64             1298   1298     64   59    1 : tunables  120   60    0 : slabdata     22     22      0     size-32             4632   4859     32  113    1 : tunables  120   60    0 : slabdata     43     43      0     kmem_cache           147    160     96   40    1 : tunables  120   60    0 : slabdata      4      4      0


title: Directx application using wine over ssh -x

text: I'm trying to run a Windows app (Artemis video game - server mode) on my archlinux server. As it is an windows application I have to run it using Wine. As I'd like to be able to launch the server from anywhere, I'd like to do it using ssh -X (unfortunatelly this app can only be configured and launched on GUI mode) I manage to launch wine Artemis.exe on both my laptop (local install) and my server, however launching it using ssh -X gives me an error : ![enter image description here](http://i.stack.imgur.com/0K2kq.png) I'd like to poitn out that ssh -X works fine between those two. I managed to launch "wine notepad" using ssh -X ! It seams to come down to directX, which I don't really know about. I tried installing directX9 through winetricks on both the laptop and the server. Did anyone face this before ? Have you got any solution for me to try ?


title: Prerouting issue

text: I have three hosts: A, B and C. Let's say host A is continuously communicating with host C (e.g. poll - response). Now, I spoof both ARP tables of host and A and C with host B and want to block communication with host C, in order to make host A communicate with host B only. To perform redirection of traffic I used `iptables -t nat -A PREROUTING -i eth0 -p tcp --dport <port> -j DNAT --to <host B>` but it requires the connection on host A to be shut down and then up again for the traffic to be redirected. Is there anything missing so I dont have to stop and run the communication in host A everytime I try to spoof and redirect the traffic?


title: Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

text: Now, I have two users in my system using `fetchmail` with a personal `~/.fetchmailrc` and syncing there mails with the command `fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\` (In a cron but this isn’t important). Then, I would like to use the `/etc/init.d/fetchmail` service but always with the personal `fetchmailrc` of this tow users. I wouldn't like to use the `/etc/fetchmailrc` global conf. Is this possible? I know the possibility to make a global cron but before I would know if what I said is possible or not.


title: How to completely close linux from outside world?

text: This is theoretical question that seems to be interesting (at least for me). What would you do to completely close the whole system from outside world? By close I mean that any human shouldn't be able to login and it should only do some tasks with the simplest interface with outside world that is needed for them. It should be IMPOSSIBLE (ok - to possible extent ;) ) to access internal structure by anyone. However - after cutting power off, and restarting it that way - it should continue its work. I imagine that HDD should be encrypted, so after cutting power off - it shouldn't be possible to get anything from it. Is it possible or how close can we get? PS. I don't even know what tags to use :( .


title: External hard drive permissions - ext4

text: I have an external USB 3 disk drive (2TB capacity) that is most likely going to be moved from machine to machine. The disk has a GUID partition table and an ext4 partition. I am unable to write to the disk unless I elevate the process (`sudo`). As of now I am thinking of trying one or both of the following and would like to know the cons of each -   1. `chmod 777 /mnt/externalDrive`   2. `chown nobody:nogroup /mnt/externalDrive` If I give 777 permission and user1 (UID:1005) writes to it and I later move the disk to another computer where user7 is UID:1005, what happens? Does user7 become the owner of the file on that computer? It seems to me that I will periodically have to run `chown -R nobody:nogroup /mnt/externalDrive` on the disk. Is any of what I am considering an obvious bad practice? The disk will most likely contain videos, music and pictures none of it need to be protected like some financial data.


title: Is there a very small version of Linux which could be filled to own wish?

text: Is there a mini-Linux, which would be just practically terminal prompt and you could install environment on your own? Including programs, plugins, drivers, DE (desktop environment)? I'm currently using Ubuntu which seems like a good decision. But I'd like to have more control over the OS on ground level (by this I mean terminal level). Sometimes there are programs which I uncovered when installing new ones, that I don't think I'll use any time soon or ever... definitely never. I made my mini-research and it comes down to **Linux Arch** , which technically is what I'm asking for. But frankly, the OS is about 800MB big, so I expect it to have a lot of stuff I won't really need, again. Because as I remember, Ubuntu was about same size and it was pre-installed with everything. So. Do you maybe know empty Linux's OS? Just terminal? I can get driver for screen, sound, wireless and all other.


title: Why is =sys-libs/glibc-2.16's --enable-kernel is ignored on Gentoo Linux?

text: I'm trying to build eglibc support for old kernels, 2.6.9 in this case. So I set `NPTL_KERNEL_VER` in make.conf, and during configuration phrase I can see the `\--enable-kernel=2.6.9` parameter But this seems to be reverted:               checking installed Linux kernel header files... 2.6.19 or later     configure: WARNING: minimum kernel version reset to 2.6.16      Any ideas? (I'm building `=sys-libs/glibc-2.16` for `i686-pc-linux-gnu`.)


title: Debian package of Tomee plus

text: I'm looking for Debian package of Tomee plus but I have not found anything. Also, I would like to know if it is possible to download the package( on windows) then be installed on Debian or I have to download and install directly on Debian?


title: Decrypt second encrypted LVM during headless server boot?

text: I've followed this question https://unix.stackexchange.com/questions/5017/ssh- to-decrypt-encrypted-lvm-during-headless-server-boot and successfully remotely decrypted my root drive. However, I have a second drive that I also have encrpted, and unfortunately dropbear is killed by the boot process before second passphrase prompt for the second drive is shown and the main open-ssh server has not yet started so once again the headless system sits waiting for input indefinitely. Is there any way round this? The second drive will be used for private cloud data storage so needs to be encrypted to protect the data, and needs to be decrypted before the cloud service starts (which I haven't chosen or installed yet). Ubuntu 13.10 x64 server running headless, though I'm not totally tied to Ubuntu it is kinda convenient.


title: Fail to use "locate"

text: I have a file named `Fubini's_theorem.html` under some directory. But both               locate "Fubini's_theorem"      or               locate Fubini      do not return anything. The file has been there for months, and I am sure it is already in the database used by `locate`. So I wonder why the search is not successful? Thanks! My OS is Ubuntu 10.10.


title: Is there a way to limit overall CPU consumption?

text: My laptop (an HP with an i3 chip) overheats like crazy every time I run a resource heavy process (like a large compilation, extracting large tarballs or ... playing Flash). I am currently looking into some cooling solutions but got the idea of limiting global CPU consumption. I figured that if the CPU is capped, chances are the temperature will stop increasing frantically, and I'm willing to sacrifice a little performance in order to get the job done.   1. Am I wrong in my reasoning?    2. How can I proceed to cap the CPU usage overall? If it helps, I'm running Debian.


title: How do I get DVDs to play in Debian?

text: I just installed Debian Live and movie or video DVDs do not play. Totem gives me this error: > Could not read from resource. Opening the disk in VLC has no response. How can I play DVDs?


title: LyricWiki Audacious plugin

text: Just now I have discovered the LyricWiki plugin. The problem: it is not finding some lyrics, as you can see on the image. ![enter image description here](http://i.stack.imgur.com/4TRaT.png) But that lyric is available here: Я Так Тебя Жду Is it possible to add other lyrics source? How could I solve the problem?


title: What is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?

text: I have my 1TB disk partitioned in three main parts:   * /dev/sda1 NTFS SYSTEM 100 Mb    * /dev/sda2 NTFS Win7 469.12 Gb (too large!!)   * /dev/sda3 extended 373.36 Gb      * /dev/sda5/ ext4 358.21 Gb     * /dev/sda6 swap 15.15 Gb I want to resize my /dev/sda5 adding the unallocated space...but it is located left to sda5/. How can I organize it? I am working with GParted, but when I use Resize/Move option on sda5/ the unallocated space don’t appear on left. Thanks for getting back to me.    ![Image from GParted](http://i.stack.imgur.com/lm17R.png)                          ![Details about sda5/](http://i.stack.imgur.com/79R8Q.png)


title: How can I install Mint using Wubi on Windows 8?

text: I'm trying to install mint 15 on my laptop (with pre-installed windows 8.1) using mint4win. Every time I try to boot up with mint, it ends up on an error screen saying "windows failed to start. a recent hardware or software change might have caused this. The file is missing - file \linuxmint\winboot\wubildr.mbr - status 0xc000007b". Can anyone tell me how to proceed with mint installation?


title: Firefox discards URL when server connection times out or fails

text: I have two problems with Firefox:   1. When I type a non-existent server into the address bar, such as              http://xyz.example.com      I get "server not found", but when I try to fix the address, Firefox forgets the URL and I need to start all over.   2. When the server is taking a long time to respond, and I click on the `X` icon to stop loading the page, the URL disappears as well In both cases I want the URL to stay there in the address bar, so that I don't have to type it all over again. Is there a setting to make it do that? I am using `Firefox (Iceweasel) 24.7` on `Debian Wheezy`


title: How to set the prompt and tab-title on Gnome-Shell (Gnome 3, centos 7)

text: This is embarrassing, but I don't seem to be able to set the command-prompt or the shell title. I'm using Gnome3 on centos 7. **PROMPT** I've added the following to ~/.bashrc:               export PS1="\w \$ "      The prompt stays the same:               echo $PS1     [\u@\h \W]\$      I've also tried updating the ~/.bashrc without the export:               PS1="\w \$ "      Same result. It is almost like something is overriding it. **TITLE** As for the title I've tried the following:               echo -ne "\033]0;hi\007"      It doesn't take effect.


title: load module via /etc/modules

text: I want to load my kernel module `hello.ko` on boot in Ubuntu 12.04. I placed it in `/lib/modules/3.8.0-31-generic/kernel/ubuntu/hello.ko`, ran `depmod -a`, and added "hello" to `/etc/modules`. However, when I restart, there is no "hello" module in `lsmod`. In `/var/log/upstart/module-init-tools.log` there is a string "FATAL: Module hello not found." If I run `modprobe hello` everything is fine. What's wrong with `/etc/modules`? Where is it trying to find modules?


title: Xorg with Kernel Mode Settings won't work with other tty

text: Using intel video drivers with kms and i915 on arch linux I haven't been able to start Xorg in a different tty than from the calling one logged as root. By example: Logged as root on tty1               X vt7 :0      Freezes the PC and within the Xorg.0.log I see               intel(0): failed to set mode: Permission denied [13]      In the other hand Logged as root on tty1               X vt1 :0      Everything works as usual I know is not really a serious problem since I still can use Xorg but I'm really intrigued about this behavior for two main reasons   1. permissions for all tty1 ... tty49 are cwr-w----- root tty   2. even if a I'm logged in both tty1 and tty2 with root and try to start X server on tty2 from tty1 it doesn't work as if it only had permission for the calling tty Does anyone have and idea on what's going on?


title: Removable USB stick listed as non-removable in /sys/block?

text: In my question Bash script to output path to USB flash memory stick I got stuck on a problem nobody else seems to be having. (The issue also impedes my desire to use this answer: http://unix.stackexchange.com/a/60335/15010.) So I made that specific problem into this new question. Apparently removable devices listed in /sys/block end with 1. It is stated here: http://unix.stackexchange.com/a/80880/15010 and several other places in this http://unix.stackexchange.com and this principle is used in the answers I referenced above. My removable device, a Sandisk 64GB flash memory stick, is listed as:               /sys/block/sdl/removable:0      Apparently, removable devices should end in 1 (and my others do). Why does my USB memory stick not follow the rule? It was automounted by Dolphin. I'm running Kubuntu 12.04. Dolphin shows it as "59.6GiB Removable Media". And it is mounted (automatically) at /media/me/70E8-1567 `sudo blkid` shows it as:               /dev/sdl1: UUID="70E8-1567" TYPE="vfat".      'lsblk -do name,rm` shows:               sdl   0      And `lsusb -vv` shows:               Bus 001 Device 008: ID 0781:5530 SanDisk Corp. Cruzer     Device Descriptor:       bLength                18       bDescriptorType         1       bcdUSB               2.00       bDeviceClass            0 (Defined at Interface level)       bDeviceSubClass         0        bDeviceProtocol         0        bMaxPacketSize0        64       idVendor           0x0781 SanDisk Corp.       idProduct          0x5530 Cruzer       bcdDevice            2.01       iManufacturer           1        iProduct                2        iSerial                 3        bNumConfigurations      1       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength           32         bNumInterfaces          1         bConfigurationValue     1         iConfiguration          0          bmAttributes         0x80           (Bus Powered)         MaxPower              200mA         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       0           bNumEndpoints           2           bInterfaceClass         8 Mass Storage           bInterfaceSubClass      6 SCSI           bInterfaceProtocol     80 Bulk-Only           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x02  EP 2 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               1


title: How to reset all iptables settings?

text: Are there any simpler commands to these? (e.g.: a oneliner? can one command reset iptables/netfilter settings to this?)               IPTABLES="$(which iptables)"          # RESET DEFAULT POLICIES     $IPTABLES -P INPUT ACCEPT     $IPTABLES -P FORWARD ACCEPT     $IPTABLES -P OUTPUT ACCEPT     $IPTABLES -t nat -P PREROUTING ACCEPT     $IPTABLES -t nat -P POSTROUTING ACCEPT     $IPTABLES -t nat -P OUTPUT ACCEPT     $IPTABLES -t mangle -P PREROUTING ACCEPT     $IPTABLES -t mangle -P OUTPUT ACCEPT          # FLUSH ALL RULES, ERASE NON-DEFAULT CHAINS     $IPTABLES -F     $IPTABLES -X     $IPTABLES -t nat -F     $IPTABLES -t nat -X     $IPTABLES -t mangle -F     $IPTABLES -t mangle -X


title: Kernel inotify watch limit reached

text: I'm currently facing a problem on a linux box where as root I have commands returning error because inotify watch limit has been reached.               # tail -f /var/log/messages     [...]     tail: cannot watch '/var/log/messages': No space left on device     # inotifywatch -v /var/log/messages     Establishing watches...     Failed to watch /var/log/messages; upper limit on inotify watches reached!     Please increase the amount of inotify watches allowed per user via '/proc/sys/fs/inotify/max_user_watches'.`       I googled a bit and every solution I found is to increase the limit with:               sudo sysctl fs.inotify.max_user_watches=<some random high number>      But I was unable to find any information of the consequences of raising that value. I guess the default kernel value was set for a reason but it seems to be inadequate for particular usages. (e.g., when using Dropbox with a large number of folder, or software that monitors a lot of files) So here are my questions:   * Is it safe to raise that value and what would be the consequences of a too high value?    * Is there a way to find out what are the currently set watches and which process set them to be able to determine if the reached limit is not caused by a faulty software?


title: How do I unset a background in gnome on the command line?

text: So someone decided to set my gnome background as a practical joke to a rather disturbing picture. However, I don't use gnome and only log into it by accident. I need to remove the picture so when I accidently log into gnome it's not there. Can someone tell me what part of what file to modify?


title: prevent XFCE from showing display settings on laptop lid close/open

text: When I close or open my laptop lid, xfce executes _xfce4-display-settings --minimal_. I want to make that stop, but how? I found nothing in the settings under _/etc/xdg/xfce4_ and _.config/xfce4_.


title: Parenthesis in bash arithmetic: 3 * (2 + 1)

text: `expr` does not seem to like parenthesis (used in mathematics to explicit operator priority):               expr 3 * (2 + 1)     bash: syntax error near unexpected token `('      How to express operator priority in bash?


title: Create a new file by removing the new line character at the end of file

text: I have a flat file which contains the following data records between H: and T:.               H:20050427 HEADER RECORD     0000000 00000 000000000 123456 00 654321 DATARECORD     0000000 00000 000000000 123456 00 654321 DATARECORD     0000000 00000 000000000 123456 00 654321 DATARECORD     0000000 00000 000000000 123456 00 654321 DATARECORD     T:20050427 TRAILER RECORD     [blank space]      [blank space] is a new line (carriage return key) created with no records after T: How do I remove the blank space(s) (if present) from the file and create a new file with data which are present between H: and T:?


title: Is there a (preferably non-kludgey) way to avoid spelling corrections when using zsh's `mv` command

text: Although I love zsh, and find its spelling correction useful, it is annoying that it corrects things that **_obviously_** should not be corrected. For instance, I just executed               mv iso_ iso      and it replied               zsh: correct 'iso' to 'iso_' [nyae]?      Think about it. Correcting 'iso' to 'iso_' would mean I was trying to execute               mv iso_ iso_      which would NEVER make sense. Therefore this is really a design flaw in zsh, and should be corrected across the board. But, given that it hasn't been (at least in the version I'm using) and it isn't likely to be, is there some setting to correct it? I would prefer a non-kludgey way of fixing it. Aliases for `mv`, for example, are kludgey.


title: Perl piping some out of script and some to the screen

text: How do I pipe some output to screen and some other selected output, out of the Perl script?


title: Backup and synchronization

text: I want to synchronize my personal document repository between my different computers in my home. Today this folder is under a dedicated partition of the hard drive of a dual boot workstation. My configuration is the following one:   1. Dual boot Workstation running Ubuntu 11 and windows Xp (the documents are simply shared using the dedicated partition)   2. Laptop running Ubuntu 12.04 (Today no access to the documents)   3. A freebox with an external hard drive pluged to it What I want is to be able to synchronize this document folder also with the laptop and in addition to have a "backup" of this on the hard drive attached to the freebox. What tools should I use for this (`rsync`, `unison`, others?)


title: Adding commands to initrd image

text: Whenever I enter into initrd prompt, I know that not every command is executed in that prompt. Can somebody tell me how I can add more commands support in that initrd prompt. It would be nice if you can provide with me some reference materials.


title: Does flashplugin still use mms.cfg?

text: I was poking around the flashplugin of Adobe for Linux trying to get the Hardware Acceleration working (which my current configuration supports). Then I found several forums/blogs that recommend I create/modify some or other value in the `/etc/adobe/mms.cfg`, which didn't help at all for my current situation. This leads me to think, does the Flash non-free plugin of Adobe for Linux read this file for configuration? Is there another way to modify Flash configuration without the traditional GUI's (`flash-player-properties` doesn't help in the HWA topic and I am already tired of ticking the box Right-click -> Settings -> Enable Hardware Acceleration)? I'm using Iceweasel 24.0a2, Debian Wheezy 7.0, _Shockwave Flash 11.2 r202 11,2,202,297_.               $ glxinfo | grep render     direct rendering: Yes     OpenGL renderer string: Gallium 0.4 on ATI RV515


title: Kernel/grub : how override root parameter inside initrd script

text: I have an old kernel ( 2.4.37.9 ) and I want to override or substitute the root=XXXXX parameter to send to the kernel inside the initrd script. I already made some attempt to do that but it seems that at the end of initrd grub alway pass to kernel the root parameter define inside the menu.lst file, while I'm tryng to define a dynamic value ( ex. hda1 or hdc1 ) depending of the layout of th mother board.               title Linux-2.4.37.9_CCL_20130122 with INITRD         root (hd0,0)         kernel /boot/vmlinuz-2.4.37.9_CCL_20130122  ro root=XXXXXX console=ttyS0,9600 console=tty0 apm=off         initrd /boot/initrd-CCL.img.gz      Any suggestions ?


title: Is it possible to run any distro from RAM from within an .iso saved on an NTFS file system?

text: Running entirely from RAM been done on various distros such as Slax, DamnSmallLinux, and newer Ubuntu versions, and since I have 8GB it seems reasonable that I could run many distros entirely from RAM (as long as I select one that has the ability). I would like to do this with `OpenELEC` (or any distro), and with a further complication: I'm a `.NET` developer, work and primarily use Windows, which means NTFS and FAT32 are my preferred file systems. Until the day comes if and when Windows can natively read/write ext partitions, this won't change. Ext2fck won't even install in Windows 8, so there's no convincing me of the 'merits' of having drives and partitions in an unreadable format to my daily operation. There's also things like `syslinux`, `vmlinuz`, `extlinux` and the like that can load `.iso` files into RAM and effectively bootload them. To add icing on the cake, Windows' bootloader will allow me to add these as options in the native Windows boot menu, which I have done for UBCD 5.11, and will even work for virtual file systems like `.vhd`, etc. ### So, here's my dream: I want to combine all three into one. I want to take an installed ext2/ext3/ext4 partition, in this case an install of OpenELEC, compress it into an .iso, and create an entry in my boot menu that will either do this directly, or pass it to syslinux or the like that will do the following: Extract the .iso completely into RAM as an ext2/3/4 partition and boot into that OS in RAM. I'll then mount my NTFS hard drive for the /STORAGE portion of the OpenELEC install with ntfs-3g. Then, as a bonus, on exit I'd have the system recompress itself to an .iso, and if successful replace the initial .iso thereby persisting my changes across boots (provided the shutdown was successful). It wouldn't have to copy itself from memory, either: it could copy any files/changes it wanted to track (if some were not available) back onto the drive it booted from, if present, then compress that back into an .iso. Slax, DSL and Ubuntu can boot to RAM and persist changes, so I know it's possible if your OS supports it. I'm wondering if this can be made into a 'works for any distro you want'. Slax saves your changes in an ext directory /slax/changes if it's on an ext partition, or as changes.dat otherwise (for NTFS/FAT32). This solution could work too, I suppose, but would probably require more interaction with the hosted OS to coordinate this than using the .iso. ### So, how close can I get? Are there easy solutions for this already out there? Would I have to write a custom 'SYSLINUX'/'ISOLINUX'/'EXTLINUX'/'VMLINUX? What would be required to make this happen, and if it's possible already how do I get started?


title: What happens if a file is modified while you're copying it?

text: What is the effect of copying a file say fileA.big (900mb) from location B to locationC. If during that cp operation, say 35% through the process, fileA.big is appended with new information and grows from 900mb to 930mb. What is the result of the end copy (i.e. fileA.big at locationC)? What if the copy is about 70% through, and the original file is updated but this time truncated to 400mb (i.e. the progress of the copy is beyond the truncation point), what is the result of the end copy? Referring to a linux OS on an ext3/ext4 filesystem. No volume shadow magic etc.. Just plain old cp. Curiousity sparked by copying live couchdb files for backup, but more interested in general scenarios rather than specific use case.


title: How to execute command on list of file names in a file?

text: I have listed the names of the files which are to be deleted into a file. How can I pass the file to `rm` command so that it should delete them one by one.


title: sudo: apt-get: command not found

text: I am trying to install aircrack-ng in my Sabayon 9 by the use of this command: `sudo apt-get install aircrack-ng` but it says: `sudo: apt-get: command not found` How to install it?


title: pmap and memory usage

text: On Ubuntu 12.04, I have several apache2 processes running (the 1130 parent and the children it spawned), and as you can see, they have around 300-400 mb of virtual memory and 10 mb of resident memory:               $ ps aux | grep apache2     root      1130  0.0  0.1 149080 10600 ?        Ss   Jul11   0:03 /usr/sbin/apache2 -k start     www-data 23440  0.0  0.3 163660 24096 ?        S    10:46   0:01 /usr/sbin/apache2 -k start     www-data 27349  0.0  0.3 163380 23768 ?        S    13:16   0:01 /usr/sbin/apache2 -k start     www-data 27949  0.0  0.3 163912 24300 ?        S    13:36   0:01 /usr/sbin/apache2 -k start     www-data 28568  0.0  0.3 161496 22852 ?        S    14:15   0:00 /usr/sbin/apache2 -k start     www-data 28622  0.0  0.3 163656 23924 ?        S    14:18   0:00 /usr/sbin/apache2 -k start     www-data 28874  0.0  0.3 163600 23636 ?        S    14:33   0:00 /usr/sbin/apache2 -k start     www-data 28881  0.0  0.1 149368  7840 ?        S    14:33   0:00 /usr/sbin/apache2 -k start     www-data 28884  0.0  0.2 152856 12768 ?        S    14:33   0:00 /usr/sbin/apache2 -k start     www-data 29459  0.0  0.1 149368  7788 ?        S    15:07   0:00 /usr/sbin/apache2 -k start     www-data 29531  0.0  0.1 149184  7256 ?        S    15:10   0:00 /usr/sbin/apache2 -k start     1000     29543  0.0  0.0   8112   900 pts/0    S+   15:11   0:00 grep apache2      The problem with using virtual memory and resident memory as a measure of memory usage is that many of these processes may be using shared libraries and therefore the individual memory usage of these processes may not be accurate. So pmap is often used instead. pmap gives the the "writeable/private" total of a process, which can be considered the incremental cost of this process, factoring out the shared libraries. So I take a specific process, let's say, 23440 and try to find out its memory usage:               $ pmap -d 23440     23440:   /usr/sbin/apache2 -k start     Address           Kbytes Mode  Offset           Device    Mapping     mapped: 0K    writeable/private: 0K    shared: 0K      Ok so that didn't tell me anything. What is going on?


title: Why does cron silently fail to run sudo stuff in my script?

text: I have a script run from a non-privaleged users' crontab that invokes some commands using `sudo`. Except it doesn't. The script runs fine but the sudo'ed commands silently fail.   * The script runs perfectly from a shell as the user in question.   * Sudo does not require a password. The user in question has `(root) NOPASSWD: ALL` access granted in `/etc/sudoers`.   * Cron is running and executing the script. Adding a simple `date > /tmp/log` produces output at the right time.   * It's not a permissions problem. Again the script does get executed, just not the sudo'ed commands.   * It's not a path problem. Running `env` from inside the script being run shows the correct `$PATH` variable that includes the path to sudo. Running it using a full path doesn't help. The command being executed is being given the full path name.   * Trying to capture the output of the sudo command including STDERR doesn't show anything useful. Adding `sudo echo test 2>&1 > /tmp/log` to the script produces a blank log.   * The sudo binary itself executes fine and recognizes that it has permissions even when run from cron inside the script. Adding `sudo -l > /tmp/log` to the script produces the output:  > User ec2-user may run the following commands on this host:   >  (root) NOPASSWD: ALL Examining the exit code of the command using `$?` shows it is returning an error (exit code: `1`), but no error seems to be produced. A command as simple as `/usr/bin/sudo /bin/echo test` returns the same error code. **What else could be going on?** This is a recently created virtual machine running the latest Amazon Linux AMI. The crontab belongs to the user `ec2-user` and the sudoers file is the distribution default.


title: Debian 7 resets user settings and/or forgets them

text: I just installed Debian 7 (I've been a long time Windows user,and I tried Ubuntu 13.0x for 2-3 months and did not like it all that much,so I switched to Deb...). No problems in the installation or during the installation. Now,the problem that I'm facing is : After I do something in Debian, the thing I did is reset to default after a normal reset of the computer. For instance, I put in the menu/dockbar [whatever it's called -- on the left side of the screen] some applications (Chrome, calculator, music player, Gedit) and all is fine,but after I reset the PC the menu reverts back to what it used to be/default. Like D7 has forgotten the settings. Similar, when I go to System Settings > Keyboards > Shortcuts > Custom shortcuts ... any / all custom shortcuts I add [like,`Ctrl`+`Alt`+`t` for the terminal, as it is in Ubuntu], are immediately wiped/erased. This happens to some other applications as well (like, "weather" -- the gnome shell extension, I add something custom -- my location for instance, and it is erased immediately) or any other application where I can add/store custom information that is relevant to my user profile... it is either erased/forgotten immediately upon selecting OK or exiting the app, or resetting the PC. (All Programs/Applications that i have installed via the terminal using sudo apt-get install "program name" ,have been installed without any problems and are running just fine.)


title: Page gets cut in the half if I print from Chrome or Google Cloud but with Firefox doesn't

text: I'm setting up print server for custom thermal printer on RaspberryPi running Linux Debian and I have a strange problem. If I print a test page it prints OK, same with web page from Firefox, but when I try print from Google Chrome or Google Cloud Printing (I set up cloud printing server), half of page is cut, like there's wrong width defined. In PDF viewer when I just click 'Print' it prints in wrong format, but when I enter in printer properties (just enter and close, no changes!) it prints OK. I made `PPD` file for this printer manually, but it looks OK compared to other `PPD`s. Any ideas? **Edit:**   If I'm printing from safari on iOS google page is scaled properly, but others aren't. Here's my PPD file:               *PPD-Adobe: "4.3"     *%%%% PPD file for Label Printer with CUPS.     *%%%% Created by the CUPS PPD Compiler CUPS v1.5.3.     *% Copyright 2007-2011 by Apple Inc.     *% Copyright 1997-2007 by Easy Software Products.     *%      *% These coded instructions, statements, and computer programs are the     *% property of Apple Inc. and are protected by Federal copyright     *% law.  Distribution and use rights are outlined in the file "LICENSE.txt"     *% which should have been included with this file.  If this file is     *% file is missing or damaged, see the license at "http://www.cups.org/".     *FormatVersion: "4.3"     *FileVersion: "1.5"     *LanguageVersion: English     *LanguageEncoding: ISOLatin1     *PCFileName: "mefa2012-4.ppd"     *Product: "Mefa 2012-4"     *Manufacturer: "Mefa"     *ModelName: "MEFA2012-2"     *ShortNickName: "MEFA2012-2"     *NickName: "Mefa 2012-4"     *PSVersion: "(3010.000) 0"     *LanguageLevel: "3"     *ColorDevice: False     *DefaultColorSpace: Gray     *FileSystem: False     *Throughput: "8"     *LandscapeOrientation: Plus90     *TTRasterizer: Type42     *% Driver-defined attributes...     *RequiresPageRegion All: True     *cupsVersion: 1.5     *cupsModelNumber: 0     *cupsManualCopies: False     *cupsFilter: "application/vnd.cups-raster 0 rastertolabel"     *cupsLanguages: "en"     *OpenUI *PageSize/Media Size: PickOne     *OrderDependency: 10 AnySetup *PageSize     *DefaultPageSize: Def     *PageSize Def/112 x 149 mm:"<</PageSize[318 421]/ImagingBBox null>>setpagedevice"     *PageSize w112h158/112 x 158 mm: "<</PageSize[318 448]/ImagingBBox null>>setpagedevice"     *PageSize w112h210/112 x 210 mm: "<</PageSize[318 596]/ImagingBBox null>>setpagedevice"     *PageSize w112h297/112 x 297 mm: "<</PageSize[318 843]/ImagingBBox null>>setpagedevice"     *CloseUI: *PageSize     *OpenUI *PageRegion/Media Size: PickOne     *OrderDependency: 10 AnySetup *PageRegion     *DefaultPageRegion: Def     *PageRegion Def/112 x 149 mm: "<</PageSize[318 421]/ImagingBBox null>>setpagedevice"     *PageRegion w112h158/112 x 158 mm: "<</PageSize[318 448]/ImagingBBox null>>setpagedevice"     *PageRegion w112h210/112 x 210 mm: "<</PageSize[318 596]/ImagingBBox null>>setpagedevice"     *PageRegion w112h297/112 x 297 mm: "<</PageSize[318 843]/ImagingBBox null>>setpagedevice"     *CloseUI: *PageRegion     *DefaultImageableArea: Def     *ImageableArea Def/112 x 149 mm: "11.3 0 306.1 421.3596"     *ImageableArea w112h158/112 x 158 mm: "11.3 0 306.1 448.315"      *ImageableArea w112h210/112 x 210 mm: "11.3 0 306.1 595.862"     *ImageableArea w112h297/112 x 297 mm: "11.3 0 306.1 842.719"     *DefaultPaperDimension: Def     *PaperDimension Def/112 x 149 mm: "317 421"     *PaperDimension w112h158/112 x 158 mm: "317 448"     *PaperDimension w112h210/112 x 210 mm: "317 596"     *PaperDimension w112h297/112 x 297 mm: "317 843"     *MaxMediaWidth: "317"     *MaxMediaHeight: "843"     *HWMargins: 11 0 11 0     *OpenUI *Resolution/Resolution: PickOne     *OrderDependency: 10 AnySetup *Resolution     *DefaultResolution: 203dpi     *Resolution 203dpi/203dpi: "<</HWResolution[203 203]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"     *CloseUI: *Resolution     *OpenUI *cupsDarkness/Darkness: PickOne     *OrderDependency: 10 AnySetup *cupsDarkness     *DefaultcupsDarkness: Normal     *cupsDarkness Light/Light: "<</cupsCompression 0>>setpagedevice"     *cupsDarkness Medium/Medium: "<</cupsCompression 1>>setpagedevice"     *cupsDarkness Normal/Normal: "<</cupsCompression 2>>setpagedevice"     *cupsDarkness Dark/Dark: "<</cupsCompression 3>>setpagedevice"     *CloseUI: *cupsDarkness     *DefaultFont: Courier     *Font AvantGarde-Book: Standard "(1.05)" Standard ROM     *Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM     *Font AvantGarde-Demi: Standard "(1.05)" Standard ROM     *Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM     *Font Bookman-Demi: Standard "(1.05)" Standard ROM     *Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM     *Font Bookman-Light: Standard "(1.05)" Standard ROM     *Font Bookman-LightItalic: Standard "(1.05)" Standard ROM     *Font Courier: Standard "(1.05)" Standard ROM     *Font Courier-Bold: Standard "(1.05)" Standard ROM     *Font Courier-BoldOblique: Standard "(1.05)" Standard ROM     *Font Courier-Oblique: Standard "(1.05)" Standard ROM     *Font Helvetica: Standard "(1.05)" Standard ROM     *Font Helvetica-Bold: Standard "(1.05)" Standard ROM     *Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Oblique: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM     *Font Palatino-Bold: Standard "(1.05)" Standard ROM     *Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM     *Font Palatino-Italic: Standard "(1.05)" Standard ROM     *Font Palatino-Roman: Standard "(1.05)" Standard ROM     *Font Symbol: Special "(001.005)" Special ROM     *Font Times-Bold: Standard "(1.05)" Standard ROM     *Font Times-BoldItalic: Standard "(1.05)" Standard ROM     *Font Times-Italic: Standard "(1.05)" Standard ROM     *Font Times-Roman: Standard "(1.05)" Standard ROM     *Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM     *Font ZapfDingbats: Special "(001.005)" Special ROM     *% End of mefa2012-4.ppd, 07287 bytes.


title: btrfs on openSUSE not releasing disk space

text: I have an openSUSE 12.1 install on my main desktop running with btrfs filesystem for root (/boot is ext4). I started having issues today with KDE informing me that disk space is almost all gone and eventually it decided it was gone and crashed my desktop. I used Alt+F1 to switch to a terminal screen and although I was sure I was no where near the 1TB limit of my hard disk I moved some 150/200GB of music and video files onto an external drive and rebooted. Didn't help, same problem, same crash. Once more I switched to a terminal screen and used du to confirm that I had indeed only used about half of my total diskspace but df (including the btrfs- progs version) insists I have used 100% of available diskspace and so my desktop crashes each and every time I log in. Using the btrfs defrag utility doesn't help either. As such I am at a bit of a loss as to where to go next.


title: target/build CFLAGS mixup when cross-emerging due to bug or my stupidity?

text: I'm trying to emerge LLVM using emerge from a crossdev (for ARM) overlay in Gentoo. I've set the CFLAG of the overlay to optimise for arm (-march=armv6j), which seems to make ./configure fail on the "checking for executable suffix on build platform" with the message "error: installation or configuration problem: compiler cannot create executables" due to "bad value (armv6j) for -march= switch"; suggesting that it is trying to use the CFLAGS of the crossdev overlay even when not cross compiling. My question is if this is most likely due to a bug in the ebuild/package/llvm or due to me being silly (as far as I've been able to tell LLVM should be pretty cross compilable)? I've pasted the relevant output/logs here, in case they turn out to clarify anything.


title: Inner function call with xargs parameters

text: I am trying to create a file occurent within my `/tmp` directory of each file containing a speicific string. The problem is that the call to `basename {}` does not seem to work. Neither this, neither `echo basename {}`.               grep -R 'mystring' . | cut -d: -f 1 | uniq | xargs -n 1 -I {} touch /tmp/`basename {}`      Does anybody know how could I get the basename function executed on the xargs parameter ?


title: Backup files with tar command and progress bar?

text: ![enter image description here](http://i.stack.imgur.com/ba8NL.png)Can I see a progress bar or something not only ust the terminal screen output while backing up? Here is my shell script that I used backup with `tar` command:               # !/bin/bash           DATEJOUR=$(date +"%Y-%m-%d-%H-%M-%S")      REPABACKUPER="--exclude=/home/(username)/myfolders \      --exclude=/home/(username)/backup                  \      --exclude=/proc                                    \      --exclude=/lost+found                              \      --exclude=/mnt                                     \      --exclude=/media                                   \      --exclude=/sys /"      REPBACKUP="/home/(username)/backup"      NOMFIC=$REPBACKUP/Pavilion_backup-$DATEJOUR.tar.bz2           sudo tar cvpjf $NOMFIC $REPABACKUPER                exit $?


title: Is there a command line utility that copy files with progress information?

text: > **Possible Duplicate:**   >  move files with progress bar cp gets the job done but it would be nice if it had a little more feedback. Are there any utilities out there that do this? Personally, my ideal feedback would be a progress bar. But, I would take something as basic as output listing the files being copied as they are completed. Thanks!


title: Can I copy a folder with a progress bar?

text: I want to copy a folder with some kind of progress bar. I tried "pv" (Pipe Viewer) but it seems there is no way to copy a folder. Actually I'm not interested in using a script for pv - I would prefer some 'ready-to-go' package.


title: Measure pipe throughput in the shell

text: There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of:               $ somecommand | anothercommand      you can do something like:               $ somecomand | ??? | anothercommand      And throughput stats (bytes/sec) are prited to stderr, I think. But I can't for the life of me remember what that command was. Hints?


title: Where do X error messages go?

text: If I start an X application from a terminal, the error messages go to the terminal. If I start them from a GUI, where do the error messages go, or alternatively how are they dealt with?


title: Execute Nohup command with input

text: In UNIX, I have a process that I want to run using nohup. However this process will at some point wait at a prompt where I have to enter yes or no for it to continue. So far, in UNIX I have been doing the following               nohup myprocess <<EOF     y     EOF      So I start the process 'myprocess' using nohup and pipe in a file with 'y' then close the file. The lines above are effectively three seperate commands - i.e. I hit enter on the first line in UNIX, then I get a prompt where I enter 'y' and then press enter to then finally type 'EOF' and hit return again. So this works perfectly but my problem is below... I want to know execute this in Perl but I am not sure how I can execute this command as it is over three lines. I don't know if the following will work....               my $startprocess = `nohup myprocess <<EOF &     y     EOF     `


title: Why does Bash's "source" command behave differently when called from a function?

text: Given the following sourceable `bar` Bash script ...               echo :$#:"$@":      ... and the following executable `foo` Bash script:               echo -n source bar:     source bar     echo -n source bar foo:     source bar foo          function _import {       source "$@"     }          echo -n _import bar:     _import bar     echo -n _import bar foo:     _import bar foo      I get the following output when running the `foo` Bash script, i.e. `./foo`:               source bar::0::     source bar foo::1:foo:     _import bar::1:bar:     _import bar foo::1:foo:      Here are my questions:   1. Why does it make a difference when I call Bash's `source` command from the `_import` function as opposed to directly?   2. How can I normalize the behavior of Bash's `source` command? I'm using Bash version 4.2.47(1)-release on Fedora version 20.


title: OpenVPN uses wrong IP-Address

text: I've installed OpenVPN on a client (behind NAT-Router) and a VPS server. The tunnel is established. However, ping is only possible from client to server. The server uses its public IP address on tun0 when trying to ping the client:               13:03:56.766564 IP publicIP > 192.168.11.8: ICMP echo request, id 12279, seq 46, length 64      The routing table seems to be correct:               root@:~# route     Kernel IP routing table     Destination Gateway Genmask Flags Metric Ref Use Iface     192.168.11.2 * 255.255.255.255 UH 0 0 0 tun0     184.x.x.x * 255.255.255.0 U 0 0 0 venet0     192.168.11.0 192.168.11.2 255.255.255.0 UG 0 0 0 tun0     default * 0.0.0.0 U 0 0 0 venet0      What's wrong? Why is it using the public IP? (It is a OpenVZ Container).


title: Setting a program as the wallpaper

text: From Neal Stephenson's _Cryptonomicon_ : > The background of his [X] screen happens to be a uniform indigo at the > moment, but it could be an image. Theoretically you could use a movie ... > You can, in fact, take any piece of software and make it into your screen > background ... How would you set a program as the desktop "wallpaper"?


title: gdb debugging in Terminal OS X (10.8.5) with zsh - zsh doesn't know gdb

text: For my studies I have to run a binary unix-program called `bomb` with gdb. Some time ago I followed the steps on http://jakoblaegdsmand.com/blog/2013/04/how-to-get-an-awesome-looking- terminal-on-mac-os-x/ and made some changes to my terminal-setup. When I tryed run`bomb` with gdb there seems to be something wrong:                -> bomb207  gdb bomb                zsh: correct 'gdb' to 'gdv' [nyae]? n     zsh: command not found: gdb      When I type 'man gdb' zsh answers 'No manual entry for gdb' How can I change my terminal-setup to support gdb? ps. I already installed the command line tools for os x with x code and I didn't had any problems until now...   bomb207 is the current directory and the location of `bomb`.


title: What is the difference between a builtin command and one that is not?

text: Is there any intrinsic difference between a builtin command and another command which can nominally do the same thing? eg. Do builtins get "special" treatement? ... is there less overhead running them? .. or are they just simply 'built in'; like the dashboard of your car? ...and is there a definitive (current) list of these builtins?


title: How to move all files plus hidden to folder down?

text: I want to move all my drupal files in www folder to html folder. I don't know how to do this in terminal and I'm not sure if all folder and files including hidden ones are drupal in the www folder, is there a way of checking the lesser obvious ones or would www have been empty before and any hidden files will auto recreate?


title: Cannot connect to wireless at School

text: I'm using Debian Mint and my internet has worked everywhere on earth (Home, Mcdonalds, other peoples homes) except at school where I really need it. It will always see the networks and will 'try' to connect but will never be able to do so. Occasionally it will work if I reboot, and disconnect networking, and reconnect, but only occasionally. It works perfectly if I dual boot to Windows so it's kinda frustrating. Power management is off, and Tx power is at 15db.


title: Unable to execute command in the Linux with an user

text: Two scenarios here. Sudo rights are given for a particular group. a. A new user is created and is assigned to the group. b. Using this user, when we execute commands via shell script it is unable to execute any of the commands (eg., mkdir), it displays 'command not found' error. but a. When same command is executed in an open terminal it does execute and creates directories. Any idea about the same would be greatly helpful. Let me know if you need more information on this.


title: Set default login path in ssh config

text: I use the following config in my ssh config file:               Host host1       Hostname host1       User root        ForwardAgent yes        Port 22        ProxyCommand ssh -q user@host2 nc %h %p       Is there a way to jump to a specific path when I connect using `ssh host1`? I need this for shortening my rsync commands. For example instead of typing: `rsync dir1 host1:/var/www/dir0/dir1/` I want to type: `rsync dir1 host1`


title: Different error messages when using different strings in terminal

text: When I insert, for example, `unix.stackexchange.com` followed by `Enter` in terminal, I get the following error:               unix.stackexchange.com: **command not found** This is ok and as I expected. But when I insert `http://unix.stackexchange.com`, I get another error message:               bash: http://unix.stackexchange.com: **No such file or directory** I do not ask about why I get errors. I want to know why these are different and, eventually, which process/function handles them?


title: Which is more widely used: chmod 777 or chmod a+rwx

text: Out of the two options to change permissions:   * `chmod 777 file.txt`   * `chmod a+rwx file.txt` I am writing a document to send out to our customers, detailing that they need to change the file permissions of a certain file. I want to detail it as the most common way of changing file permissions. Currently is says:               - Set permissions on file.txt as per the example below:         - chmod 777 /tmp/file.txt      This is just an example, and won't change files to have full permissions for everyone.


title: Map file to URL

text: I'm looking for a way to do something like this:               some_tool --go-to-background http://server.com/~me/uber_vimrc ~/.vimrc      After which, reading `~/.vimrc` would give the data downloaded from that URL. Read-only mapping is enough, though support for writing (through a REST API or whatever) would be cool. Is this possible with some existing utility? **The key aspect I am after is mapping individual URL to individual file from user account on demand.** Needing a system daemon to support this is ok, and other schemes like _ftp_ or _scp_ would be ok too, does not have to be _http(s)_. * * * If there's no existing utility, what would be the general mechanism to implement this myself? Symbolic link to FUSE file system which implements the network communication part comes to mind as a possible way. Is there any simpler way?


title: Please explain what happens when I run this Makefile

text: I'm learning flex and (for really the first time) using the command line. I created a Makefile to simplify my testing process but I don't understand why the commands are in reverse. For instance, in the terminal the order is as such:               flex test.l      this creates the file `lex.yy.c` then I compile that:               g++ lex.yy.c -ll -o test      The Makefile reads backwards:               test: lex.yy.c          g++ lex.yy.c -ll -o test          lex.yy.c: test.l          flex test.l      So what happens specifically when I run `make`?


title: regex, only the first occurence

text: I have a pipelined output from `free -o -m | awk '{print $4}'` I want take step by step two numbers the first and the second line. So i need two regexes. I tried with `^[0-9]{1,3}$` but this match all occurences. i.e. 111 222 333 I want only 111 by first and 222 by second regex.


title: Paritioning Scheme: Arch Linux server & laptop

text: **What would be a good partitioning scheme for an Arch Linux installation, _on a server and on a laptop?_** **My current basic scheme:**               /         [root]       ext4     /home                  ext4     swap      I know that the /var partition will contain many small files such as logs or pacman-related files, and the /tmp directory will be written to frequently as well. **1)** Would I benefit from separate `"/var"` and/or `"/tmp"` partitions? **2)** If so, what filesystems would you recommend on each of these partitions? **3)** Is there a difference between the home server and the laptop? Should they have different partitioning schemes?   * The home server's system will be installed on a 80GB hard drive (it has an unrelated second 500GB HD).   * The laptop's system will be installed in a single 500GB hard drive, and the plan is to dedicate the remaining space to the `/home` partition. **4)** How much space do you recommend dedicating to each partition (including root, and possibly /var & /tmp) on each system ( _server/laptop_ )? [note: I will be using LVM on both systems] * * * Some extra information: The server will run samba/rtorrent/ssh/LAMP/etc. and some backup mechanism. The laptop will be used as a PC, mainly internet & programming or other day-to-day software, but might run some servers for testing purposes (e.g LAMP).


title: Global variable for every script

text: I want to declare a variable in such way that every script can access and alter its value. I have written a script that set the value of a variable called flag on exit and I am using a `crontab` entry to run it every minute. I want flag value to be initialized from previous exit value. Is there any way to do so?


title: Using ssh_alias with ssh tunneling

text: I am using ssh tunneling to login to system behind gateway. Problem is that I have ssh_alias defined in ~/.ssh/config on gateway server. Where I have key and ip setup. But those alias don't work with nc command. Is there a way to use alias with nc command and use keys setting done on gateway server? So I don't need to download key on local server. Example: GatewayServer               ~/.ssh/config     Host test     HostName 192.168.1.10     IdentityFile ~/keys/test     User test      LocalServer ~/.ssh/config                 Host test       ProxyCommand ssh gateway nc %h %p      Following configuration fails as nc don't know about test.


title: How to attach gnu screen without knowing tty number

text: After starting multiple gnu screen sessions with               screen -S name1     screen -S name2      I would like to selectively attach to them. If I do               screen -D -R name1      it will not attach but instead print:               There are several suitable screens on:         6799.name1        (08.02.2013 15:47:23)   (Detached)         3661.name2        (08.02.2013 13:43:25)   (Detached)     Type "screen [-d] -r [pid.]tty.host" to resume one of them.      It works obviously if I type:               screen -D -R 6799.name1      But I would like to attach without knowing the tty number, because I want to start the screen sessions by a script which takes the name as argument. Not knowing the tty number at this time I would need to copy by hand this number whenever I want to reattach later. An obvious solution would be to extract the tty number from the above screen output using string operations. But that seems a little awkward. Is there a way to tell screen to attach to a specific named session, whatever the tty number is? Note that I tried the different `[-d|-D] [-r|-R]` combinations mentioned in the man pages. * * * Note added: I create the separate screen sessions in a script using ssh with               ssh -t ${host} "         screen -S \"$exefile\" -t \"$exefile\" -R "nice -n$prio \"$exefile\" ${exeparams[@]}";          exit 0";      Later I try to connect using               ssh -t ${host} "         screen -D -R -S \"$exefile\" &&          echo \"finished.\";          exit";      where `$exefile` is the name of the executable and the screen session I want to connect to.


title: Linux without any distribution

text: > **Possible Duplicate:**   >  Is it possible to install the linux kernel alone? I had watched the documentary Revolution OS and there is a basic operating System by GNU and the kernel by Linux. Then there come distributions which are modified versions of the Linux operating system. I want the Operating System which is the default Linux operating system and not any distribution. I have tried to look at the Linux website but there is information about distributions only. Is the default Linux OS not available for users?


title: Dynamic Symlinks

text: I have built my app for different architectures and would like to create a "dynamic symlink" which takes me to the right version based on a variable. If the machine I am currently logged in to, is x86, then the symlink should take me to that build. A **mocked example** of what I want to do:               $ uname -i     x86_64          $ ls -ltr      lrwxr-xr-x  1 dogbane gg     4 Feb 16 15:40 mylink -> @sys/     drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 x86_64/     drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 i386/          $ cd mylink          $ pwd -P     ~/x86_64      Is this possible? I know I can use `cd $(uname -i)`, but want something simpler.


title: File systems or services that facilitate self updating, variable symbolic links

text: I'm curious if there are any implementations provided as a file system or a service/daemon that facilitate the following:   1. Symbolic links that can be specified to update if the target is moved   2. Symbolic links that contain a variable (said variable provided by a service, like the environment, ie an environment variable) One can presumably implement said features with custom mv, ln, rm, cp (& other relevant crud operations) and a service with data structures that manage relevant targets, links, and variables.


title: System IDLE Time > System Uptime?

text: I was testing out the linux api while working on something but got stuck on the following output.               [Abhii@localhost net]$ cat /proc/uptime     39135.53 149657.73      As per specs the first number should be the Uptime and the second number should be the time system has stayed idle. So why is the former less then latter ??? As an extra piece of info my version information               Linux version 3.5.2-3.fc17.x86_64 (mockbuild@) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Tue Aug 21 19:06:52 UTC 2012


title: Upstart - when a given event occurs, in what order are the jobs run?

text: I am using Ubuntu 10.04.3, and am using upstart as the init daemon (pretty sure this is the default). When a given event occurs, in what order are the jobs run? Specifically, I'm referring to jobs defined in /etc/init, not to any system V init scripts bridged over via rc-sysinit.conf. As a specific example, suppose I have the following jobs defined in /etc/init to start on startup:   * hostname.conf   * module-init-tools.conf   * mountall.conf   * udev-finish.conf   * udevmonitor.conf   * udevtrigger.conf in what order will these be run?


title: how to compare two xml files having same data in different lines?

text: I have two files have same data but in different lines. File 1:               <Identities>         <Identity>             <Id>048206031415072010Comcast.USR8JR</Id>             <UID>ccp_test_79</UID>             <DisplayName>JOSH CCP</DisplayName>             <FirstName>JOSH</FirstName>             <LastName>CCP</LastName>             <Role>P</Role>             <LoginStatus>C</LoginStatus>         </Identity>         <Identity>             <Id>089612381523032011Comcast.USR1JR</Id>             <UID>94701_account1</UID>             <DisplayName>account1</DisplayName>             <FirstName>account1</FirstName>             <LastName>94701</LastName>             <Role>S</Role>             <LoginStatus>C</LoginStatus>         </Identity>     </Identities>      File 2 :               <Identities>         <Identity>             <Id>089612381523032011Comcast.USR1JR</Id>             <UID>94701_account1</UID>             <DisplayName>account1</DisplayName>             <FirstName>account1</FirstName>             <LastName>94701</LastName>             <Role>S</Role>             <LoginStatus>C</LoginStatus>         </Identity>         <Identity>             <Id>048206031415072010Comcast.USR8JR</Id>             <UID>ccp_test_79</UID>             <DisplayName>JOSH CCP</DisplayName>             <FirstName>JOSH</FirstName>             <LastName>CCP</LastName>             <Role>P</Role>             <LoginStatus>C</LoginStatus>         </Identity>     </Identities>      If I use `diff file1 file2` command I am getting below response:               1,10d0     <     <Identities>     <         <Identity>     <             <Id>048206031415072010Comcast.USR8JR</Id>     <             <UID>ccp_test_79</UID>     <             <DisplayName>JOSH CCP</DisplayName>     <             <FirstName>JOSH</FirstName>     <             <LastName>CCP</LastName>     <             <Role>P</Role>     <             <LoginStatus>C</LoginStatus>     <         </Identity>     20a11,20     >     <Identities>     >         <Identity>     >             <Id>048206031415072010Comcast.USR8JR</Id>     >             <UID>ccp_test_79</UID>     >             <DisplayName>JOSH CCP</DisplayName>     >             <FirstName>JOSH</FirstName>     >             <LastName>CCP</LastName>     >             <Role>P</Role>     >             <LoginStatus>C</LoginStatus>     >         </Identity>      But I need to get no difference, because these files having same data in different lines. Can anyone help me how to achieve no difference output. Thanks in advance.


title: remove white space before delimiter with sed

text: I have data of the following format that I want to input into LibreOffice calc               data | num   | num | num     | num      For some reason Libreoffice does not think the string "3214 " is a number by default (trailing white space). I want to replace `(\s)*|` with `|` where `\s` stands for space and `*` for the Kleene star operation. And do this at multiple places in each line (all matches). I tried:               sed  -i 's/(\s)*|/|/' DataStats0914.txt      But it has no effect.


title: Transform a directory into file or a file into directory

text: I wanted to create a file named `test`. Accidentally I run `mkdir test` instead of `touch test`. Is it possible to convert `test` directory in a file named `test`? What about converting a file named `test` into a directory with the same name?


Why there are many BSD systems but only one Linux kernel? I wonder why BSD was forked many times, but no such thing with Linux.


title: Is there any way to install torrent client in backtrack?

text: I was installing utorrent but having some files missing at the end. Not able to install.


title: acl not overriding unix rights?

text: I have a folder with UNIX rights that forbid access to me :               ls -l Sources-labo     drwxrwxrw-+ 6 nobody    applications 73728 févr. 25 13:25 Sources-labo          groups     users vault      _but_ the ACL are set so that I should have access anyway (because of the group:users:rwx rule) :               getfacl Sources-labo/     # file: Sources-labo/     # owner: nobody     # group: applications     user::rwx     group::rwx     group:users:rwx     mask::rwx     other::rw-      However I cannot access this directory :               cd Sources-labo/     bash: cd: Sources-labo/: Permission denied      I read that the ACLs are supposed to override UNIX rights. How come I can't access this directory ?


title: How to associate the Fedora Start menu with the Windows keyboard?

text: I would like to associate the Start menu with the Windows key on the keyboard? ![Screenshot of the start menu](http://i.stack.imgur.com/YgrTq.png)


title: Virtualize Windows on Fedora and let Windows see real hardware

text: My question may be weird. I want to know if there is some virtual machine that lets me install Windows 7 under Linux and lets Windows use, as a virtual device, the same device that is really installed in my physical PC. I need to do that, because of a lot of Adobe software that I need for work and I can't switch to other software (even if I'd like to). Maybe what I need could be something even simpler, like letting the virtual machine see the graphics card I have to get the full compatibility with the Adobe software and the OpenGL and DirectX drivers. Actually I use VirtualBox to run Windows, and Fedora is my main OS. The hardware that I need to share is as follows:   ⠀CPU - Intel Core i7 990x (even only a subset of all the cores)   ⠀GPU - Nvidia Quadro 2000


title: escape characters in /etc/network/interfaces

text: I want to be sure that whatever string I pass into the line `wpa-ssid "abc"` in `/etc/network/interfaces` won't be used to break out of the configuration. All I can find in the manual is that `\` can be used at the end of a line to continue on the next line. But what about `\"` in the middle of a line? My worries is an SSID something like               A"     up rm -rf /\      Are there any general encoding that can be used for arbitrary characters into the SSID field?