title: Is Mac OS X really SUS compliant?

text: Internet says that Mac OS X 10.8 _has achieved certification to The Open Group UNIX® 03 standard_ and that it _is a compliant system_. But a simple test with `echo` seems to indicate otherwise: **a)** The Base Specification states   > Implementations **shall not** support any options. and > IEEE Std 1003.1-2001/Cor 1-2002, item XCU/TC1/D6/21 is applied, so that the > echo utility can accommodate historical BSD behavior.    **b)** The man page says states > **SYNOPSIS**   >  echo [-n] [string ...] and > **STANDARDS**   >  The echo utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'') as amended > by Cor. 1-2002.    **c)** The reality is that it supports options. At least `e`                 (user@avitus tmp)$ uname -a     Darwin avitus.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64     (user@avitus tmp)$ echo -e "test \tAm I SUS compliant?"     test    Am I SUS compliant?     (user@avitus tmp)$ echo "test \tAm I SUS compliant?"     test \tAm I SUS compliant?            So, the questions are:   **1. Does this break compliance?**   **2. Is Mac OS X 10.8 really SUS compliant?**   **3. Does the part** _item XCU/TC1/D6/21 is applied, so that the echo utility can accommodate historical BSD behavior._ **have something to do? If so, where is that item explained? The** Technical Corrigendum Number 1 for the Austin Group Specifications **doesn't say much.**   **4. Am I missing something?**


title: Searching for packages using apt-get

text: I'd like to search for repository packages using package name or package description. For example   * Search for Zend   * Search for Ze*d


title: How to add a path to system $PATH for all users's non-login shell and login shell on debian

text: I installed some programs in /opt/my-program/bin, I wanted to add /opt/my- program/bin to system $PATH for all users's non-login shell and login shell. What should I do? Changing /etc/environment is OK for non-login shell, but it does not work for login shell because Debian's /etc/profile (which will be sourced by login shell) will override the $PATH specified in /etc/environment.


title: Is there a way to view the console output instead of boot logo, while my RHEL 6.2 machine boots up?

text: My company provided laptop has RHEL6.2, with lot of programs to start up automatically, which makes the boot up process slow. While the machine boots up, there is the boring RHEL logo on the screen for a long time. Instead is there way to view the console, while my machine boots up? The console log would at least keep scrolling and won't be as monotonous! :) **Edit:** My laptop has LUKS disk encryption. So after grub screen, LUKS asks for the disk password and then the RHEL logo keeps rotating for a long time!


title: Piped input to nano

text: Why does `ls | nano -` open the editor in Ubuntu but close the editor and save a file to `-.save` in CentOS? How can I get nano in CentOS to remain open when reading stdin?


title: Need advice on using Wireshark + aircrack-ng

text: I am making acquiantance with wireless security and attacks and was told to run some tests with aircrack-ng and wireshark. So I installed both of them and ran airmon to switch wi-fi card to monitor mode: `sudo airmon-ng start ra0` (this is my DWA-140 usb wi-fi adapter) The wi-fi adapter seems to have restarted after that. Gues that's ok. Still it gave some warnings on processes that might interfere with normal work like `network manager, dhclient` and a few more. I tried to stop them, but they seem to restart all the time. After that I ran wireshark as a superuser, chose the ra0 adapter and tried to sniff the test open network. I have my PC connected to it (via dwa-140) and an HTC phone and some stranger PCs. Wireshark runs on my PC. The problem is that when I login to `%sitename%` with a PC browser, I can see the cookies sent to it in Wireshark. But when I do the same thing with an Opera Mobile browser on my HTC (`Turbo` option disabled), there is nothing detected. I know that stranger PCs are also sending data to `%sitename%`, but I see nothing from them as well. Actually I see a lot of packets from stranger PCs, but not the ones I need. I'd like to know what I'm doing wrong. Will be thankful for any advice. P.S. This runs on Ubuntu 12.04.1


title: Why is the default shell in Debian 7 bash?

text: As per documentation, `dash` should be the default shell in Debian Wheezy, however when I open up a terminal and check the `SHELL` variable, it points to `/bin/bash`. Since this is a fresh install, and I have not made any changes, why is this not pointing to `/bin/dash`? Or is the default shell stored or pointed to by some other variable?


title: Reformatting a large number of XML files

text: I'm manipulating a large number of XML files scattered throughout a nested directory structure. I tried the following (which almost works):               $ find . -name "*.xml" -type f | xargs -- xmllint --format      The problem is this generates the formatted XML output on the screen, but doesn't change the file. How can I change this command so that the actual file contents are changed? Thanks!


title: Is it possible to have malware software in Linux without executing untrusted applications?

text: I'm linux user and I'm thinking about it's vulnerabilities to malware. Can I get any malware if I run only trusted applications from distro's repository?


title: Why does mapping <esc> cause arrow keys to fail in vim?

text: When I do               inoremap <Esc> <Esc>`^      in vim, the next time I switch to insert mode (after using `Esc`) the arrow keys fail to move the cursor (they insert letters instead). Why does that happen? * * * **Edit** : It is possible to remap `Esc` and still retain working arrow keys?


title: Among "ps" command output fields, %CPU isn't the actual CPU usage of the process?

text: For example, one of the output fields of this BSD style command, `ps aux`, is "%CPU". The alternative command, `ps -efl` outputs the "C" (or CP) field. As per the `ps` man page:   * **%CPU** is the cpu utilization of the process in "##.#" format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage.   * **C** is essentially %CPU expressed as an integer That is how the `ps` man page details %CPU or C. But most books and websites on the internet simply say, `%CPU or C is CPU usage of a process`. One would think that it means % of the CPU's processing power used by a process out of the total available processing power from the CPU. Or is it only me? (PS: I am a beginner)


title: Can't insert rt2800usb module: Invalid argument

text: I just got an ASUS N13 USB wireless dongle, and unfortunately it's not detected and I can't load it with modprobe:               $ sudo modprobe rt2800usb     WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.     WARNING: Error inserting rt2x00usb (/lib/modules/3.0.0-14-generic/kernel/drivers/net/wireless/rt2x00/rt2x00usb.ko): Invalid argument     WARNING: Error inserting crc_ccitt (/lib/modules/3.0.0-14-generic/kernel/lib/crc-ccitt.ko): Invalid argument     WARNING: Error inserting rt2800lib (/lib/modules/3.0.0-14-generic/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko): Invalid argument     FATAL: Error inserting rt2800usb (/lib/modules/3.0.0-14-generic/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko): Invalid argument      What's the problem here? I read that this works usually out of the box with Ubuntu 11.10? What can I do to fix this? Is there a package I can reinstall to try and fix things?


title: What iptables command do I need to allow web server traffic?

text: I have a hard time understanding `iptables` rules. I am running a centos 6.5 VM on my laptop (vmware hypervisor) and it looks like it comes with this setup for `iptables`:               # iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination              ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED      ACCEPT     icmp --  anywhere             anywhere                 ACCEPT     all  --  anywhere             anywhere                 ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh      REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited           Chain FORWARD (policy ACCEPT)     target     prot opt source               destination              REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited           Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination               I just install apache on it, but I was not able to access the web server even though `httpd` is running. This is the error I get, if I attempt to access the web server from the localhost:               [root@mig-dev-006 conf]# wget http://mig-dev-006.example.com     --2014-07-09 08:46:00--  http://mig-dev-006.example.com/     Resolving mig-dev-006.example.com... 192.168.203.129     Connecting to mig-dev-006.example.com|192.168.203.129|:80... connected.     HTTP request sent, awaiting response... 403 Forbidden     2014-07-09 08:46:00 ERROR 403: Forbidden.      From my Windows7 laptop (using `cygwin`) I get this error:               $ wget http://mig-dev-006.example.com     --08:45:47--  http://mig-dev-006.example.com/                => `index.html'     Resolving mig-dev-006.cisco.com... 192.168.203.129     Connecting to mig-dev-006.example.com|192.168.203.129|:80... failed: Connection timed out.      I know that I can simply flush the `iptables` rules with `iptables --flush`, but I'd prefer to understand what is going on and be able to add a rule that would allow `http` and `https` traffic. * * * Here is my `httpd.conf`:               $ grep -v "#" /etc/httpd/conf/httpd.conf  | grep -v "^$"     ServerTokens OS     ServerRoot "/etc/httpd"     PidFile run/httpd.pid     Timeout 60     KeepAlive Off     MaxKeepAliveRequests 100     KeepAliveTimeout 15     <IfModule prefork.c>     StartServers       8     MinSpareServers    5     MaxSpareServers   20     ServerLimit      256     MaxClients       256     MaxRequestsPerChild  4000     </IfModule>     <IfModule worker.c>     StartServers         4     MaxClients         300     MinSpareThreads     25     MaxSpareThreads     75      ThreadsPerChild     25     MaxRequestsPerChild  0     </IfModule>     Listen 80     LoadModule auth_basic_module modules/mod_auth_basic.so     LoadModule auth_digest_module modules/mod_auth_digest.so     LoadModule authn_file_module modules/mod_authn_file.so     LoadModule authn_alias_module modules/mod_authn_alias.so     LoadModule authn_anon_module modules/mod_authn_anon.so     LoadModule authn_dbm_module modules/mod_authn_dbm.so     LoadModule authn_default_module modules/mod_authn_default.so     LoadModule authz_host_module modules/mod_authz_host.so     LoadModule authz_user_module modules/mod_authz_user.so     LoadModule authz_owner_module modules/mod_authz_owner.so     LoadModule authz_groupfile_module modules/mod_authz_groupfile.so     LoadModule authz_dbm_module modules/mod_authz_dbm.so     LoadModule authz_default_module modules/mod_authz_default.so     LoadModule ldap_module modules/mod_ldap.so     LoadModule authnz_ldap_module modules/mod_authnz_ldap.so     LoadModule include_module modules/mod_include.so     LoadModule log_config_module modules/mod_log_config.so     LoadModule logio_module modules/mod_logio.so     LoadModule env_module modules/mod_env.so     LoadModule ext_filter_module modules/mod_ext_filter.so     LoadModule mime_magic_module modules/mod_mime_magic.so     LoadModule expires_module modules/mod_expires.so     LoadModule deflate_module modules/mod_deflate.so     LoadModule headers_module modules/mod_headers.so     LoadModule usertrack_module modules/mod_usertrack.so     LoadModule setenvif_module modules/mod_setenvif.so     LoadModule mime_module modules/mod_mime.so     LoadModule dav_module modules/mod_dav.so     LoadModule status_module modules/mod_status.so     LoadModule autoindex_module modules/mod_autoindex.so     LoadModule info_module modules/mod_info.so     LoadModule dav_fs_module modules/mod_dav_fs.so     LoadModule vhost_alias_module modules/mod_vhost_alias.so     LoadModule negotiation_module modules/mod_negotiation.so     LoadModule dir_module modules/mod_dir.so     LoadModule actions_module modules/mod_actions.so     LoadModule speling_module modules/mod_speling.so     LoadModule userdir_module modules/mod_userdir.so     LoadModule alias_module modules/mod_alias.so     LoadModule substitute_module modules/mod_substitute.so     LoadModule rewrite_module modules/mod_rewrite.so     LoadModule proxy_module modules/mod_proxy.so     LoadModule proxy_balancer_module modules/mod_proxy_balancer.so     LoadModule proxy_ftp_module modules/mod_proxy_ftp.so     LoadModule proxy_http_module modules/mod_proxy_http.so     LoadModule proxy_ajp_module modules/mod_proxy_ajp.so     LoadModule proxy_connect_module modules/mod_proxy_connect.so     LoadModule cache_module modules/mod_cache.so     LoadModule suexec_module modules/mod_suexec.so     LoadModule disk_cache_module modules/mod_disk_cache.so     LoadModule cgi_module modules/mod_cgi.so     LoadModule version_module modules/mod_version.so     Include conf.d/*.conf     User apache     Group apache     ServerAdmin root@localhost     ServerName mig-dev-006.example.com     UseCanonicalName Off     DocumentRoot "/var/www/html"     <Directory />         Options FollowSymLinks         AllowOverride None     </Directory>     <Directory "/var/www/html">         Options Indexes FollowSymLinks         AllowOverride None         Order allow,deny         Allow from all     </Directory>     <IfModule mod_userdir.c>         UserDir disabled     </IfModule>     DirectoryIndex index.html index.html.var     AccessFileName .htaccess     <Files ~ "^\.ht">         Order allow,deny         Deny from all         Satisfy All     </Files>     TypesConfig /etc/mime.types     DefaultType text/plain     <IfModule mod_mime_magic.c>         MIMEMagicFile conf/magic     </IfModule>     HostnameLookups Off     ErrorLog logs/error_log     LogLevel warn     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined     LogFormat "%h %l %u %t \"%r\" %>s %b" common     LogFormat "%{Referer}i -> %U" referer     LogFormat "%{User-agent}i" agent     CustomLog logs/access_log combined     ServerSignature On     Alias /icons/ "/var/www/icons/"     <Directory "/var/www/icons">         Options Indexes MultiViews FollowSymLinks         AllowOverride None         Order allow,deny         Allow from all     </Directory>     <IfModule mod_dav_fs.c>         DAVLockDB /var/lib/dav/lockdb     </IfModule>     ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"     <Directory "/var/www/cgi-bin">         AllowOverride None         Options None         Order allow,deny         Allow from all     </Directory>     IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip     AddIconByType (TXT,/icons/text.gif) text/*     AddIconByType (IMG,/icons/image2.gif) image/*     AddIconByType (SND,/icons/sound2.gif) audio/*     AddIconByType (VID,/icons/movie.gif) video/*     AddIcon /icons/binary.gif .bin .exe     AddIcon /icons/binhex.gif .hqx     AddIcon /icons/tar.gif .tar     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip     AddIcon /icons/a.gif .ps .ai .eps     AddIcon /icons/layout.gif .html .shtml .htm .pdf     AddIcon /icons/text.gif .txt     AddIcon /icons/c.gif .c     AddIcon /icons/p.gif .pl .py     AddIcon /icons/f.gif .for     AddIcon /icons/dvi.gif .dvi     AddIcon /icons/uuencoded.gif .uu     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl     AddIcon /icons/tex.gif .tex     AddIcon /icons/bomb.gif core     AddIcon /icons/back.gif ..     AddIcon /icons/hand.right.gif README     AddIcon /icons/folder.gif ^^DIRECTORY^^     AddIcon /icons/blank.gif ^^BLANKICON^^     DefaultIcon /icons/unknown.gif     ReadmeName README.html     HeaderName HEADER.html     AddLanguage ca .ca     AddLanguage cs .cz .cs     AddLanguage da .dk     AddLanguage de .de     AddLanguage el .el     AddLanguage en .en     AddLanguage eo .eo     AddLanguage es .es     AddLanguage et .et     AddLanguage fr .fr     AddLanguage he .he     AddLanguage hr .hr     AddLanguage it .it     AddLanguage ja .ja     AddLanguage ko .ko     AddLanguage ltz .ltz     AddLanguage nl .nl     AddLanguage nn .nn     AddLanguage no .no     AddLanguage pl .po     AddLanguage pt .pt     AddLanguage pt-BR .pt-br     AddLanguage ru .ru     AddLanguage sv .sv     AddLanguage zh-CN .zh-cn     AddLanguage zh-TW .zh-tw     LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW     ForceLanguagePriority Prefer Fallback     AddDefaultCharset UTF-8     AddType application/x-compress .Z     AddType application/x-gzip .gz .tgz     AddType application/x-x509-ca-cert .crt     AddType application/x-pkcs7-crl    .crl     AddHandler type-map var     AddType text/html .shtml     AddOutputFilter INCLUDES .shtml     Alias /error/ "/var/www/error/"     <IfModule mod_negotiation.c>     <IfModule mod_include.c>         <Directory "/var/www/error">             AllowOverride None             Options IncludesNoExec             AddOutputFilter Includes html             AddHandler type-map var             Order allow,deny             Allow from all             LanguagePriority en es de fr             ForceLanguagePriority Prefer Fallback         </Directory>     </IfModule>     </IfModule>     BrowserMatch "Mozilla/2" nokeepalive     BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0     BrowserMatch "RealPlayer 4\.0" force-response-1.0     BrowserMatch "Java/1\.0" force-response-1.0     BrowserMatch "JDK/1\.0" force-response-1.0     BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully     BrowserMatch "MS FrontPage" redirect-carefully     BrowserMatch "^WebDrive" redirect-carefully     BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully     BrowserMatch "^gnome-vfs/1.0" redirect-carefully     BrowserMatch "^XML Spy" redirect-carefully     BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully      The only change I made was to add the `ServerName`.


title: slow samba seek performance

text: I am using FreeBSD 9.0 RC3 (PCBSD distro) with samba 3.4.14. I am trying to access portions of several large (4 - 10 GB) files over samba using seek commands, and I am seeing that calls to the front of the file are returning very quickly, but calls to near the end of the file are taking 15+ seconds to respond. It is as if the OS has to read the entire file up to the position I am seeking to. The file system is ZFS v28 on a 5 drive Z2 configuration. Are there any parameters governing seek? When I host these files on a Windows Server 2008 R2 box, I am not seeing any of these issues. ![Disk Mark Performance](http://i.stack.imgur.com/9Uf0f.png) I've attached my results from crystaldiskmark over the network as well.


title: Checking the order of items in a shell environment variable

text: I am wanting to check that a certain directories always appear after other directories in an environment variable. List items are separated by a colon, as with the PATH variable. This is not simply for bash, but for a few different shells. The problem is, I'm not sure how to check the order of items in a list using standard unix utilities. What would be a starting point? edit: An example would be               $LIST=/test:/bin/test:/etc/test:/nan/:/var      I would want to test for example that any directory path that had the word test in it was prior in the list to a directory that did not. What I want to do is small enough that I can hardcode the directories, so a dynamic solution is not necessary.


title: Is there a way to convert IE favourites to bookmark.htm format?

text: After switching from Windows to Linux, I am left with a favourite directory containing subfolders and `.url` files, each file containing a few lines of text that look like this:               [DEFAULT]     BASEURL=http://www.example.com/faq.html     [InternetShortcut]     URL=http://www.example.com/faq.html     Modified=70E5E788C3B9C9010A      Since I do not have internet explorer installed on my Linux system, it is not possible for me to import the bookmarks directly to my current Firefox browser. I was wondering if there is a quick way to extract the URL from all the `.url` files, together with the filenames to generate a `.htm` file which I can import to any modern browser.


title: Laptop camera. How to get detailed information about it?

text: My Samsung laptop has a built-in camera. The camera works fine. I want to get detailed information on it, at the very least model and communication bus. The output of `lsusb`, `lspci`, `lshw`, `ls /dev` do not show anything interesting ... or do they? Maybe I do not know what to look for!


title: PiGlow not working

text: After following the steps specified in Boeeerb's PiGlow github repo, when I try to run the `test.py` file it gives me the following message:               Traceback (most recent call last) :        File "test.py" , line 9, in <module>           piglow = PiGlow()        File "/home/pi/piglow/piglow.py" , line 30,in _init_           self.bus = SMBus(i2c_bus)     IOError: [Errno 2] No such file or directory      I have tried rebooting, and trying it multiple times. I also used the `ls` command to ensure the file is there. What's wrong there?


title: ssh-add -D doesn't erase stored keys from the ssh-agent

text: How come this happens?:               stan@tcpc:~/.ssh$ ssh-add -l     8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA)     2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA)     stan@tcpc:~/.ssh$ ssh-add -D     All identities removed.     stan@tcpc:~/.ssh$ ssh-add -l     8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA)     2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA)      How come keys aren't being erased? p.s. could be this bug? http://bugs.debian.org/cgi- bin/bugreport.cgi?bug=472477 I'm on arch linux though...


title: Keep log file size fixed without logrotate

text: Is there any way to keep file size of log file fixed without rotating it by a new empty file and deleting (or archiving) the old file. For example, if I set log file maximum size to 1MB, after the file size increase beyond that limit it will be automatically clamped, the text is added on 'tail' and the oldest part of text is poped out to keep the file size 1MB.


title: Shell: How do I get the last argument the previous command when it was detached?

text: Within the shell, typing `ALT+.` or using `!$` recalls the last passed argument of the previous command. I use this all the time, but how do you do that when you detached the previous command?               $ do-something foo a_long_file_name &      How do I get `a_long_file_name` on the prompt, and not the ampersand?


title: Running one OS per core

text: I'm interested in using a COTS board like the Wandboard for a project. On one hand I'd like to use something like Ubuntu for user interaction, sounds, TCP/IP stuff, etc. But I also need an RTOS like uC/OS-II since there are some real-time requirements. Are there any resources to help set up something like this? I've only used multi-core processors with a single kernel before (SMP), so this is new to me. Apparently, this guy has done it, but I can find information only sparingly. This seems like mostly a bootloader (U-Boot) task, so I'm not sure if this is the right place to ask, but it's the closest I could find.


title: Parsing log files for frequent IP's

text: So, I hacked this together while undergoing a DDOS attack to pull _naughty_ ips out of my logs. Anyone have any improvements or other suggestions to make it better? Here's the general idea:   1. pull ip's only out of log file   2. sort them   3. uniq and count them   4. sort them again And the string o'pipes:   ` cut --delim " " -f7 /var/log/apache_access | sort | uniq -c | sort -rn > sorted-ips.txt `


title: autologin console as root on fedora

text: Can someone help to autologin in console text mode as root in fedora, usually I can do using script like this : `/sbin/autologin.sh`:               #!/bin/bash     0</dev/$1 1>/dev/$1 2>&1     cat /etc/issue     shift     exec $*      and on `/etc/inittab` do login by calling that script               1:2345:respawn:/sbin/autologin.sh tty1 login -f root     ..     ..      now i can't do that, since fedora use /etc/init/tty.conf :               stop on runlevel [016]     respawn     instance $TTY     exec /sbin/mingetty $TTY      *I know its dangerous to autologin and moreover as root, but I don't care, I don't care about security


title: Parsing the headers of sequence file

text: I have a multiple sequence file as               >abc|d017961     sequence1......          >cdf|rhtdm9     sequence2......          >ijm|smthr12     sequence3......          >abc|d011wejr     sequence4......          >stg|eethwe77     sequence5......      I want to edit the file and want the result file as               >abc_ABC__d017961     sequence1......          >cdf_CDF__rhtdm9     sequence2......          >ijm_IJM__smthr12     sequence3......          >abc_ABC__d011wejr     sequence4......          >stg_STG__eethwe77     sequence5......


title: Cronjob output to log

text: I'm using a script for testing broadband speed and I would like to set up a cronjob for testing every n minutes and output to a file. The command to launch it from a shell console and append to logfile prepending a line with the current date is               tespeed.py -w | sed -e "s/^/$(date +\"%d-%m-%y\ %T\"), /" >>tespeedlog.csv      But if I use this command in a cronjob something doesn't work; the syslog reports:               Sep 25 13:23:01 raspberrypi /USR/SBIN/CRON[6719]: (pi) CMD (/home/pi/tespeed/tespeed.py -w | sed -e "s/^/$(date +')      What shoud I check?


title: Does encrypting my whole Lubuntu slow running programs down?

text: During the installation of Lubuntu I chose to encrypt my whole HDD (not just the `/home` folder). Now it feels like my system has slowed down a lot. Especially the startup time of programs increased. Does this encryption also slow down programs (after loading) which neither read from nor write to the HDD?


title: Running Mono on CentOS 5 CLI

text: I have vps server (virtual private server) running on Linux CentOS 5 32 bit , I installed `vncserver` X-Windows , GNOME and KDE environment and I connect to the VNC server from vncviewer in my Windows 7 Desktop now I execute the command               mono Radegast.exe      in terminal and I got               [ERROR]: - Unhandled System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable)         Parameter name: Display           at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000]           at System.Windows.Forms.XplatUIX11..ctor () [0x00000]           at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000]           at System.Windows.Forms.XplatUI..cctor () [0x00000]           --- End of inner exception stack trace ---           at System.Windows.Forms.Application.EnableVisualStyles () [0x00000]           at Radegast.MainProgram.RunRadegast (System.String[] args) [0x00000]           at Radegast.MainProgram.Main (System.String[] args) [0x00000] : An exception was thrown by the type initializer for System.Windows.Forms.XplatUI           at System.Windows.Forms.Application.EnableVisualStyles () [0x00000]           at Radegast.MainProgram.RunRadegast (System.String[] args) [0x00000]           at Radegast.MainProgram.Main (System.String[] args) [0x00000]      mono version is               # mono -V     Mono JIT compiler version 2.4.2.3 (tarball Sat Apr 20 19:49:33 MSD 2013)     Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com             TLS:           __thread             GC:            Included Boehm (with typed GC)             SIGSEGV:       altstack             Notifications: epoll             Architecture:  x86             Disabled:      none


title: How can I make a Puppet module that fixes time?

text: I have written a Puppet module that corrects the time via NTP, but this only works on server with a small NTP offset. There are sometimes server with a time offset higher than 10 minutes for various reasons. I want to make a Puppet module that runs exec "service ntpd stop; ntpdate ntp3.domain.local; service ntpd start" when the ntp offset is too high, to forcably correct the time. How can I see if the NTP offset is too high in order to tell Puppet to run this command? Or are there better solutions?


title: What are /dev, /run and /run/shm and can I resize them?

text: So, I recently created a 15GB partition for Linux Mint 14. I've been working on it for a while, and I got a Low Disk Space notification. I ran `df -h` and this is what I'm getting:               Filesystem      Size  Used Avail Use% Mounted on     /dev/sda5        11G   11G  2.3M 100% /     udev            1.9G  4.0K  1.9G   1% /dev     tmpfs           751M  1.1M  750M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            1.9G  4.0M  1.9G   1% /run/shm     none            100M   16K  100M   1% /run/user      What are `/dev`, `/run`, and `/run/shm`, and can I resize them to be smaller and extend `/dev/sda5` to use that space instead?


title: ixgbe: increase rx performance

text: I have an Intel 82598EB 10GBE NIC. I need to receive traffic without packet loss. Data rate is 4-5 Gbps, packet size is 1500-9600 bytes. I had already configured smb and irq affinity. I also tried to use packets socket ( PF_PACKET ). None of this helped. Small losses is always present. Now I am planning to compile kernel with disabling any configuration settings that increase the size of sk_buff and disabling IOMMU. What are other ways to improve rx performance?


title: Scan for users of networks

text: If I am in a room where several people are using devices to connect to different networks, how can I scan for them? (for the users) They are not necessarily logged in the same wifi as me. I know that I can find networks with WICD (or through other means), but that's not what I want.


title: Set Sound Settings to 152% on Boot (LMDE)

text: I have installed Linux Mint Debian Edition and everything is working correctly, except that 100% sound setting is not ideal on my speakers, so I see that I can increase it to 152% from my sound settings. **The problem is** that every time I reboot, it sets itself to 100%, and I manually have to increase to 152%. At first it wasn't my main concern, now it's the only inconvenience I have on my system. **Q: How to do I set sound to 152% on boot?** `amixer` value of 100% on GUI is 65536 on terminal.   `amixer` value of desired 153% is 99957 on terminal. Outputs: Setting 100% on GUI and Type `amixer` on terminal:                   Simple mixer control 'Master',0       Capabilities: pvolume pswitch pswitch-joined       Playback channels: Front Left - Front Right       Limits: Playback 0 - 65536       Mono:       Front Left: Playback 65536 [100%] [on]       Front Right: Playback 65536 [100%] [on]      Setting 153% on GUI and Type `amixer` on terminal:               Simple mixer control 'Master',0       Capabilities: pvolume pswitch pswitch-joined       Playback channels: Front Left - Front Right       Limits: Playback 0 - 65536       Mono:       Front Left: Playback 99957 [153%] [on]       Front Right: Playback 99957 [153%] [on]      **Update:** I now need to know how to set this command `amixer set 'Master' ,99957` on startup, as a startup script. Googling seems to produce somethings beyond my scope of knowledge. Step by step on creating startup scripts would help.


title: Kernel does not load after modifying parameters and kernel image with Syslinux

text: # Config file for Syslinux -     # /boot/syslinux/syslinux.cfg          LABEL arch         MENU LABEL Arch Linux         LINUX ../vmlinuz-linux         APPEND root=/dev/sda3 rw         INITRD ../initramfs-linux-ck.img          LABEL archfallback         MENU LABEL Arch Linux Fallback         LINUX ../vmlinuz-linux         APPEND root=/dev/sda3 rw         INITRD ../initramfs-linux-fallback.img      I have just changed my `arch` config to load the CK image. However, upon boot, `fsck` fails complaining that `/dev/sda3` cannot be found. This is weird, because `archfallback` loads correctly as usual. Also, I should add the parameter `elevator=bfq`. Should I do that with a new APPEND line? EDIT: I just saw that there is also a `vmlinuz-linux-ck`. I'll try and report back. The kernel parameter quesion remains.


title: Why does SSH not consult /etc/hosts?

text: I'm administrating a networked environment where the users authenticate over NIS. All machines can be used to SSH into the server but one. On the machine in question, I get the message ` ssh: connect to host servername port 22: Connection refused ` I compared `strace` outputs from the machine in question and a machine that can SSH into the server correctly.   It turns out the machine that can't SSH into the server doesn't consult `/etc/hosts` while the machine that can SSH correctly does. Both machines have `/etc/hosts` set up with the server's name and IP. In the end, the machine that doesn't consult `/etc/hosts` ends up trying to connect to ` 127.0.0.1` (localhost) and fails with the above message. What can be causing this? Additional information:   * The server I'm trying to SSH into also acts as the name server and both machines consult it while trying to SSH into it.    * The machine that can't SSH into the server can SSH correctly into other machines when I do   ` ssh machinename `   The `strace` logs show that the machine consults the nameserver (this time successfully) and manages to resolve the remote machine name correctly and connect to it. EDIT: I will gladly provide any additional information that you think might help solve this issue.


title: Reading virtual memory

text: Is it possible to read virtual memory even if `/dev/kmem` is not available? I know that I can recompile kernel to allow this file, but that's not the solution I'm looking for. Is there some tricky way I can read it sequentially e.g. from LKM? Are there some system calls which will give me direct access to virtual memory?


title: Running a full foreach command

text: I'm trying to run a foreach loop within just 1 line of code instead of typing each indivdual command like below;               Set n=0 ; foreach txt ( *_*.txt)     foreach? sed “s/_/-/g” $txt     foreach? @ n ++     foreach? End     echo You changed $n files      Is there any way to run all these commands all in one line instead of of the way its done above? I'm using the tcsh shell, but am struggling to find any documentation on how foreach can work within the shell.


title: how to have root partition LVM for RHEL 5.8 64 bit on AWS EC2

text: I am new to this and I have to create a RHEL 5.8 Amazon Machine Image (AMI) in which the root partition should be a logical volume. I know how to create a data partition as a logical volume but am not able to find how to create the root partition as a LVM. Please guide in this respect.


title: Why is the AESni flag missing for my i5 CPU

text: My CPU is reported by Intel to support the AES-NI native instructions. http://ark.intel.com/products/65707 However, `/proc/cpuinfo` does not list the `aes` flag (which is what I guess is preventing me from installing the `aesni-intel` kernel module -- my ultimate goal is to have `dm-crypt` use the benefits of HW acceleration). How can this be? If the CPU allegedly has the feature, what is preventing it from being recognized by the OS? (I already installed Arch's `intel-ucode` to have the newest microcode on the CPU.) `cpuinfo` output (shortened):               vendor_id   : GenuineIntel     cpu family  : 6     model       : 58     model name  : Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz     stepping    : 9     microcode   : 0x19     cpu MHz     : 1445.000     cache size  : 3072 KB     siblings    : 4     cpu cores   : 2     cpuid level : 13     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 eagerfpu 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


title: hanging ssh processes launched from a script

text: i am creating a few vms through a script. as a part of it, i am changing the names of the vms using ssh. for some reason when i run the below command for three vms it works and for the magic number when creating seven vms, the ssh hangs. can someone please explain the behavior? part of the script. this script runs concurrently for specified X vms.               ...     ssh-keygen -f ~/.ssh/known_hosts -R $IP     ssh-keyscan $IP >> ~/.ssh/known_hosts     SSH="ssh -i $SSH_KEY -o PasswordAuthentication=no"          echo "hostname $hostname &&          echo HOSTNAME=$hostname >> /etc/sysconfig/network &&          echo 127.0.0.1 $hostname >> /etc/hosts " | ssh -i $SSH_KEY -o PasswordAuthentication=no root@IP     ...      non-ending ssh processes               rag       2867  2808  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm4     rag       2869  2812  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm7     rag       2872  2818  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm1     rag       2875  2811  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm6     rag       2879  2814  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm5     rag       2881  2813  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm3     rag       2884  2807  0 01:05 pts/5  T  00:00:00 ssh -i ssh_key -o PasswordAuthentication=no root@vm2      i got strace on one of the running process.               ...     --- SIGTTOU (Stopped (tty output)) @ 0 (0) ---     rt_sigreturn(0x16)                      = -1 EINTR (Interrupted system call)     rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGHUP, {SIG_IGN, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGTERM, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGTSTP, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGTTIN, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     rt_sigaction(SIGTTOU, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, NULL, 8) = 0     close(4)                                = 0     kill(2867, SIGTTOU)                     = 0     --- SIGTTOU (Stopped (tty output)) @ 0 (0) ---     --- SIGTTOU (Stopped (tty output)) @ 0 (0) ---     open("/dev/tty", O_RDWR)                = 4     rt_sigaction(SIGALRM, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGHUP, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_IGN, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGINT, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGPIPE, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_IGN, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGQUIT, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGTERM, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGTSTP, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGTTIN, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     rt_sigaction(SIGTTOU, {0x7fd26e1ef540, [], SA_RESTORER, 0x7fd26cd9d4a0}, {SIG_DFL, [], SA_RESTORER, 0x7fd26cd9d4a0}, 8) = 0     ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0     ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0     ioctl(4, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = ? ERESTARTSYS (To be restarted)     ...


title: Launching an application with an user environment

text: If I launch `eclipse` from the command line, the application is aware of the environment variables of the user (e.g. PYTHONPATH) and sets up the interpreter accordingly with `Auto Config`. This is not the case if I launch an application with a GUI icon or an application launcher. If my application launcher supports scripting, is there a way for me to specify which user's environment to use?


title: Make ls distinguish scripts from binaries in output

text: Is it possible to make `ls` distinguish executable scripts from actual compiled binaries? The permissions are most often the same (`+x`), and with `ls -F` you get an asterisk suffix (`*`) for both, so it's hard to tell them apart. I have a script to setup the colors of `ls`, but it relies on the file being executable or not, so they show up the same:               BG='01;32'  # green     EX="ex=$BG" # file with execute permission      I don't want to depend on the extension as so many of these files don't have it. I want this so when I see some bizarre error message and think, "What code caused that?", I know whether or not it's safe to `cat` the file. If there is no standard solution, what about parsing the output of `file`, in one common function, and inserting some distinctive mark? Or would that be much too slow for `ls`?


title: How to update Broadcom driver in Arch Linux?

text: I have been having issues with my broadcom wireless driver, and from what I have seen, most people online say I need to update the driver. How do I update the driver? Most tutorials use `apt-get` but that does me no good as I am on Arch. What command do I need to run in the terminal to update or reinstall the wireless driver or any driver for that matter?


title: How do you set up a "compiling parser"-like function to help with editing plain scripts in elvis?

text: I'm using `elvis` to edit files etc. in a context where limiting the keystrokes makes a difference1. I don't know all the implications of its differences from `vim` and I'm actually inexperienced with both. I know elvis was _the pioneering vi clone, widely admired in the 1990s for its conciseness, and many features_. A feature I really find useful in both editors is the compiling options with the `make` command. But there is no such feature for scripts that I know of. Arguably scripts are smaller files and don't usually involve the same type of toolchain as compiling. Nevertheless, I ended up setting an alias (`ck`)in my `.elvisrc` file:               source $HOME/.exrc     :display syntax     :set number     alias ck {     ! rm tempi     ! (bash "%" >/dev/null) 2>&1 | sed -n 's/.*line \([[:digit:]]*\).*/\1/p' >tempi     ! elvis "%" +"$(cat tempi | head -n 1)"     }      This removes a _tempi_ named file; executes the loaded script in `bash`; searches for lines in the _stderr_ output containing the word _line_ followed by a space and some digits, and prints the number only; writes the number(s) to file; then we finally load our script again in another instance of `elvis` and go(`+`) to the first line # we pick up from the _tempi_ file. It is not very elegant and requires the following workflow:   1. Open the script and run `:ck`   2. Another instance of `elvis` opens with the cursor on the line from the first error2   3. Edit and save/quit `:wq`, then press `enter` to go back to first instance of `elvis`   4. Repeat until there are no more errors, then **don't** save the top file, exit elvis `:q!`, then reload our - now corrected - file using _command history_. Is there a better way to do something like this with `elvis` i.e. but without the many instances etc.? * * * 1. A tablet with no external keyboard.  2. If there is no error the cursor goes to end of the file.


title: Bridge-utils installed on ubuntu 13.04 but unable to start the service

text: I upgraded my laptop Ubuntu 12.04 to 13.04. Before upgraded to Ubuntu 13.04, I installed qemu-kvm, bridge-utils, libvirt-bin & ubuntu-vm-builder. There its worked properly, After upgraded to Ubuntu 13.04, bridge utils not working. whenever I start the network service my system is hanged, then I restarted the my system. Unable to connect the Bridge networks.


title: Comparison of decimal numbers in bash

text: My search this morning was about how could I compare two decimal numbers in bash, and I came to this answser: How to compare to floating point number in a shell script. This one, however, doesn't include this answer here:               $ [[ ((3.56 < 2.90)) ]]; echo $?     1     $ [[ ((3.56 < 4.90)) ]]; echo $?     0      Considering that answer has been downvoted, and it looks some kind of unusual bashism, is this arithmetic evaluation trustworthy for accuracy?


title: Source code of the screens of debian-installer

text: Where do I can find the source code of the screens of the installation process of Debian? I've tried: _apt-get source debian-installer_ But in this package I do not see the source code. To be more specific I'm looking for the source code of this screen: ![enter image description here](http://i.stack.imgur.com/OmLIx.png)


title: Configuring bridge network in kvm (debian wheezy 7.2)

text: I am desperately trying to run untangle 10 as a guest in kvm. My host system is debian 7.2 My problem is that I am unable to configure bridges/(virtual)NICS which are successfully identified by untangle. I would like to have two NICS in untangle. One for the internet connection and the other one for the internal network. I already read several tutorials and how-to's and as far as I understood I have to configure network bridges. I tried to configure them in /etc/network/interfaces               auto lo     iface lo inet loopback          iface eth0 inet manual          auto br0     iface br0 inet dhcp     bridge_ports eth0      I also tried to configure them via virt-manager and I also tried to use macvtap. In all three cases I was not able to establish a connection via untangle. Is there anything I am missing/doing wrong?


title: Downloading files in Skype and Firefox stops Audacious under Gnome

text: Strangely, when someone sends me a file on Skype and I click to open it, my music player Audacious stops playing and the playlist gets messed up (some random mp3s appear inside) and the file on skype doesn't get opened. The same happens when I download a file in Firefox. How can I fix this? I use Arch Linux 3.12.7-2-ARCH #1 SMP PREEMPT x86_64 GNU/Linux with GNOME Shell 3.10.2.1, audacious 3.4.3 and Skype 4.2.0.11.


title: How is /etc/fstab accessed before root is mounted?

text: I was making some changes to `/etc/fstab`, when this chicken and egg question occurred to me - if `/etc/fstab` contains the instructions for mounting the file systems, including the root partition, then how does the OS read that file in the first place?


title: How to disconnect a server from LDAP

text: I have a Fedora server configured for LDAP. However, the LDAP server is gone, and now I'm unable to SSH into it. I've rebooted the server into single-user mode, brought up eth0 and started sshd, but when I try and ssh into it, the connection times out and the server reports "nss_ldap: could not search LDAP server server is unavailable". How do I completely purge LDAP from the system and disconnect it from any external LDAP dependency? I've ran `yum remove openldap-servers nss-pam-ldapd` and deleted common ldap conf scripts, but still sshd blocks all connections because it can't validate them against a non-existent LDAP server.


title: Verify the length of a variable

text: I've to verify the length of variable read (my script limit to five the characters inserted), I think about something like this:               #!/bin/bash     read string     check=${#string}     echo $check     if [ $check -ge 5 ]; then echo "error" ; exit     else echo "done"     fi      is there a more "elegant" solution?


title: Free Matlab equivalent for Linux

text: My collaborators are using Matlab to do some simulations. Is there an open source alternative I could use on Linux to run these scripts? It would need to be fairly closely compatible with the (1) matlab language (2) the *.fig files - saved plots.


title: how to specify the forwarding port when using multiple tsocks services?

text: According to the answer of this question, I have my `/etc/tsocks.conf` containing these lines:               path {     server = localhost     server_port = 1081     reaches = <ip-address-of-server-b>/32     }     path {     server = localhost     server_port = 1082     reaches = <ip-address-of-server-d>/32     }      and I have run these two commands:               ssh -fND :1081 server-a     ssh -fND :1082 server-b      Now I want to use `tsocks` to do a wget of a page first using the socks' service listening to 1081 port and then using the other one listening to 1082 port. If I had only one service I know that I can do that through this command:               tsocks wget http://www.google.com      Now that I have more than one `tsocks` services how can I do that? Can I provide for example the forwarding port through an option? I can't find something in the man pages of `tsocks`. I want something like that:               tsocks --forwarding_port=1081 wget http://www.google.com     tsocks --forwarding_port=1082 wget http://www.google.com


title: CD disk not detected by Fedora on my Laptop

text: I rarely use cd's on my laptop, but I recall having the same problem a few months ago. When I put a cd in my DVD/CD drive on my laptop nothing happens. It kicked in last time without me doing anything but I don't know what's wrong. I need to burn a cd with k3b but it gives the error "no optical device found". My system is Fedora 20 x86_64 KDE. Problem: CD's don't get mounted, when inserted in the drive nothing happens. What can I do to resolve this problem? EDIT: I've tried to mount it:               ]$ sudo mount /dev/sr0 /media/cdrom/     mount: no medium found on /dev/sr0      Here is fstab:               #     # /etc/fstab     # Created by anaconda on Tue Apr 29 18:45:40  2014     #     # Accessible filesystems, by reference, are maintained under '/dev/disk'     # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info     #     /dev/mapper/luks-b7af1bce-82c4-4921-aac1-bce701e30256 /                       ext4    defaults,x-systemd.device-timeout=0 1 1     UUID=6866881b-250b-4fc4-a7f1-39c28ae3ed44 /boot                   ext4    defaults        1 2     UUID=34AC-8847          /boot/efi               vfat    umask=0077,shortname=winnt 0 0     /dev/mapper/fedora_hostname-home /home                   ext4    defaults,x-systemd.device-timeout=0 1 2     /dev/mapper/fedora_hostname-swap swap                    swap    defaults,x-systemd.device-timeout=0 0 0      EDIT: After few hours just sitting in the drive, it kicked in and showed up in peripherals.


title: Changing Samba/LDAP password with passwd

text: We've installed CentOS Directory Server (389 DS) and have Samba using it as a backend. This works great except that when enabling password syncing in the `smb.conf` it is only synced one way. I could sync the ldap/samba password when using `smbpasswd -a` but not `passwd`. To fix this I added a line to my PAM system-auth settings to update the smb password file when changing my password. Again this works, but I'm getting the following error.               Changing password for user testuser1.     Enter login(LDAP) password:     New UNIX password:     Retype new UNIX password:     LDAP password information update failed: Invalid credentials          passwd: Authentication failure      This error isn't correct because both the LDAP and Samba passwords change successfully. Does any one have a clue why I'm getting the error at all? The line I added to PAM is in bold: `password requisite pam_cracklib.so try_first_pass retry=3`   **`password optional pam_smbpass.so use_authtok use_first_pass`**   `password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok` My `smb.conf` file has the following:               [global]     workgroup = MyGroup     security = user     passdb backend = ldapsam:ldaps://192.168.124.89/     ldap admin dn = cn=Directory Manager     ldap suffix = dc=example,dc=com     ldap user suffix = ou=People     ldap group suffix = ou=Groups     ldap passwd sync = yes     ldap delete dn = no     wins support = yes      As I stated previously, everything is working as it should. I just don't want users freaking out when they see that nasty error message and I want it to go away.


title: apt-get update won't update - undo /apt-add-repository

text: When I run `apt-get update`, this happens:               Hit http://dl.google.com stable Release.gpg     Hit http://dl.google.com stable Release                                             Hit http://security.debian.org wheezy/updates Release.gpg                           Hit http://packages.crunchbang.org waldorf Release.gpg                              Hit http://security.debian.org wheezy/updates Release                               Ign http://ppa.launchpad.net wheezy Release.gpg                                     Hit http://packages.crunchbang.org waldorf Release                                  Hit http://dl.google.com stable/main i386 Packages                                  Ign http://ppa.launchpad.net wheezy Release                                         Hit http://security.debian.org wheezy/updates/main i386 Packages                    Hit http://security.debian.org wheezy/updates/main Translation-en                   Hit http://packages.crunchbang.org waldorf/main i386 Packages                       Hit http://http.debian.net wheezy Release.gpg                                       Ign http://dl.google.com stable/main Translation-en_US                    Ign http://dl.google.com stable/main Translation-en                       Hit http://http.debian.net wheezy Release                                 Hit http://http.debian.net wheezy/main i386 Packages                                Hit http://http.debian.net wheezy/contrib i386 Packages                             Ign http://packages.crunchbang.org waldorf/main Translation-en_US                   Hit http://http.debian.net wheezy/non-free i386 Packages                            Ign http://packages.crunchbang.org waldorf/main Translation-en                      Hit http://http.debian.net wheezy/contrib Translation-en                  Hit http://http.debian.net wheezy/main Translation-en                     Hit http://http.debian.net wheezy/non-free Translation-en     Err http://ppa.launchpad.net wheezy/main Sources       404  Not Found     Err http://ppa.launchpad.net wheezy/main i386 Packages       404  Not Found     Ign http://ppa.launchpad.net wheezy/main Translation-en_US     Ign http://ppa.launchpad.net wheezy/main Translation-en     W: Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/wheezy/main/source/Sources  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/wheezy/main/binary-i386/Packages  404  Not Found          E: Some index files failed to download. They have been ignored, or old ones used instead.      This has been caused by running `apt-add-repository ppa:glasen/intel-driver`. How can I undo what has happened from the previous command so that `apt-get update` works properly? Note: This is on a Dell Dimension 3000


title: Creating bash app for OpenWrt

text: I would like to know how to create a script in bash for OpenWrt, but having it installed like an application and with the possibility to include arguments/options when calling the app. As an example:               cowsay HelloWorld      Would return                ____________     <>  HelloWorld <>      ------------             \   ^__^              \  (oo)\_______                 (__)\       )\/\                     ||----w |                     ||     ||      I need to call the script from a SSH, and execute it given an id and a state for that id.


title: Incrontab doesn't detect modifications on a s3fs mount

text: This is my `incrontab` line:               /srv/www IN_MODIFY,IN_ATTRIB,IN_CREATE,IN_DELETE,IN_CLOSE_WRITE,IN_MOVE rsync --quiet      --recursive --links --hard-links --perms --acls --xattrs --owner --group --delete --force /var/www_s3/ /var/www      `/var/www_s3/` is an s3fs mount. However, it only gets kicked off when a file is modified manually; nothing happens when a file is changed/added on S3. Is there a way to get incrontab to detect these changes?


title: Where do I set FollowSymLinks?

text: I have just set up an Apache 2.2 server on a new Linux Mint installation. I am recreating a previous set up I had on an old Ubuntu machine. On my previous computer, I had to enable `FollowSymLinks` in `httpd.conf`, because I store my web site HTML files in my home directory, and link to them from a symbolic link in `/var/www`. On my new server, I can't find any `httpd.conf` anywhere, so I can't seem to set the option to follow symlinks. As a result, I'm getting a `403 Forbidden: You don't have permission to access / on this server` error. Also, in my error log, it says:               [Sun May 05 02:12:17 2013] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/Websites      Has something changed in how one allows symlinks? Or am I wrong about the setting being in `httpd.conf`? In any case, how do I get my new Apache to follow symlinks? * * * **Update:** Based on an answer below, I checked in the files `/etc/apache2/sites-enabled/000-default` and `/etc/apache2/sites- available/default`, and they both have the `FollowSymLinks` option. Is there some other reason I might be getting the error mentioned above?               DocumentRoot /var/www     <Directory />         Options FollowSymLinks         AllowOverride None     </Directory>     <Directory /var/www/>         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     </Directory>          ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/     <Directory "/usr/lib/cgi-bin">         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     </Directory>


title: cleaning /dev/md0 filesystem ( raid)

text: I have a CentOS server using raid. The `/proc/partitions` contains:               major minor  #blocks  name             8     0  976762584 sda        8     1     104391 sda1        8     2  921600855 sda2        8     3   55054755 sda3        8    16  976762584 sdb        8    17  921600823 sdb1        8    18   55159177 sdb2        8    32  976762584 sdc        8    33  921600823 sdc1        8    34   55159177 sdc2        8    48  976762584 sdd        8    49  921600823 sdd1        8    50   55159177 sdd2        8    64  976762584 sde        8    65  921600823 sde1        8    66   55159177 sde2      253     0  270303232 dm-0      253     1    5341184 dm-1        9     0 4608002816 md0      `/etc/fstabs` contains:               /dev/VolGroup00/LogVol00   /             ext3    defaults,usrquota,grpquota      1 1     /dev/md0                   /home         ext3    defaults,usrquota,grpquota      1 2     LABEL=/boot                /boot         ext3    defaults        1 2     tmpfs                      /dev/shm      tmpfs   defaults        0 0     devpts                     /dev/pts      devpts  gid=5,mode=620  0 0     sysfs                      /sys          sysfs   defaults        0 0     proc                       /proc         proc    defaults        0 0     /dev/VolGroup00/LogVol01   swap          swap    defaults        0 0      `mdadm --detail /dev/md0` produces:               /dev/md0:             Version : 0.90       Creation Time : Tue Feb 28 14:00:14 2012          Raid Level : raid0          Array Size : 4608002816 (4394.53 GiB 4718.59 GB)        Raid Devices : 5       Total Devices : 5     Preferred Minor : 0         Persistence : Superblock is persistent              Update Time : Tue Feb 28 14:00:14 2012               State : clean      Active Devices : 5     Working Devices : 5      Failed Devices : 0       Spare Devices : 0               Chunk Size : 256K                     UUID : a09e9fd0:62b06654:b224f2d2:0e34ad8f              Events : 0.1              Number   Major   Minor   RaidDevice State            0       8        2        0      active sync   /dev/sda2            1       8       17        1      active sync   /dev/sdb1            2       8       33        2      active sync   /dev/sdc1            3       8       49        3      active sync   /dev/sdd1            4       8       65        4      active sync   /dev/sde1      `/etc/mdadm.conf` contains:               # mdadm.conf written out by anaconda     DEVICE partitions     MAILADDR root     ARRAY /dev/md0 super-minor=0     #ARRAY /dev/md0 level=raid0 num-devices=5 UUID=a09e9fd0:62b06654:b224f2d2:0e34ad8f      From what I can see the hard drives OK. Yet I have run `fsck -yfC /dev/md0` and it does:               Pass 1: Checking inodes, blocks and sizes          Running additional passes to resolve blocks claimed by more than one inode ....     Pass  1B:  Rescanning for multiply-claimed blocks.      When I mount the device `mount /dev/md0` it mounts. As soon as any activity tries to write to the `/dev/md0` or directory `/home` it says the files system is not clean and mounts it is read only mode. Then the system stops working.


title: What's the easiest way to decrypt a disk partition?

text: I made a mistake of encrypting the entire LVM physical volume (contains both home, root, and swap) when installing a CentOS 6.4 (2.6.32-358.6.1.el6.x86_64) box. I soon came to realize that moving files takes a horrendous amount of time due to `kcryptd` running at 90% of CPU and that encryption was not really necessary as it's just a home server containing no crucial data. However, I already configured it and installed loads of packages, tuned it as far as power management goes, and set up all the services. Is there any way to remove the encryption without having to re-install the whole thing and go through the configuration all over again? I'd love an option that would take less than 30 mins but I'm not sure one exists. Also, if anyone has any recommendations on how to make `kcryptd` more easy to use, let me know. **Edit 1**               ~]# fdisk -l /dev/sda          Disk /dev/sda: 160.0 GB, 160041885696 bytes     255 heads, 63 sectors/track, 19457 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000078c9             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1          64      512000   83  Linux     Partition 1 does not end on cylinder boundary.     /dev/sda2              64       19458   155777024   83  Linux          ~]# dmsetup ls     vg_centos-lv_home       (253:3)     vg_centos-lv_swap       (253:2)     vg_centos-lv_root       (253:1)     luks-2ffcc00c-6d6e-401c-a32c-9c82995ad372       (253:0)          ~]# pvdisplay       --- Physical volume ---       PV Name               /dev/mapper/luks-2ffcc00c-6d6e-401c-a32c-9c82995ad372       VG Name               vg_centos       PV Size               148.56 GiB / not usable 4.00 MiB       Allocatable           yes (but full)       PE Size               4.00 MiB       Total PE              38030       Free PE               0       Allocated PE          38030       PV UUID               euUB66-TP3M-ffKp-WhF5-vKI5-obqK-0qKoyZ      **Edit 2**               ~]# df -h / /home /boot     Filesystem            Size  Used Avail Use% Mounted on     /dev/mapper/vg_centos-lv_root                            50G  2.3G   45G   5% /     /dev/mapper/vg_centos-lv_home                            94G  1.3G   88G   2% /home     /dev/sda1             485M   53M  408M  12% /boot


title: Bad known_hosts file when connecting to loadbalanced domain

text: FOO.COM has two A records. 1.1.1.1 and 2.2.2.2. If I connect to ssh root@FOO.com then it sometimes can connect, sometimes it writes that there is a key mismatch, update known_hosts file. So I know that what is causing this (the two IP address behind the domain..).. but how can I resolve it? And:               -o StrictHostKeyChecking=no      no, this shouldn't be the solution :D


title: Can the GNU Project be seen as a distribution of Linux?

text: > _When Linus Torvalds was asked in the documentary Revolution OS whether the > name "GNU/Linux" was justified, he replied:_ Well, I think it's justified, > but it's justified if you actually **make a GNU distribution of Linux** ... > the same way that I think that "Red Hat Linux" is fine, or "SuSE Linux" or > "Debian Linux", because if you actually make your own distribution of Linux, > you get to name the thing, but calling Linux in general "GNU Linux" I think > is just ridiculous. I don't understand what Linus Torvalds meant here. Can we really make **GNU** a distribution of **Linux**?


title: Get network information through Ubuntu Terminal

text: Is there a command where, when entered outputs information such as:   * If the network connection is wired or wireless   * if it is a wireless network, the name of the wireless network   * How strong the signal is


title: Which packages from slackware's X category do I need for a minimal X installation?

text: I would like to set up Slackware 14.1 with a minimal package count. I already know which packages from A, AP, and N that I need for a minimal install with no X. But I have no idea which packages from the X category that I need and which ones are just unnecessary. Please don't tell me that I should just install everything. I've done that and it works but I end up with hundreds of packages I don't need.


title: VirtualBox disk performance?

text: This option was newly added to latest version of VBox , googled a lot , seems no much information was revealed , could anyone please help me pick one disk format ? ![vbox-disk-format](http://i.stack.imgur.com/wGuyW.png) Which one owns better performance here ?


title: Reduce LVM /tmp size to 10G and add everything to / root dir

text: I want to reduce the partition mounted at `/tmp` to 10GB and add all unused space to the `/` partition. If I `umount -l /tmp` and run `fsck.ext3 -f /dev/privg/lv_tmp`, I get this:               fsck.ext3: Device or resource busy while trying to open /dev/privg/lv_tmp     Filesystem mounted or opened exclusively by another program?      What are the correct steps to do LVM repartitioning?               $ df -hl     Filesystem                 Size  Used Avail Use% Mounted on     /dev/mapper/privg-lv_root   12G  4.2G  6.9G  38% /     /dev/mapper/privg-lv_tmp    29G  3.2G   24G  12% /tmp     /dev/mapper/privg-lv_var   3.9G  1.5G  2.3G  40% /var     /dev/sda1                  494M   40M  429M   9% /boot     tmpfs                       16G     0   16G   0% /dev/shm


title: force ssh to change dir after login based on config

text: Is there any way to force `ssh` to change it's working dir in `~/.ssh/config` or by using other configuration files? I have a lot of servers with different environments. Each environment is installed in a specific directory and it would be really helpful to be in this specific directory right after login. Unfortunately, sometimes several environments can be hosted on the same server. That's why I need to make it config based, as currently I have a separate entry in config for each env. Example:               Host env1     User me     Port 2222     # here directory should be /srv/project/env1     HostName 172.16.16.2          Host env2_test     User me     Port 2222     # here directory should be /srv/project/env2_test     HostName 172.16.16.2          Host env54     User me     Port 2225     # here directory should be /srv/project/env54     HostName 172.16.16.3      I can do it with `ssh -t env54 'cd /srv/project/env54 ; bash'`, but it's annoying to retype it each time or even put it in an `alias`. I believe the *nix way is to handle it via configuration.


title: Printing lines with similar text together

text: I am currently working on analyzing the performance of an application. I've starting by looking at the logs generated by our application and identifying the business logic tasks that are taking more than acceptable time to execute. A snippet from the log file looks something like :               2014-07-02 18:03:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35165 processed     2014-07-02 18:05:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35162 processed     2014-07-02 18:15:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35164 processed     2014-07-02 18:20:20,269 INFO  [ROOT] - Task2. xmlRecord Id :35165 processed      My requirement is to find the total amount of time spent on executing each task. For instance, the amount of time spent on Task2 for xmlRecord 35165 = End time for Task 2 for xmlRecord 35165 - End Time for Task 1 for xmlRecord 35165. For this reason, I want a way to group all the log statements that have the same xmlRecord Id to be grouped together as shown below :               2014-07-02 18:03:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35165 processed     2014-07-02 18:20:20,269 INFO  [ROOT] - Task2. xmlRecord Id :35165 processed     2014-07-02 18:05:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35162 processed     2014-07-02 18:15:20,269 INFO  [ROOT] - Task1. xmlRecord Id :35164 processed      If I can group all the log statements as shown above, I will quickly be able to see that it took Task2 17 minutes to process xmlRecord 35165. Note that the logs that I have shown here are not the exact logs that my application prints but just a sample. I want to be able to group all log statements such that logs for a particular XML id are always one after another. I'm a bit rusty with the shell and would appreciate it if someone can point me to a one liner or a script that already does this so I don't waste time reinventing the wheel.


title: Combining brace expansion and output redirection

text: Often, I use parameter expansion on the command-line, such as               cp a.{ext1,ext2}      which is expands to               cp a.ext1 a.ext2      However, in many cases I do not use `cp`, but another tool, let's call it `cat`, and I would do some output redirection, like               cat a.ext1 > a.ext2      In my case `a` can vary, or be quite long, so I would like to be able to use some sort of brace expansion, that at least needs only one occurrence of `a` in the one-liner. How can I obtain that? I am specifically using               $ bash --version     GNU bash, version 3.2.51(1)      but answers using other shells are also appreciated.


title: sh + how to use array in sh script in order to print all values in array

text: I want to use **arrays** in my **sh** script. My target is to create an array with the values `a b c` and print all values in the array. I succeeded to print each array, but I failed to print all values in the array. Following example: **Set each value in arr** :               n=1     eval arr$n=a     n=2     eval arr$n=b     n=3     eval arr$n=c      **Print each value from arr** :               n=1     eval echo \$arr$n     a     n=2     eval echo \$arr$n     b     n=3     eval echo \$arr$n     c      Now I want to print all values in `$arr` and instead of `a b c` I get:               n="*"     eval echo \$arr$n     {*}*      The values should be `a b c`.


title: Acer Aspire S3 or Asus Zenbook Ultrabook for running Linux (Ubuntu / Debian)

text: I'm curious if anyone has had success with running Ubuntu or Debian on the latest Ultrabooks. Specifically, the Acer Aspire s3 or the Asus Zenbook? I have had an Asus UL30a since they came out, but since the latest dist- upgrade landed linux-3 on my system, suspend/resume when on battery just dies. Works fine when plugged in so I assume it's trying to "Hibernate" when on battery. Any experiences appreciated.


title: Script to change current directory (cd, pwd)

text: I want to run a script to simply change the current working directory:               #!/bin/bash     cd web/www/project      But, after I run it, the current pwd remains unchanged! How can I do that?


title: Where can I find Mandrake 7.0 ISO?

text: I'm on the look out for Mandrake 7.0 ISO but I can't find it anywhere. Anyone have it? I need the i586 version.


title: ZSH: Recursive globbing with .directories

text: I thought the glob pattern:               **/(*|.*)      would represent every folder and file starting with dot (`.`) or not, but it skips directories in the current directory that start with `.`. What is the glob pattern that means: > every file and folder that may or may not start with `.` on the current and > deeper folders **Also:** How can I exclude a specific folder (or even better, a glob subpattern) from a recursive glob pattern such as the one above? I have tried the following to exclude the folder `.hg` from the current level (but include other folders starting with the `.` character):               **~.hg/*      but it didn't go recursively into deeper directories.


title: htop reporting much higher memory usage than free or top

text: The following three outputs were taken essentially simultaneously: top:               top - 02:54:36 up 2 days, 13:50,  3 users,  load average: 0.05, 0.05, 0.09     Tasks: 181 total,   1 running, 179 sleeping,   0 stopped,   1 zombie     %Cpu(s):  2.5 us,  0.8 sy,  0.0 ni, 96.6 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st     KiB Mem:  16158632 total, 11234480 used,  4924152 free,      844 buffers     KiB Swap: 16777212 total,        0 used, 16777212 free, 10640832 cached      free -h:                            total       used       free     shared    buffers     cached     Mem:           15G        10G       4.7G         0B       844K        10G     -/+ buffers/cache:       578M        14G     Swap:          15G         0B        15G      htop: ![htop](http://i.stack.imgur.com/AVrWm.jpg) free and top seem to agree. In top there is 11234480 KiB used, subtracting 10640832 KiB cached gives 579.7 MiB, which is pretty close to what free reports under used +/- buffers/cache. However htop is reporting 1836 (MiB) used, which is neither here nor there as far as I can see. Where does this difference come from? htop is clearly not including the cached data, but it is still reporting more than three times the memory usage of free or top. I am aware that there are many similar questions, but I haven't come across one that explains this discrepancy (the confusion usually seems to be only the with/without cache counting). Edit: I should mention that I am running openSUSE, and I see the same kind of discrepancy in both version 12.2 and 12.3 RC1. Edit2: The included version of htop is 1.0.1. I have also compiled version 1.0.2 from source and see the same discrepancy then as well.


title: How to force X to use specific display, regardless if it is plugged in?

text: As it says in title: How to force xorg to use specific display trough HDMI, regardless if it is plugged in? I have TV that has some crazy "power save" option that can't be turned off and X thinks that HDMI is unplugged. After that, everything goes mad and sometimes my program bricks. If I could tell X to act as there is always that TV plugged in into HDMI that would solve problem.


title: libpam-ck-connector causing apt-get to fail

text: I used `apt-get autoremove` on my Debian server and now `apt-get` won't install or remove anything as it keeps trying but failing to remove `libpam- ck-connector`. When trying to install anything… for example, `apt-get install php5`               (Reading database ... 28566 files and directories currently installed.)     Removing libpam-ck-connector:armhf ...     dpkg: error processing libpam-ck-connector:armhf (--remove):     unable to securely remove '/usr/share/doc/libpam-ck-connector/changelog.gz': Not a directory     Errors were encountered while processing:      libpam-ck-connector:armhf     E: Sub-process /usr/bin/dpkg returned an error code (1)      I tried to run `apt-get install libpam-ck-connector` and got this…               libpam-ck-connector is already the newest version.     libpam-ck-connector set to manually installed.     The following NEW packages will be installed:     libck-connector0     0 upgraded, 1 newly installed, 0 to remove and 86 not upgraded.     1 not fully installed or removed.     Need to get 0 B/117 kB of archives.     After this operation, 96.3 kB of additional disk space will be used.     Selecting previously unselected package libck-connector0:armhf.     (Reading database ... 28560 files and directories currently installed.)     Unpacking libck-connector0:armhf (from .../libck-connector0_0.4.5-3.1_armhf.deb ) ...     Setting up libck-connector0:armhf (0.4.5-3.1) ...     dpkg: error processing libpam-ck-connector:armhf (--configure):      package libpam-ck-connector:armhf is not ready for configuration      cannot configure (current status `half-installed')     Errors were encountered while processing:      libpam-ck-connector:armhf     E: Sub-process /usr/bin/dpkg returned an error code (1)      Any ideas on how to work around this?


title: init.d script causes boot hang

text: I successfully installed a script to automatically launch in /etc/init.d on my new Raspberry Pi. Unfortunately, it is a node.js app that never returns, and therefore hangs the device during boot (this is on Debian). Yes, I'm an idiot. Is there a secret handshake I can do during boot to prevent it from running my init.d script so I can get to login and a shell to fix it?


title: How to create a bootable USB stick with Debian Squeeze

text: Using Ubuntu, I want to install Debian Squeeze on my PC with a bootable USB stick. I found this tutorial: Plug the usb key in order to find the device location:               $ df -k     /dev/sdb                244476    217968     26508  90% /media/xxx      It shows that `/dev/sdb` is my usb key. Then I unmount it               # umount /dev/sdb      Download these two files:               # cd /tmp/     # wget http://people.debian.org/~joeyh/d-i/images/daily/hd-media/boot.img.gz     # wget http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso      Copy the first on the stick (it has to be umounted):               # zcat boot.img.gz > /dev/sdb      Then mount the stick and copy `debian-testing-i386-netinst.iso` onto it:               # mount /dev/sdb /mnt/     # cp /tmp/debian-testing-i386-netinst.iso /mnt/     # umount /mnt/      The USB key is now ready. Plug it on the computer to install, select in the BIOS USB for first boot device and start the Debian Squeeze installation. In the step :               # cp /tmp/debian-testing-i386-netinst.iso /mnt/      the ISO file is _just copied_ , not _extracted_ - Is this correct?


title: Is Linux a Unix?

text: So, there are lots of different versions of Unix out there: HP-UX, AIX, BSD, etc. Linux is considered a Unix clone rather than an implementation of Unix. Are all the "real" Unices actual descendants of the original? If not, what separates Linux from Unix?


title: What is the difference between UNIX and UNIX Like?

text: > **Possible Duplicate:**   >  Is Linux a Unix? I have heard Linux was not UNIX (I guess it still isn't) but that it was UNIX Like. Some people will just say "Linux is UNIX" or say "Linux, Solaris, something else and other UNIX-Like OSes". Could you shed some light on this?


title: What is the difference between Unix and Linux?

text: > **Possible Duplicate:**   >  Is Linux a Unix? i'm the very new one to this platform. So i want to know the main differences between the Unix and Linux ?


title: Does Linux use original Unix code or do they share the idea?

text: Does the Linux kernel use original Unix code or do they share the idea? He mocked me and said it's a stupid question to ask and of course they share the idea not the code. Since both are written in C, is that true?


Where can I find configuration file for uw-imapd on debian? Is there even one?


title: Linux based tools for multiple TV channels (cable TV) digitization

text: I'm planning to start a service which archives TV video content (at low quality). I'm exploring what software and server setup will be needed. The TV channels in the geography I'm looking at are unencrypted and are provided through coaxial cable wires (similar to standard 'Cable TV' in the US). There are about 200-250 channels, each of which is to be digitized and archived. I'm looking for a cost-effective, scalable solution which can be scaled up from an initial set of 5-10 channels to a max of 200. I can afford a set of servers each dedicated for a particular set of tasks. Obviously, cost effective linux setups would be preferred over expensive dedicated hardware solutions - but I'm open to either...


title: How do I stop Apache from running as root?

text: New on the job, small place, and the security stuff just landed on my desk. I was hired to be a front-end developer. Happy to learn new things, but never had to do sysadmin stuff before. I started digging and it appears that apache, the site, and everything is running on root. There are no other groups or users. ACK! What steps should I take to change this? I know that this is a big no-no... Bonus points if anyone can please point me to a good basic 101 tutorial on apache/php security.


title: How to log user in to Gnome Desktop from remote ssh terminal?

text: I'm using CentOS 5.5 with Gnome Desktop Enironment. By default, after system boot i get Gnome's login screen. Independently, I can log in through SSH and execute commands. Is there any command line tool, that would log user in to GNOME ? I know, there is AutomaticLogin feature in GNOME `[daemon]` section in `/etc/gdm/custom.conf` file , but I don't want to use it. I would like to be able do it "on demand" from SSH command line.


title: Pass command line arguments to bash script

text: I am new to bash script programming. I want to implement a bash script 'deploymLog', which accepts as input one string argument(name).               [root@localhost Desktop]# ./deploymLog.sh name      here I want to pass the string argument(name) through command line As an initial step, I need to append the current timestamp along with this input string to a log file say `Logone.txt` in current directory in the below format:               [name]=[System time timestamp1]      How it is possible?


title: Nagios took over default port

text: I had domain XXXXXX.com working After installing nagios the only working thing is XXXXXX.com/nagios :/ Entering XXXXXX.com generates repsonse:               Forbidden          You don't have permission to access / on this server.          Apache/2.2.15 (CentOS) DAV/2 PHP/5.3.3 Server at XXXXXX.com Port 80      I've got httpd installed. Please help!


title: Expect script: remove password on private key

text: I'm trying to remove the password on a private key. Doing it by hand is simple, I run this command and enter the password : `openssl rsa <newkey.pem > newkey-no-password.pem` I'm trying to do this in an expect script, so that I don't have to actually type the password. Here is the code I wrote:               #!/usr/bin/expect -f     set PASSWORD myPassword          spawn openssl rsa <newkey.pem > newkey-no-pass.pem     expect "Enter pass phrase:"     send "$PASSWORD\r"     expect eof      And here is the output I get when running the script:               [me@mymachine]# ./test.exp     spawn openssl rsa <newkey.pem > newkey-no-pass.pem     unknown option <newkey.pem     rsa [options] <infile >outfile     ... all the options for rsa command ...      I tried putting the `<newkey.pem` between `'` or `"`, to no avail. What am I doing wrong and how can I fix this problem?


title: disable CTRL-D window close in terminator (terminal emulator)

text: I am often logged in through multiple SSH sessions. To logout from my sessions, I press `CTRL`+`d`, until I am back on my local machine. However, sometimes I press once too many, and my terminal exits. Is there a way to block `CTRL`+`d` from closing my terminal ? I am using terminator as my terminal emulator


title: Ubuntu 10.04 can't boot, kernel panic

text: I downloaded pcap source compiled it and got a lib ending in libsomething.so.1.21.1. I tried to find how to install a lib online and in my impatience did the following               sudo .install-sh /lib libsomething.1.21.1      The output was the following               install-sh :250:chmod not found          install-sh : 1: rm :not found      After this I could not launch any program or shell command at the prompt in the terminal(I could use cd but not ls or others). Now when I try to boot into Ubuntu I get a kernel panic after the following line:               run-init:/sbin/init: No such file or directory.      .install-sh is in the pcap folder, source was taken directly from the website. I don't have a clue as to what the script did, I would be very thankful if somebody could give me any pointers on how to proceed.


title: Finding an elements in an array in bash

text: I am using the following code to first split an array into 2 and then search if 2 elements "Alchemist" and "Axe" are present in each of the two split arrays.               tempifs=$IFS         IFS=,         match=($i)         IFS=$tempifs         team1=( "${match[@]:0:5}" )         team2=( "${match[@]:5:5}" )             if [ array_contains2 $team1 "Alchemist" "Axe" ]         then         echo "team1 contains"             fi         if [ array_contains2 $team2 "Alchemist" "Axe" ]         then         echo "team2 contains"             fi            array_contains2 () {          local array="$1[@]"         local seeking=$2         local seeking1=$3         local in=0         for element in "${array[@]}"; do             if [[ $element == $seeking && $element == $seeking1]]         then                 in=1                 break             fi         done         return $in     }      But I am getting the following error -               /home/ashwin/bin/re: line 18: [: Alchemist: binary operator expected     /home/ashwin/bin/re: line 14: [: too many arguments      Lines 14 and 18 are `if [ array_contains2 $team1 "Alchemist" "Axe" ]` and `if [ array_contains2 $team2 "Alchemist" "Axe" ]` respectively.      Is the error because of IFS. If not what is the cause for the error?


title: SELinux context of files mounted from a Solaris server

text: Something I'm attempting to run in RHEL6 fails as a result of SELinux. The problem is temporarily easily solved with "setenforce 0". However turning SELinux off entirely isn't an option in my case. The problem is that these files are mounted from an old Solaris machine, and the context of everything loaded is **system_u:object_r:nfs_t:s0**. I need to modify just a handful of files that are mounted from that machine to **httpd_sys_content_t.** Any attempt to do this, however, results in " **Operation not supported** ". The command I am attempting to use is: **chcon -R -h -t httpd_sys_content_t /path/to/my/stuff** From what I can tell, this is because everything from that server is mounted as **system_u:object_r:nfs_t:s0**. Being Solaris, I can't go to the machine itself and use chcon, as SELinux and chcon don't exist. The solution I can think of that will work is to just install the same software on this machine, which is RHEL6, cutting Solaris out all together. I'd like to know if that is my only choice or not.


title: GNOME 3 desktop entry duplicate

text: Was trying to get simple desktop entry to work without creating duplicated after app run. That's for st3 under GNOME3 (Fedora 19), and `.desktop` file looks like this:               [Desktop Entry]     Version=3.047     Type=Application     Name=Sublime Text 3     Icon=path-to-logo.png     Exec="path-to-exec" %f     Comment=some comment     Categories=Editor;Text;     Terminal=false     StartupWMClass=Sublime_text      Thought that "StartupWMClass" key will do the job of grouping windows in a dock, but it does not. Looks like I've missed something. I got wmclass with xprop WMCLASS:               [me@pc ~]$ xprop WM_CLASS     WM_CLASS(STRING) = "sublime_text", "Sublime_text"      Example: ![enter image description here](http://i.stack.imgur.com/Ugplj.png) Desktop entry is at the top (ye, another logo file), but app is not get grouped in it and is shown separately. Any way to fix it? Thanx for help! **UPDATE:** I've changed .desktop entry to:               [Desktop Entry]     Type=Application     Terminal=false     Name=Sublime Text 3     StartupNotify=true     GenericName=Text Editor     Comment=Edit text files     Exec="/usr/local/bin/sublime_text_3/sublime_text" %U     MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;x-directory/normal;inode/directory;     Categories=GNOME;GTK;Utility;TextEditor;Application;Development;     Icon=/usr/local/bin/sublime_text_3/st3_custom_logo.png     Name[en_US]=Sublime Text 3      (found on the st forum) Everything is fine now. Don't understand how it works though, thought that WMClass is how windows are grouped.


title: w3m displays inline images in konsole, but not yakuake

text: I've tested this on two different systems (with TERM set to `xterm-256color`) and got the same result. Nothing in the config files seems relevant. Is there a major difference in these terminal emulators that I'm not aware of? Also, is any thorough documentation available for either of them? They seem to come with no `man` pages. I found the konsole handbook, but it is very basic.


title: DHCP configuration for iPXE

text: Is there a way to configure the DHCP process in iPXE? In particular, I want to configure the DHCP Discover message **sent by iPXE** , so that the message issued by iPXE includes more options in Parameter Request List (Option 55) for the server to replied with. Currently, only a restricted subset of options are requested, but I want more.


title: How to use numeric keypad as mouse?

text: Is there a way in Linux mint to use numpad as a mouse on my desktop. I have tried `shift`+`numlock` but it did not work. Is there a package that I must install? Articles on the Internet are too old to be useful.