title: How to make tcsh not insert whitespace in a command that spans multiple lines

text: Bash does not seem to insert whitespace but tcsh does. **Tcsh**               bash-3.2.25$ tcsh -c 'echo $tcsh; echo A\     > B'     6.14.00     A B **Bash**               bash-3.2.25$ bash -c 'echo A\     > B'     AB How can I ask tcsh to not insert a space between A and B?


title: Creating Emacs TAGS file

text: I am working through the "Emacs Lisp Intro" book within Emacs 23.4.1 on Debian Wheezy (CrunchBang Waldorf). Section 4.1 discusses the `find-tags` command and the `TAGS` file. Instructions are included to build/install the `TAGS` file if necessary. How do I do this in Debian? The folders mentioned are not present on my system and I cannot locate a `TAGS` file. I'm not sure that I have the source of Emacs installed? I installed it using `apt-get`. My `sources.list` file does not include any `deb-src` lines, if that is relevant.


title: Is there an equivalent to whitespace-mode in emacs for vim?

text: Is there a way I can see spaces and tabs wonderfully visualized in vim, like I can in emacs by toggling whitespace-mode?


title: How do I reduce the size of locale-archive?

text: I have a need to reduce the size of the `locale-archive` file on some of my RHEL6 systems. Here is that file on my system:               [root@-dev-007 locale]# ls -l     total 96800     -rw-r--r--. 1 root root 99158704 Sep  9 15:22 locale-archive     -rw-r--r--. 1 root root        0 Jun 20  2012 locale-archive.tmpl      So I did this ...               [root@-dev-007 locale]# localedef --list | grep zh_CN     zh_CN     zh_CN.gb18030     zh_CN.gb2312     zh_CN.gbk     zh_CN.utf8      ... so I figured I could get rid of `zh_CN` like so ...               [root@-dev-007 locale]# localedef --delete-from-archive zh_CN      ... and I can see `zh_CN` does not get listed anymore like so ...               [root@-dev-007 locale]# localedef --list | grep zh_CN     zh_CN.gb18030     zh_CN.gb2312     zh_CN.gbk     zh_CN.utf8      ... but the size of the `locale-archive` does not get smaller ...               [root@-dev-007 locale]# ls -l       total 96800     -rw-r--r--. 1 root root 99158704 Sep  9 17:16 locale-archive     -rw-r--r--. 1 root root        0 Jun 20  2012 locale-archive.tmpl      ... is there something else I need to do?


title: How can I remotely access linux servers

text: I have a couple of servers that I need to remotely monitor. Is there anyway that I can do that? Should I use `vncviewer`, `ssh`, or what?


title: Return value of current watt consumption on command line

text: Is there a way to return the current watt consumption on the command line? I have found about the powertop program, but have not seen a way to return the Watt consumption as a value to the command line. I'm thinking of some file that I can `cat` or `grep`. Using Arch Linux.


title: vsftpd fails pam authentication

text: Moving a tried-and-true vsftpd configuration onto a new server with Fedora 16, I ran into a problem. All seems to go as it should, but user authentication fails. I cannot find any entry in any log that indicates what happened. Here is the full config file:               anonymous_enable=NO     local_enable=YES     write_enable=YES     local_umask=022     dirmessage_enable=YES     xferlog_enable=YES     connect_from_port_20=YES     xferlog_file=/var/log/vsftpd.log     xferlog_std_format=YES     idle_session_timeout=0     data_connection_timeout=0     nopriv_user=ftpsecure     connect_from_port_20=YES     listen=YES     chroot_local_user=YES     chroot_list_enable=NO     ls_recurse_enable=YES     listen_ipv6=NO          pam_service_name=vsftpd     userlist_enable=YES     tcp_wrappers=YES      FTP challenges me for a username and password, I provide them, Login Incorrect. I have verified, this user is able to login from ssh. Something is screwed up with `pam_service`. Anonymous (if changed to allowed) seems to work well. SELinux is disabled. Ftpsecure appears to be configured fine... I am at a complete loss! Here are the log files I examined with no success:               /var/log/messages     /var/log/xferlog      #empty     /var/log/vsftpd.log   #empty     /var/log/secure      Found something in `/var/log/audit/audit.log`: `type=USER_AUTH msg=audit(1335632253.332:18486): user pid=19528 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication acct="kate" exe="/usr/sbin/vsftpd" hostname=ip68-5-219-23.oc.oc.cox.net addr=68.5.219.23 terminal=ftp res=failed'` Perhaps I should look at `/var/log/wtf-is-wrong.help` :-) Further info: /etc/pam.d/vsftpd looks like this:               #%PAM-1.0     session    optional     pam_keyinit.so    force revoke     auth       required     pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed     auth       required     pam_shells.so     auth       include      password-auth     account    include      password-auth     session    required     pam_loginuid.so     session    include      password-auth


title: How can I logout from a graphical environment from the command line?

text: Part of the beauty of trying out alpha releases of operating systems is that things _will_ break, including things we take for granted. Today it's the turn of the logout button. So, how do you log out from the desktop environment _du jour_ from the command line?


title: Controlling ppp's chat buffering

text: I looked at the ppp chat source and it uses `putchar` to write to the device. When PPP is run over a line discipline like `n_gsm`, which multiplexes a tty via the GSM 07.10 protocol, a lot of extra data is created on the link. Can I use `stty` or some other feature to glob data together? For example, if the chat script has _AT\n_ , the following may be sent to the serial port (with `n_gsm`),               f9 07 ef 03 41 d4 f9  ....A..     f9 07 ef 03 54 d4 f9  ....T..     f9 07 ef 03 0d d4 f9  .......      The extra characters are the `n_gsm` framing to a particular virtual serial port. I would prefer,               f9 07 ef 07 41 54 0d xx f9  ....AT...      Reducing the traffic from 21 characters to 9 (and I haven't included acknowledgements). The AT GPRS question has some information related to this question. What I am asking could also be achieve by altering ppp's `chat` to use `strchr('\')` and using `write()` instead of `putchar`. I am hoping there is some `stty` command turn on a Nagle like algorithm for a TTY. **07.10 standard** **n_gsm docs**


title: pfsense: No more processes

text: Sometimes my pfsense (1.2.3-RELEASE) goes crazy:   * every nat rules go down   * the web interface reply me with many errors (Warning: shell_exec(): Unable to execute...)   * my ssh daemon refuse to open a new session. All other traffic types go good. If I have a ssh session before that the error appear, for every command that i run in that ssh session I receive:   _No more processes_ I resolve the situation with an hard reset. The only strange thing that i have notice, is some illegal attempts on my ssh port. But it seems that no one has gained access.


title: Using a ; or && with $@

text: I'm trying to do something with a cron wrapper and my cron looks something like               * * * * * root /usr/bin/wrapper cd /tmp/ && ls       Then wrapper looks like               #!/bin/bash           "$@"      When I run it I can't get the semi colon or && to work as I'm hoping.               [root@domain.net ~/test]# pwd     /root/test     [root@domain.net ~/test]# ls     test.sh     [root@domain.net ~/test]# ./test.sh cd /tmp && ls     test.sh      So in that case it goes into tmp then the weapper script exits.. and it runs ls in my cwd. If I add '' around the command I get               [root@domain.net ~/test]# ./test.sh 'cd /tmp && ls'     ./test.sh: line 3: cd /tmp && ls: No such file or directory      I'm guessing with the "$@" it is trying to add in the single quote to the command being run I support I can strip out the single quotes before the "$@" but I was hoping not to do that.. any tips or is this even solvable in bash?


title: Create Null Modem Pair linux

text: I am looking to create virtual serial ports on Debian 6 squeeze. Basic requirements are:   1. be able to connect as if port was a real serial port( IE be able to set baud, stop bits etc)   2. com port pairs need to be persistent   3. com port pairs names must be static on reboot. I don't want to change code settings each time computer is rebooted I briefly tried socat today using `socat -d -d pty, raw, echo=1 pty, raw, echo=1` that successfully created `/dev/pts/5` and `/dev/pts/6` as a pair. However soon as I close the terminal running socat the pair is terminated. I am also wondering if tty0tty is an option? I have used com0com in the past with windows with great success. **My question is what is the best way to create a null modem pair so that I can simulate several com ports in Linux?**


title: How can I list all the dependencies necessary to install PHP-Soap?

text: I have a server running Centos 5.10 with no internet access that I control remotely on which I'd like to install PHP-Soap. I also have an identical box in the office which is a clone of the remote machine. PHP-Soap is already installed on the local machine. I found that one can use `ldd` to list dependencies of an executable. But to run this you need an executable in the `/bin/` folder So my question is: **_How can I list all dependencies needed to install PHP- Soap?_**


title: Please help clarify for me the role and architecture of Xorg (X server) and interaction with other software

text: Sorry, this is going to be a multi-prong question, so please bear with me: I have been a Linux user for years now, but I still struggle to understand how X compares with the software used for display on Windows and Mac systems. I know it is a client/server based software, but what is particularly puzzling for me is how it works with widget toolkits to provide a display and how these interact with each other. I mean, take the Cocoa framework of Mac: You have GnuStep, which is an open source implementation of that framework, but (from what I can guess), it runs on X, right? Yet I suppose that Mac does not use X. Are there any alternative options to Xorg on Linux? Can I run GnuStep, for example, with something else? Are window managers and desktop environments written specifically to work with X or can they work with other display software?


title: Fix held broken packages on debian?

text: I want to begin exploring moving myself away from google apps, because it's expensive, and it looks like citadel has all of the groupware functions I need. So I am trying to install citadel-suite with: > apt-get install citadel-suite But it returns: > citadel-suite: depends: citadel-mta but it is not going to be installed   >  E: Unable to correct problems, you have held broken packages. Well, yes. It does require citadel-mta. That's half the point. So why is it not going to be installed? What broken packages do I have held? Why are they broken? Why are they held? I didn't hold them. Or break them, for that matter. The problem with apt-get is that, for the 10 years I have been using it, it has, to borrow an Apple phrase, just worked. Now that it isn't, I'm rather at a loss. I did try the -f switch, but it didn't help. I haven't made any modifications to /etc/apt/sources.list, so I can't revert them. What should I try next?


title: The cursor to a match, edit, the cursor to the next match, edit -- like in a directory?

text: Algorithmic blackout:   1. problem: find the files that match   2. problem: stack/buffer the matches   3. move the cursor to the next file of the stack and thereby to the location of the match   4. repeat step 2 Things I have used earlier to tackle the issue. **Vi/m: (the below works in an ubuntu server, perhaps configured by sysadmin but cannot get it work locally)**               :grep -r "[^|]*|[^|]*|[^|]*|.*" *      <edit something>     :cn     <edit something>     :cn     <damn forgot it>     :bn     <forward and so on>      **emacs:** `M-x grep Enter` and then to have `grep -r "[^|]*|[^|]*|[^|]*|.*" *` but now in mystery. How can you do the fast hierarchial edits? **shellesque:** then I once created a wild one-liner with some grep-xargs- something-things-vi but I am starting to smell reinventing-the-wheel. Sorry about the vim/emacs juxtaposition but I don't care which tool you use, use the most convenient (xargs/emacs/vi/m just examples).


title: Running a bash script from a zsh shell

text: I'm having problems running a bash script on `zsh`. The script is similar to the one below and is supposed to run under bash:               #!/bin/bash     echo "<235234>"  | egrep -oe [0-9]+      However, my shell is by default on `zsh`, so to run the above script what I do is type `/bin/bash` on my `zsh` prompt, and then I run `. script.sh`. However, this results in an error, and I get:               zsh: no matches found: [0-9]+      (I should get `235234` instead). At this point I am confused and have the following questions:   1. If I am in `bash`, why do I get an error reported by `zsh`?   2. Why does the `egrep` regexp fail? The regular expression looks correct to me. Note: In case it matters, I am not supposed to modify the script (the script is shared by multiple users and we are not supposed to make changes to it). Thanks


title: What are the kernel, the "GNU tools and utilities", the shell and the Window Manager?

text: Among the many components of a Linux system, I find myself confused (as a newbie) about what exactly is the kernel or what is GNU's part. I understand some basic concepts of this, but where is the line between a shell and the Window Manager?


I want to trace a running multi-threaded process's library calls. As of 5 November 2012, there's only one way to get ltrace to fully support tracing multi-threaded processes: you must check out and compile an ltrace 0.7.0 prerelease. So I've decided to use latrace instead. But, looking at the latrace documentation, I didn't see an option to specify a PID to attach to. Which brings me to my question: Is there any way to attach latrace to an already-running process?


title: How can I increase open files limit for all processes?

text: I can use ulimit but I think that only affects my shell session. I want the limit increased for all processes. This is on Red Hat.


title: What is the difference between .ini and .conf?

text: As mentioned, what is the difference? or is there any concern to use them?


title: Windows Domain Server on FreeBSD

text: Is it possible (and if it is, could you point me in the proper direction) to set up a Windows Domain server (active directory and all that stuff) on a FreeBSD machine? I do understand that I need to use Samba (but not sure whether Samba 3 will be enough or should I go with the Samba 4 alpha versions). As I don't know much about Windows domains, I'm not sure whether I need to set up a DNS service on the network. In the end, I need to set up (as a CS project) a virtual FreeBSD machine that will serve Windows domain/active directory services for virtual machines running Windows. With all the nice stuff like single-login, settings, network directories and stuff. I know it's a pretty general question, but after doing my research I was left pretty much confused - Samba 4 is a advertised as a rewrite of Samba 3, with support for AD, being primary domain controller and many other features. It sounds as if Samba 3 didn't have all that. So, is it possible? What should I use? Any other tips for me?


title: What is the best method to get GNOME 2 in Arch Linux?

text: I love Arch Linux, and I love Gnome 2, but it's no longer available, since now Gnome 3 is the default version. I've seen MATE, which is a Gnome 2 Fork, and I've also seen that you can "rollback" your packages in Arch, so you can reinstall GNOME 2. Which of these works better?


title: How do I highlight a search result in tmux?

text: When I search a terminal window in tmux, it sets the cursor the keyword search, but doesn't highlight the matching word. Screen used to do this, and it was much easier to visually find a match. Thanks!


title: Find out global zone Name once you logged into a NON global zone

text: I understand in Unix Oracle-Solaris OS the `zoneadm list` command will easily show all the available zones. But if I am logged into a non global zone there is no easy way to get information about the global zone. I see the `arp` command can be of some help because it will return the NIC mac address. Then with the NIC mac address I can `arp` again to get all the machine name associated with that (NIC) mac address. This process sounds kind of intricate to me.   Is there any better way to get that info?


title: Sharing Variables across sub shell scripts

text: I have a Main shell that runs a profile, The profile contains some variables such as Count. When I call the main shell, it loads the profile and then call another shell script. I want that inner shell script be able to access the variable count that the main shell script loaded already. How can I do that ? I tried export but only helped in one level variable import.


title: Closing socket connection on running console application

text: I am testing a chat bot and want to gracefully handle for times when the chat server isn't running so it can come back up when the service is available again. I have the programming handled. My question is how to test this when the downtimes are not reliable. Someone suggested "Terminate the socket connection manually". How would I do this? This is a console node.js running on Mountain Lion. Can I sever a connection to a server from a single application?


title: Is it possible to make KDE 4 look like Win98?

text: I found settings which make windows look like in Win98, but cannot change taskbar colors and sizes. Default colors are breaking my eyes. Please, write instructions how to change taskbar and other components which significantly lower usability. Version of KDE is 4.8 and newer. EDIT: After applying Aya theme as xenoterracide suggested, taskbar looks as this: ![Aya taskbar](http://i.stack.imgur.com/k2ggx.jpg).   Is it a bug or colors indeed so crazy?


title: How can I prevent edited commands from overwriting the original? Or revert edits?

text: Often I'll execute a command in bash, press the up arrow to retrieve it from history, edit it, and execute the edit. However, sometimes I'll decide to discard the edit and run a different command or something. This poses a problem because the edited command, which I didn't run, gets saved over top of the original history entry so I can no longer run the original with ease. For example, here's the end of my current history:               2132* svn cleanup && svn up --set-de     2133  history      The first command was originally `svn cleanup && svn up --set-depth=infinity folder1 folder2`. Is there a way to disable overwrites or revert them to the original commands?


title: OpenSSH - map aliases in ~/.ssh/config to IP addresses in command line

text: Is it possible to query ~/.ssh/config in the command line? Let's say I would like to retrieve what IP address does the particular alias point to in a separate program, is it possible?


title: Separating a file with embedded header records into two files

text: I would like to separate the following example text file into two separate files based on the embedded header record using a unix script:               CSI 447907 890947967201270     776666666   B     771555555   B     774444444   B     REL 447904 890947967201270     772222222   A     771111111   B+     770000000   A     CSI 447911 891096722201270     774444444   B+     778888888   A     779999999   A     REL 171077 889928722201270     774444444   B     773333333   B+     772222222   B+     771111111   C     PHY 114926 891987278201270     123456789   A     987654321   A     777777777   B+      The result files: Text file 1               CSI 447907 890947967201270     776666666   B     771555555   B     774444444   B     CSI 447911 891096722201270     774444444   B+     778888888   A     779999999   A      Text file 2               REL 447904 890947967201270     772222222   A     771111111   B+     770000000   A     REL 171077 889928722201270     774444444   B     773333333   B+     772222222   B+     771111111   C     PHY 114926 891987278201270     123456789   A     987654321   A     777777777   B+      The number of header records can vary as well as the number of the detail records. The columns/fields are static. The first text file contains the CSI headers and corresponding detail records while the second is what is left over.


title: Output redirection and spaces

text: I'm paranoid about this, but hopefully it's a simple question: Is there any difference between               cat file1 | egrep -oP "[Mm]y string" > /home/user/file.txt      and               cat file1|egrep -oP "[Mm]y string">/home/user/file.txt      i.e., does it matter if I have spaces padding the pipe (|) and redirection (>) characters? I'm really paranoid that having spaces there the spaces will somehow end up in the output file when I don't want that. Can anyone clarify? (Using Ubuntu 12/bash if that matters.)


title: How to figure out GRUB2's menu output

text: I have just updated a remote machine which is running Ubuntu Server 12.04. I have only access through SSH and now it's asking for a reboot. I'm guessing a new kernel was installed. I need to make it boot in a very specific kernel, otherwise it will just hang. Is there any way to check (from the command line, since I am connecting through SSH) what GRUB2 is going to do on the next reboot? I mainly need to make sure that:   1. The machine is going to boot on the right kernel (Which now may have been moved into the "`Previous Linux Versions`" submenu)   2. The GRUB2 menu is going to "obey" my timeout request (in some occasions I found machines that would just get stuck with the GRUB2 boot menu, despite of having a `GRUB_TIMEOUT` parameter specified in `/etc/default/grub`) So is there any way to "simulate" or diagnose what GRUB2 is going to do on the next reboot? Some way to check things like " _It is going to boot kernel yaddayaddayadda and it has a timeout activated of yadda seconds_ " I know it's a long shot, but maybe there is something like a diagnose tool (which is going to have to be command line... I don't even have X-Windows on the computer I'm connecting to) Thank you in advance!


title: Modifying $HOME variable on a session startup script: Gnome ignores it?

text: I'm modifying the `$HOME` variable on a `/etc/profile.d` script. This seems to be OK for console sessions. There are some caveats on graphical sessions, though: Gnome won't load my desktop configuration, it will still use the HOME defined on the `passwd`. Bizarre enough, If I open a terminal, the `$HOME` variable is the one defined by me on the `/etc/profile.d` script. I'm doing this because I'm rsyncing the home against a NFS server, and I want to provide an alternative login method by mounting the NFS home directly, for occasional logins. Since at this stage root has already created the home directory, my plan is to link the NFS mount inside it, and modify the `$HOME` variable.


title: SVN checkout under a different user name

text: When I ssh into my server I log in under root or my user on the system. However, when I checkout from my svn repos then are then owned by either root or my user, and therefore all files deployed to my server come up with a 500 error on the server with the message "UID of script is less than MIN_UID". When I FTP files to the server they are owned by user "Sites" so is there any way I can log in under root or my user and checkout files that are owned by "Sites". What I don't really want to have to do is to have to manually `chown` all the files every time I checkout or update. I'd like it to happen automatically (or have to do it just the once on checkout). Is there any way to do this?


title: Keyboard repeat without pressing a key

text: Occasionally a key repeats although I do not press the key. I would like to prevent this phenomenon. The phenomenon happens when I am pressing Ctrl+w again and again. After several times of Ctrl+w, w is inserted repeatedly without pressing any key. I have checked that this happens on several applications: firefox, konqueror, KWrite, emacs23. The same phenomenon happens with Ctrl+s. (I have not check other keybinds, because the phenomenon does not often happen.) Pressing any key stops this phenomena. If I disable the keyboard repeat by configuring System Settings for KDE, then the phenomenon seems not to happen. But I do not want to do. Could anyone possibly tell me how to prevent this unexpected phenomenon? My PC is Dell Dell Latitude E6220. I am working with KDE 4.6.4 on Vine Linux. I have swapped Ctrl and Caps Lock. If more information is needed, let me know.


title: How to clear terminal completely?

text: When we use `clear` command or `Ctrl`+`L` in terminal, it clears terminal but we can still scroll back to view the last used commands. Is there a way to completely clear the terminal?


title: is it possible to run job in foreground after user logout

text: I have some job to run which need be attached to terminal (or in foreground). The job is run in remote servers, and needs keep running after the users logout. I am aware of vnc server, however, I want to know if there is any builtin tool in `redhat` that can work this out. (that is, I dont have sudo to install extra software).


title: Monitor mode wifi only seeing broadcast packets

text: I have pretty much exhausted every link I have found on google regarding this topic, and I'd like some of the most experienced eyes on the problem, because something obscure must be going on. # Systems tested on:   * VirtualBox 4.1.22 VM: Ubuntu 12.10 x64   * VirtualBox 4.1.22 VM: Ubuntu 10.04 x64   * VirtualBox 4.1.22 VM: Backtrack 5 r2   * VirtualBox 4.1.22 VM: Backtrack 5 r3   * Lenovo W530 laptop running Backtrack 5 r2 # Interface: Alfa AWUS036H - FCC ID UQ2AWUS036H (you can verify RTL8187L chipset at http://transition.fcc.gov/oet/ea/fccid/. Enter grantee code: UQ2, product code: AWUS036H, then clicking "detail" and then "internal photos"). # Problem description The problem is that while I'm running wlan0 in monitor mode, I only see broadcast packets (I see ARPs, DHCP transactions, beacons, and other random management and data packets that are being broadcast or multicast). This is the case in kismet, wireshark 1.2.x, 1.4.x, and 1.8.x, and my own packet reader program that uses libpcap. The clients that I have set up running pings and http traffic are connected to an open wireless g network. The computer I am sniffing from is not connected to any network. # Procedure I have tested more configurations than I can list, but I'll try to give a good idea of what I've done. The USB wireless card I listed (Alfa AWUS036H) is using the rtl8187 driver. Relevant commands and their outputs are listed below:               # lsusb     Bus 001 Device 009: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter     Bus 001 Device 007: ID 80ee:0021       Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub          # lsmod|grep 80211     mac80211              238928  1 rtl8187     cfg80211              148725  2 rtl8187,mac80211      I've made sure the wireless card is on channel 6, the same channel my open network is on. I have tried both putting wlan0 into monitor mode manually using:               # ifconfig wlan0 down     # iwconfig wlan0 mode monitor     # iwconfig wlan0 channel 6     # ifconfig wlan0 up      And also using airmon-ng to create a mon0 device:               # airmon-ng start wlan0 6     Interface   Chipset     Driver          wlan0       RTL8187     rtl8187 - [phy5]                     (monitor mode enabled on mon0)      When using iwconfig, I can verify wlan0 is in monitor mode:               wlan0     IEEE 802.11bg  Mode:Monitor  Frequency:2.437 GHz  Tx-Power=27 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:off      When I use iwconfig to put the card into monitor mode manually, I use the interface wlan0 in wireshark and kismet. When using airmon-ng to create a mon0 interface that is in monitor mode, I use mon0. In both cases, I get the same result: kismet and wireshark will see all the broadcast packets from the APs around me, but never any ICMP or HTTP traffic I'm creating from other clients in order to test. I am not associated or authenticated to any AP. I did this a few months ago at a workshop and it worked great; we saw tons of HTTP traffic flying around. For most of the same type of questions I've seen asked elsewhere, the problem had to do with the person being associated to a network or that they were on an encrypted network and weren't entering the key properly. I cannot find any issue with the setup or the device. Any ideas? Thanks for any help.


title: syndaemon -t option not working on HP dm4 running Ubuntu 12.04

text: I'm running `syndaemon -i 2.0 -K -R -t` but the touchpad still allows clicking while typing. On the other hand, I know that syndaemon is working correctly because I can run `syndaemon -i 2.0 -K -R` and that works well enough.


title: Restricting an SSH/SCP/SFTP user to a directory

text: Is there a simple way to restrict an SCP/SFTP user to a directory? All methods that I've come across require me to set a chroot jail up by copying binaries, but I don't think that should be necessary.


title: Create user who can only access one directory

text: I would like to create a user that only has access to one folder and nothing else whatsoever. I have already created a user but he has access to other parts of the system according to corresponding file settings. I don't want him to have that, I want him only to have access to one folder and nothing else. Everything else should preferably be just invisible to him. Is it possible to create such a user,and if so, how do I go about doing that? p.s. Removing 'other' privileges of other users home directory goes a bit of the way towards this end. But this limited user still has access to all the base directories like /etc and such. And he can still see other users home directory, even though he cant access them.


title: How to allow user to only rsync/download only one directory through SSH

text: What I want to do is to give to user a simple script to run, that will sync some directory from my VPS to their machine, authentication would be done by using pubkey, and I would like to have control on what dirs what users can download. I know I can achieve that by using simply FTP, but it's not secure and I would rather rely on pubkey authentication rather than passwords, so I would like to use SSH. However I don't want to allow user to do anything more in shell than syncing that one specific directory. How to achieve that?


title: Is there any way to read lines from command output?

text: I have a pre process command to output a file               ./preprocess.sh > preprocessed_file       and the `preprocessed_file` will be used like this               while read line     do              ./research.sh $line &          done < preprocessed_file           rm -f preprocessed_file      Is there any way to direct the output to the `while read line` part instead of outputting to the preprocessed_file? I think there should be a better way other than using this temp `preprocessed_file`.


title: How to output to screen overriding redirection

text: Is it possible, within a shell script, to write to the screen while STDOUT and STDERR is being redirected? I have a shell script that I want to capture STDOUT and STDERR. The script will run for perhaps an hour or more, so I want to occasionally write some status messages to the screen that will be displayed and not redirected (not captured). For a minimal example, I have a shell script, let's say "./myscript.sh":               #!/bin/sh -u          echo "Message A: This writes to STDOUT or wherever '1>' redirects to."     echo "Message B: This writes to STDOUT or wherever '1>' redirects to.">&1     echo "Message C: This writes to STDERR or wherever '2>' redirects to.">/dev/stderr     echo "Message D: This writes to STDERR or wherever '2>' redirects to.">&2     echo "Message E: Write this to 'screen' regardless of (overriding) redirection." #>???           Then, for example, I'd like to see this output when I run the script like this:               [~]# ./myscript.sh > fileout 2> filerr     Message E: Write this to 'screen' regardless of (overriding) redirection.     [~]# ./myscript.sh > /dev/null 2>&1     Message E: Write this to 'screen' regardless of (overriding) redirection.     [~]#             If this cannot be done "directly", is it possible to temporarily discontinue redirection, then print something to the screen, then restore redirection as it was?      Some info about the computer:               [~]# uname -srvmpio     Linux 3.2.45 #4 SMP Wed May 15 19:43:53 CDT 2013 x86_64 x86_64 x86_64 GNU/Linux          [~]# ls -l /bin/sh /dev/stdout /dev/stderr     lrwxrwxrwx 1 root root  4 Jul 18 23:18 /bin/sh -> bash     lrwxrwxrwx 1 root root 15 Jun 29  2013 /dev/stderr -> /proc/self/fd/2     lrwxrwxrwx 1 root root 15 Jun 29  2013 /dev/stdout -> /proc/self/fd/1


title: Explain a tsums command line

text: In putty, I am blindly writing codes as below,               cat >! lot     tsums @lot -format=lot,machine_id > ! MCID      what is the meaning of these 2 lines?


title: DNS local area vs DNS Virtualbox

text: I have been trying to set up a DNS server on my system using Linux and bind. (I'm working with CentOS and Linux on my Windows 7) On my Linux everything seemed to work:I can access my server and ping/nslookup/etc to the requested webpage on my created Linux server. But on windows I'm unable to ping to my webpage hosted on my Linux server: > Pinq request could not find host mmore.be Please check the name and try > again. When I ask for `ipconfig -all` I realised that on my local area connection I got 3 DNS servers but I only need to access the 192.168.0.198... What are these 2a02:1800:100::44:1 and 2a02:1800:100::44:2 doing? Are they causing that I'm unable to ping to my webpage hosted on my linux? If yes: can I remove or shut down these 2 DNS servers? ![My DNS for local and Virtualbox connection](http://i.stack.imgur.com/hVpHj.jpg)


title: Install postgresql 9.2 on debian wheezy (on virtualbox)

text: I have virtualbox with Debian Wheezy. I'm trying to install Postgresql 9.2 on it. When I trying do it by this instruction i have next:               Reading package lists... Done     Building dependency tree     Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      postgresql-9.2 : Depends: postgresql-common (>= 135~) but it is not going to be installed                       Depends: ssl-cert but it is not installable     E: Unable to correct problems, you have held broken packages.      When I try to install postgresql-common:               apt-get install postgresql-common      I got next:               Reading package lists... Done     Building dependency tree     Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      postgresql-common : Depends: ssl-cert (>= 1.0.11) but it is not installable     E: Unable to correct problems, you have held broken packages      When I try to install ssl-cert:               apt-get install ssl-cert      I got next:               Reading package lists... Done     Building dependency tree     Reading state information... Done     Package ssl-cert is not available, but is referred to by another package.     This may mean that the package is missing, has been obsoleted, or     is only available from another source          E: Package 'ssl-cert' has no installation candidate      I'm novice in Linux, please help me install Postgresql 9.2 There is my `sources.list`               #          # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official i386 CD Binary-1 201305$          deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official i386 CD Binary-1 20130504$          deb http://security.debian.org/ wheezy/updates main     deb-src http://security.debian.org/ wheezy/updates main          # wheezy-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #     # deb http://ftp.debian.org/debian/ wheezy-updates main     # deb-src http://ftp.debian.org/debian/ wheezy-updates main


title: split long line on a delimiter

text: What command can I use to split input like this:               foo:bar:baz:quux      into this?               foo     bar     baz     quux      I'm trying to figure out the `cut` command but it seems to only work with fixed amounts of input, like "first 1000 characters" or "first 7 fields". I need to work with arbitrarily long input.


title: Converting PNG frames to video at 1 FPS

text: I have video frames in PNG format at 1 FPS and I'm trying to convert them into a video using ffmpeg. If I do something like this: `ffmpeg -i data/input-%4d.png data/output.mp4` I get a video at 25FPS which is basically a very fast-forward of the input (which is captured at 1FPS). If I try: `ffmpeg -i data/input-%4d.png -r 1 data/output.mp4` I get something that VLC doesn't want to play :) Now, if I take the first video (the FF one) and apply a filter to slow it down (e.g. `-filter:v 'setpts=24.0*PTS'`), I can get it to play like a 1 FPS video, but of course the price is file size. It's generating a bunch of repeated frames I guess. So, the question is how do I create a video that has exactly 1 FPS and actually plays at that speed? The output format, btw, isn't that important for me.


title: Pacman/Arch: Install package(s) without really installing them

text: > **Possible Duplicate:**   >  Make package explicitly installed in pacman So I've been stupid and removed my /var/lib/pacman/local dir.   Without backup, but with a root shell open at tty4. O yeah, pacman -Sf with the base repo also overwrites your /etc/passwd. Thank god for .pacorig. I still have my pacman logs, but all the packages are already installed. Pacman outputs errors that the files already exist.   How can I install packages without modifying files? (pacman -S --fake --noextract)   I've also tried the -D switch but that only works for installed packages.


title: Script for ssh Agent Management: Is this adequate? Any bugs?

text: The following is something I use to manage my ssh agent settings.               #!/bin/echo "Must source this:"      ## Ensure that ~/.ssh/env contains valid values          unset SSH_AGENT_PID SSH_ENV_REFRESH          [ -r ~/.ssh/env ] && . ~/.ssh/env     [ -n "$SSH_AGENT_PID" ]  || {         # No env file (or it's badly corrupted:         eval $(ssh-agent &>/dev/null) &> /dev/null         SSH_ENV_REFRESH=1         }          # Ping the agent process:     kill -0 "$SSH_AGENT_PID" >& /dev/null || {         # No process, so start a new one:         eval $(ssh-agent &>/dev/null) &> /dev/null         SSH_ENV_REFRESH=1         }          ssh-add -l &> /dev/null     [ "$?" -gt 1 ] && {         # Process alive but unable to be contacted         # for some reason (wedged/defunct process,         # or damaged/corrupt UNIX domain socket node?)              # So kill it:         kill "$SSH_AGENT_PID" >& /dev/null         # ... with extreme prejudice if necessary:         kill -0 "$SSH_AGENT_PID" >& /dev/null \         || kill kill -9 "$SSH_AGENT_PID" >& /dev/null              # ... and start a new one         eval $(ssh-agent &>/dev/null) &> /dev/null         SSH_ENV_REFRESH=1         }          [ -z "$SSH_ENV_REFRESH" ] || {         # Over-write old env file:         printenv | grep "^SSH_A" > ~/.ssh/env         # Append export command:         echo "export SSH_AGENT_PID SSH_AUTH_SOCK" >> ~/.ssh/env              # Load the (null-passphrase) identites into the agent:         ssh-add  < /dev/null &> /dev/null         }      It's intended to be sourced (`. ~/lib/sshagent.sh`) from _~/.bashrc_ or other login or shell start-up files ... or even cron jobs. It works for me but I'm hoping folks here will review it and offer suggestions about any corner cases that I'm missing. I used to only run it from ~/.bash_login ... but then I'd find that, in some cases, my shells wouldn't pick up the settings (X display manager and I think remote ssh non-login sessions ... cases where ssh is called with a command). In some other cases the old settings would persist and not updated when an agent process was restarted (for whatever reason). So I run it in _~/.bashrc_ and try to avoid any stray output ... as is recommended for _~/.bashrc_ in general. So, are there any evident corner cases or bugs? Would this make sense for something like _/etc/bashrc_? Is it reasonably portable to other shells?


title: rsync timed out

text: I need to sync a directory to a directory on a remote server. at the moment i use `rsync -ca` to do this but the directory is quite large and the whole process fails with a timeout error. Now i'm looking for a file by file sync instead of a 'all at once' approach. like 'find' and for each found rsync to the server. What would be the most easy way to do this ? I get the following error : receiving incremental file list Write failed: Broken pipe rsync: connection unexpectedly closed (1175057 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(601)[receiver=3.0.7] rsync: connection unexpectedly closed (287 bytes received so far) [generator] rsync error: unexplained error (code 255) at io.c(601) [generator=3.0.7]


title: Mouse and keyboard not working in FreeBSD 9.0

text: Could not use keyboard and mouse at KDM log in screen in FreeBSD 9.0 KDE Typed on nano:               hald_enable="YES"     dbus_enable="YES"     local_startup=${local_startup} /usr/local/kde4/etc/rc.d"     kdm4_enable="YES" after saving I reboot and log in screen appears but mouse and keyboard not enabled.


title: Scheduling commands by system inactivity

text: So `cron` or `at` can schedule our commands to run at the exact time we need them to, but can we schedule commands to run when systems are **inactive**? Something like:               echo "some_commands" | when 'cpu < 15%'


title: removing folders with find - strange message

text: mkdir foodir     find . -iname foodir -exec rm -fr {} \;      It does the job, but barfs message:               find: `./foodir': No such file or directory


title: What does the term static variable mean in unix speak?

text: From the section 2.7 of the book - The Linux programing Interface named **Process memory layout** : _Data_ is defined as the               static variables used by the program.      What is the significance of the word static here ? I am aware of what static variables are in Java but I can not relate that meaning in this context .


title: Concept of controlling terminal in Unix

text: Can some one please explain in an easy to understand way the concept of controlling terminal in unix and unix like systems ? Is it related to a session ? If yes, then how ?


title: Discover MTU between me and destination IP

text: In a case I can use only `UDP` and `ICMP` protocols, how can I discover, in bytes, the path MTU for packet transfer from my computer to a destination IP?


title: How does CPU frequency work in conky?

text: I'm setting up conky and I would like to add the CPU frequency, but if I put               ${freq_g cpu0} Ghz      I get 1.2Ghz. Why is that? My CPU is 2.8Ghz.


title: Replace require statements by autoload in .emacs file to improve performance

text: According to these posts:   * How can I make emacs start-up faster   * a-nickels-worth.blogspot.de/effective emacs one can somehow replace `require` and `load` statements in the `.emacs` file to speed up the emacs start. However I don't know how to do this in detail. For example I have (among other things) in my .emacs file the following `require` and `load` statements:               (load "auctex.el" nil t t)     (require 'alarm)     (require 'linked)     (load "nxhtml/autostart.el")     (require 'autoinsert)     (require 'recentf)     (require 'color-theme)     (load "~/.emacsaddons/emacs-color-theme-solarized/color-theme-solarized")     ...      For `alarm` and `linked` there are corresponding files in a directory called `.emacsaddons`, for `nxhtml` there is a directory, for the others there are no corresponding files in `.emacsaddons`. I didn't include all `require` or `load` statements from my `.emacs` file in the example above, just a few where I feel that the steps for replacing them with `autoload` will differ between them (for example because some have `el` files unter `.emacsaddons` and some doesn't, or because `nxhtml` is a subdir of `.emacsaddons`...). How are the detailed steps to replace everything by `autoload` functionality for improving the performance?


title: cpufreqd does not control temperature plus shows no output

text: Since my laptop (an Acer Aspire 5750G running a Gentoo Linux with a not-quite- up-to-date kernel 2.6.39-r3 (a weird wLan hardware makes the update difficult)) tends to run rather hot I am trying to control the situation by employing the service cpufreqd. cpufrequtils are present and active. acpi -t returns nothing. However, lm-sensors are installed and look happy:               Ulyss etc # sensors     coretemp-isa-0000     Adapter: ISA adapter     Core 0:       +64.0 C  (high = +86.0 C, crit = +100.0 C)     coretemp-isa-0002     Adapter: ISA adapter     Core 1:       +64.0 C  (high = +86.0 C, crit = +100.0 C)     ...      sensors -u yields               Ulyss etc # sensors -u     coretemp-isa-0000     Adapter: ISA adapter     Core 0:       temp1_input: 63.000       temp1_max: 86.000       temp1_crit: 100.000       temp1_crit_alarm: 0.000          coretemp-isa-0002     Adapter: ISA adapter     Core 1:       temp1_input: 63.000       temp1_max: 86.000       temp1_crit: 100.000       temp1_crit_alarm: 0.000     ...      Reading several sources on the net and last not least               man cpufreqd.conf      I created /etc/sensors.d/cores.inf               chip "coretemp-isa-0000"       label temp1 "Core 0"          chip "coretemp-isa-0002"       label temp1 "Core 1"     ...      and in /etc/cpufreqd.conf modified the general block into               [General]       pidfile=/var/run/cpufreqd.pid       poll_interval=2       verbosity=7 # Was at 4       enable_remote=1 # Was commented out       remote_group=root # Was commented out     [/General]      and activated               [sensors_plugin]     sensors_conf=/etc/sensors.d/cores.conf     [/sensors_plugin]      and defined               [Rule]     name=CPU Too Hot     sensor=temp1:60-200     cpu_interval=50-100     profile=Performance Low     [/Rule]      All this done I checked that all sensors read more then 60 degree C, restarted cpufreqd and checked               Ulyss etc # cpufreq-info -p     2001000 2001000 performance      which still may be correct due to the possible fact that other rules are stronger (btw: Is there some way to introduce weights? Maybe by repeating some lines in the rule?). So I try to get some information calling cpufreqd directly in its most verbose mode:               cpufreqd -V7      which yields no output even when specifiying -f /etc/cpufreqd.conf as well. I have a hunch that there may be some trouble in lacking modules. Hence:               Ulyss sensors.d # lsmod     Module                  Size  Used by     fuse                   56971  1      cpufreq_ondemand        5203  0      nvidia              12290458  0      tg3                   104688  0      wl                   2530575  0      uvcvideo               52523  0      videodev               61049  1 uvcvideo     v4l2_compat_ioctl32     7103  1 videodev      Another hunch calls for kernel options               --- ACPI (Advanced Configuration and Power Interface) Support       [*]   Deprecated /proc/acpi files       [ ]   Deprecated power /proc/acpi directories        M   ACPI 4.0 power meter             EC read/write access through /sys/kernel/debug/ec       [*]   Deprecated /proc/acpi/event support        *    AC Adapter        *    Battery       -*-   Button       -*-   Video        *    Fan       [*]   Dock       *     Processor             Processor Aggregator       *     Thermal Zone       -*-   NUMA support       [ ]   Debug Statements        M    PCI slot detection driver       -*-   Container and Module Devices (EXPERIMENTAL)        M    Smart Battery System             Hardware Error Device       [ ]   ACPI Platform Error Interface (APEI)          [*] CPU Frequency scaling       [ ]   Enable CPUfreq debugging             CPU frequency translation statistics             Default CPUFreq governor (userspace)  --->        *    'performance' governor        *    'powersave' governor       -*-   'userspace' governor for userspace frequency scaling        M    'ondemand' cpufreq policy governor        *    'conservative' cpufreq governor       *** CPUFreq processor drivers ***             Processor Clocking Control interface driver        *    ACPI Processor P-States driver             AMD Opteron/Athlon64 PowerNow!             Intel Enhanced SpeedStep (deprecated)             Intel Pentium 4 clock modulation       *** shared options ***      So far the situation. Now my questions: Could any of you shed some light on why the cpufreq fails to change to a lower frequency? Or, just as interesting, how I could debug the `/etc/cpufreqd.conf` file?


title: Find out which program is asking for privilege escalation?

text: I have a finger print reader on my laptop, and I configured PAM with fprintd, sometimes when it lights up, I want to find out which program is asking for a privilege escalation. Any ideas?


title: rsync server and client issue

text: I am new to rsync server so please bear with me. I just configured an rsync server that is hosting the files I would like to replicate to a remote machine. Here is the rsyncd.conf file:               max connections = 2     log file = /var/log/rsync.log     timeout = 300          [share]     comment = share     path = /mnt/share     read only = no     list = yes     uid = root     gid = root     auth users = rsync     secrets file = /etc/rsyncd.secrets      I create a rsyncd.secrets file which looks like:               rsync:password      After I start the rsync daemon, I issue the following on the remote machine and I see the module               [remoteserver] # rsync  rsync://10.0.0.10     share  share      With the following setup, what command do I need to issue on the remote server (or the rsync server?) to sync "share" to the local "/tmp/share" for example. Would it be something like this?               rsync -rv rsync://rsync@10.0.0.10::share /tmp/share


title: Interesting Secure Copy Behavior

text: I'm not entirely sure where to ask this question, so if this is not the right place just let me know and I'll move it. Today I was trying to using recursive scp to copy a directory between two Linux servers and made a typo when referring to the destination server. Instead of transferring the directory to the other machine, it began to transfer the file back into itself. It took a while for me to notice what it was doing since the directory was so large, but then I started seeing the same files popping up again and again on the transfer status until I killed it. It confused me that this was allowed and I have a few questions. I guess my main question I would like to ask you all, though, is if there is ever an instance when a user would need to make a secure copy to himself on the same machine or is it an unnecessary side effect of scp that was just shrugged off? Edit - Sorry guys, here's the actual command `scp -r /path/to/dir SameUser@sameserver:/path/to/dir`


title: Find out if system startup was initiated by rtc alarm

text: How can I know if a system startup was initiated by an rtc alarm event in linux? I am writing some scripts that handle sleeping/shutdown of my htpc. I want the machine to sleep after recording has finished but only if the last startup was due to rtc alarm.


title: Hard drive writes freezing up Gnome

text: I'm currently running Debian 6.0.5 on my white Macbook 2008 (4,1) and have recently noticed that when I download, move, or decompress a file, Gnome freezes up completely for at least 20 seconds. These freezes happen off and on until the file is done downloading. Oddly enough I can still use Compiz to switch between workspaces and move windows, but the windows aren't being redrawn. I did a lot of googling to see if I could find a solution to the problem, but not much turned up for my specific problem. I thought the problem might be related to me using a Seagate Momentus XT, as there seemed to be a lot of problems with that drive and linux in the past. It turns out that I'm using the updated firmware that was supposed to fix the linux problems the drive was having. If anyone has any ideas as to why this is happening and a potential fix to this problem, please let me know. I get this error in the syslog:               Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330686] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330695] ata3.00: BMDMA stat 0x6     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330703] ata3.00: failed command: READ DMA EXT     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330717] ata3.00: cmd 25/00:00:80:64:b4/00:01:2c:00:00/e0 tag 0 dma 131072 in     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330721]          res 51/84:60:20:65:b4/84:00:2c:00:00/e0 Emask 0x30 (host bus error)     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330728] ata3.00: status: { DRDY ERR }     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330734] ata3.00: error: { ICRC ABRT }     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.330757] ata3: soft resetting link     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.510690] ata3.00: configured for UDMA/33     Sep 13 16:54:23 Thunder-Pussy kernel: [ 5713.510835] ata3: EH complete


title: Use SSH key authentification with custom user $HOME

text: I have some users which have different $HOME directories than `/home/`... The user homes are under `/pkg/home`and `/pkg` owner is a different user but all users have group access to `/pkg`. But it seems SSHD will restrict access to `authorized_keys` (e.g. `/pkg/home/usera/.sshd/authorized_keys`) because the user is not owner of the full path. Is there any option for `sshd_config` to change this restriction?


title: How to load HID kernel module from the kernel command line?

text: While upgrading a server from kernel 3.2.9 to kernel 3.5 I had a problem with the network (`ifconfig eth0 up` won't work) so I updated the system to get a newer userspace, but in the process something seemed to go wrong with modprobe, so the HID kernel module didn't come up, although I know it is compiled and ready to be used. Since I can't log in through SSH and only USB keyboards can be used I got stuck, but I suspect I should be able to load the HID kernel module from the kernel command line, but I don't know the right arguments for that. **EDIT:** Since I use LILO as bootloader, I know it is possible to supply kernel command-line arguments on the `boot:` prompt following the kernel image label. If my image label is `Linux-3.5`, what do I need to include after it so USB HID driver is loaded? Should it just read `boot: Linux-3.5 usbhid`? (The module name was hinted by @Renan on his answer, but it was removed before I could finish commenting it)


title: Oneliner to detect camelcase variables

text: I would like to insert some style tests as git hooks in order to stick with precise style rules. How can I come up with a oneliner that detects and prints arbitrary camelcase variables like the following:               camelCasehere     or     camelCaseHere     or     camel_caseHere


title: Is there any use for RLIMIT_NICE?

text: I am using `prlimit` in Ubuntu to do some resource restrictions in my sandbox which has been very helpful. However, I am not quite sure what to do with `RLIMIT_NICE`. The docs say: > RLIMIT_NICE (since Linux 2.6.12, but see BUGS below) Specifies a ceiling to > which the process's nice value can be raised using setpriority(2) or > nice(2). However, according to getpriority(2), a process can raise it's nice value only if owned by a superuser in the first place. But if this is the case, the `RLIMIT_NICE` value is not going to add too any functionality because a privileged user can arbitrarily lower or higher `RLIMIT` values anyway. So I don't understand how to use or interpret `RLIMIT_NICE`. For non- privileged users the entire thing seems useless because they cannot raise priority in the first place, and it makes no sense to set it below the current priority. However for superusers it doesn't really add anything either because the `nice`, and `RLIMIT_NICE` soft- and hard limits can arbitrarily be raised. So what is the idea behind `RLIMIT_NICE` ?


title: Weird Booting Problem with Debian Squeeze

text: I have a Windows XP/Debian Squeeze (XFCE desktop) dual-boot set up on a Dell Latitude laptop. The Windows XP portion boots fine. However, sometimes the Debian portion does not boot. If it doesn't boot, and I do a hard reboot, it will boot the second time. However, sometimes Debian will boot the first time. How can I diagnose this problem? All help appreciated! [EDIT] I should mention that the improper boot manifests itself as a failure to reach the login screen. I see the standard Debian wallpaper with the stars and so on, but it doesn't display the login box.


title: Open up many files in panes at once

text: When I need to edit multiple files, it's really a pain to have to open them one by one. Is there a way to open multiple files in VIM from the commandline?


title: 'convert' taking a long time to create a PNG thumbnail

text: I made a png from a pdf using ghostscript. It was converted very fast (not more than 1 sec), and has good quality.               $ identify 1.png     1.png PNG 3508x2480 3508x2480+0+0 8-bit PseudoClass 2c 51KB 0.000u 0:00.000      But for some reason I have to have a thumbnail for this kind of image. And I don't know how to make it with `gs`, so I did the thumbnail with the `convert` tool from ImageMagick like this:               $ convert -thumbnail 906 1.png t.png      Resize takes about 2-4 second. Why? Why is creating the thumbnail taking taking longer than the pdf to big image conversion process? Is there any way how to fix this issue?


title: How to disable systemd's "Time has been changed" message spam in /var/log/syslog on Debian jessie?

text: Due to combined use of Debian `jessie`, that uses `systemd` by default, and sdwdate (that uses Slow Clock Adjuster ( gh )), my system clock is frequently changed. As a result `/var/log/syslog` gets endlessly spammed by.               [...]     Aug 22 13:06:15 host systemd[1]: Time has been changed     Aug 22 13:06:16 host systemd[1]: Time has been changed     Aug 22 13:06:16 host systemd[852]: Time has been changed     Aug 22 13:06:17 host systemd[852]: Time has been changed     Aug 22 13:06:17 host systemd[1]: Time has been changed     Aug 22 13:06:18 host systemd[1]: Time has been changed     [...]      Running `sudo service rsyslog stop` stops the spam, but this is not a real solution. This was not an issue on Debian `wheezy` that used `sysvinit`. How can `systemd` be configured to not send the `Time has been changed` message to `/var/log/syslog`?


title: How to read the local DNS cache contents?

text: I know that on Windows I can issue `ipconfig /displaydns` and I see the local DNS's cache content. How can I list the DNS's cache content in Linux? I would like to get as much as cross-distro solution as possible.


title: Comparison of columns in two files and appending the first file

text: I need a help on this :- I have a file : emp.txt               21356 suresh 12/12/2012     23511 ramesh 11/06/2011     31456 biswajit 09/08/2013     53134 archan  06/02/2009      first field:- employee id, 2nd field is name and third field is date of joining HR gives a list of employees who have been moved out of the company. Let's suppose i get a text file from hr:-               ramesh     archan      I need to compare it with second column of the original employee list and which ever matches , employee list will be updated               21356 suresh 12/12/2012     23511 ramesh_terminated  11/06/2011     31456 biswajit 09/08/2013     53134 archan_terminated  06/02/2009


title: Where can I find a reference to the format of the comment field (field 5) of the /etc/passwd file?

text: In the `/etc/passwd` file on my system, the "comment" field, field 5, is inconsistent in its contents. I thought that I could extract it to get the full name of the user.               fullname=`awk -F: '$1 == name {print $5}' name=$LOGNAME /etc/passwd`      However this returns with `$fullname` containing a name with 0, 3, or 4 commas following. Exploring the man page (`man 5 passwd`) provides no details of this field other than describing it as "user name or comment field." Perhaps there is additional information that is stored along with the user name?


title: extundelete does not finish its work

text: I need to restore a file on sda7 so I remounted ro und startet extundelete               manuel@P5KC:~/recovery/RECOVERED_FILES$ sudo extundelete --restore-all /dev/sda7     WARNING: Extended attributes are not restored.     Loading filesystem metadata ... 688 groups loaded.     Loading journal descriptors ... 18110 descriptors loaded.     Writing output to directory RECOVERED_FILES/     Searching for recoverable inodes in directory / ...      1554 recoverable inodes found.     Looking through the directory structure for deleted files ...      Unable to restore inode 2228446 (lost+found/latex): No data found.      But the directory `RECOVERED_FILES` is empty. Am I doing something wrong or is my data lost? Filesystem is ext4. At the end, logged in as su, I am even getting a segmentation fault. * * * Debian Wheezy 3.2.0-4-amd64


title: How do I find my Raspberry Pi on a big LAN?

text: I'm a college kid on a WPA2 Enterprise with a Raspberry Pi on ethernet. How do I find this device on the network? I could try running               arp -a      logging results to a file, connecting my Pi, and then diffing by rerunning               arp -a      but is there a better way to do this?


title: How to burn a Linux distro ISO image from Linux Live?

text: Mint screwed my grub (no more dual boot with Win7) because of a faulty LIVE USB flash stick. (I can launch Mint but I can't install) I need to burn a new ISO to my USB flash stick or USB drive so that I can properly install Linux and restore the grub. I tried to use Xfburn and USB Image Writer which are default in Mint X but both applications don't detect the USB stick or the USB drive.


title: xmms2 cover art

text: Does xmms2 have bindings either a Python API or a command line tool to find the album cover art of an MP3? _Related toxmms2 notification with album art under Awesome._


title: How do I know what service is running on a particular port in linux?

text: I am trying to run weblogic server on my linux machine and I am getting the following error :               ERROR: transport error 202: bind failed: Address already in use     ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)     JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]     FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)      I think that the error means that the debugger port which by default is 8453 is already held by some other service . How can I find out what service is runnning in a partcular port number ? P.S: I used `netstat` command but that shows all the services occupying all ports ..here I am interested in a particular port only.


title: Is it possible to know who visited my home directory?

text: Suppose there are many users in a Linux cluster, each of them has his own HOME directory under /home/xxx, with xxx being his user name (or account). If the initial system configuration allows these users to visit any of these home directories besides their own, is there any way for a user to know who visited his home folder? Such external access from the other users may not result in any change to the local files, for example, viewing or copying a file. Is there any log file or tool that can actually monitor these activities?


title: How to increase ftrace precision to microseconds?

text: I'm trying to generate FTrace files inside an Android environment, using:               root@adroid:# echo 1 > /sys/kernel/debug/tracing/events/sched/sched_switch/enable     root@adroid:# echo 1 > /sys/kernel/debug/tracing/tracing_on     root@adroid:# cat /sys/kernel/debug/tracing/trace > mytracefile.txt     root@adroid:# echo 0 > /sys/kernel/debug/tracing/tracing_on     root@adroid:# echo 0 > /sys/kernel/debug/tracing/events/sched/sched_switch/enable      The problem is that in `mytracefile.txt` the precision of time stamp is in milliseconds:                         <idle>-0     [000] d.h7 14186.690000: sched_wakeup: comm=tfm_b6bcf800 pid=1714 prio=35 success=1 target_cpu=000               <idle>-0     [000] d..3 14186.690000: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=tfm_b6bcf800 next_pid=1714 next_prio=35         tfm_b6bcf800-1714  [000] d..3 14186.690000: sched_switch: prev_comm=tfm_b6bcf800 prev_pid=1714 prev_prio=35 prev_state=D|W ==> next_comm=swapper/0 next_pid=0 next_prio=120               <idle>-0     [001] d.h3 14186.690000: sched_wakeup: comm=Player Aud Mixe pid=146 prio=35 success=1 target_cpu=001               <idle>-0     [001] d..3 14186.690000: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=Player Aud Mixe next_pid=146 next_prio=35      Player Aud Mixe-146   [001] d..3 14186.690000: sched_switch: prev_comm=Player Aud Mixe prev_pid=146 prev_prio=35 prev_state=D ==> next_comm=swapper/1 next_pid=0 next_prio=120               <idle>-0     [001] d.h3 14186.690000: sched_wakeup: comm=Player Aud Mixe pid=146 prio=35 success=1 target_cpu=001               <idle>-0     [001] d..3 14186.690000: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=Player Aud Mixe next_pid=146 next_prio=35      Player Aud Mixe-146   [001] d..3 14186.690000: sched_switch: prev_comm=Player Aud Mixe prev_pid=146 prev_prio=35 prev_state=S ==> next_comm=swapper/1 next_pid=0 next_prio=120               <idle>-0     [001] d.h3 14186.700000: sched_wakeup: comm=Player Aud Mixe pid=146 prio=35 success=1 target_cpu=001               <idle>-0     [001] d..3 14186.700000: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=Player Aud Mixe next_pid=146 next_prio=35      Normally, it should be in the order of microseconds, like 14186.691234 instead of just 14186.690000. I have already tested all the other `trace_clock` options that I have (local, global and counter) but the results are always the same. Changing that parameter doesn't change anything in the output file. I followed carefully FTrace documentation but I don't know what else to change in configuration. Searching over the internet I had only been able to find this bug report but it was not solved: http://lists.linaro.org/pipermail/linaro- dev/2011-February/002720.html Any advice? Are there additional modules in the kernel that I have to install?   * Android Version: 4.2.2   * Kernel Linux Version: 3.4.7 `dmesg` output is also showing milliseconds precision:               <4>[   38.130000] oom_adj 0 => oom_score_adj 0     <4>[   38.130000] oom_adj 1 => oom_score_adj 58     <4>[   38.140000] oom_adj 2 => oom_score_adj 117     <4>[   38.140000] oom_adj 4 => oom_score_adj 235     <4>[   38.150000] oom_adj 9 => oom_score_adj 529     <4>[   38.150000] oom_adj 15 => oom_score_adj 1000      ## Update: We are building a graphic parser for android ftrace files (including **atrace** traces). That's why it is very important to have as much precision as possible. Using the same device and other software tools we can successfully have microseconds precision. So, now we're planning to edit **ftrace.c** source code to modify the way timestamp is generated to this one:               static inline uint64_t my_custom_jiffies(void)     {              struct timeval tv;              gettimeofday(&tv, NULL);              return tv.tv_sec*1000000 + tv.tv_usec;     }      I personally think that is not a very good solution/architecture/implementation because this should be possible without modifying the source code... but it's the only idea that we have at this moment. What do you think ?


title: Object-oriented shell for *nix

text: Preface: I love bash and have no intention of starting any sort of argument or holy-war, and hopefully this is not an extremely naive question. This question is somewhat related to this post on superuser, but I don't think the OP really knew what he was asking for. I use bash on FreeBSD, linux, OS X, and cygwin on Windows. I've also had extensive experience recently with PowerShell on Windows. Is there a shell for *nix, already available or in the works, that is compatible with bash but adds a layer of object-oriented scripting into the mix? The only thing I know of that comes close is the python console, but as far as I can tell it doesn't provide access to the standard shell environment. For example, I can't just `cd ~` and `ls`, then `chmod +x file` inside the python console. I would have to use python to perform those tasks rather than the standard unix binaries, or call the binaries using python code. Does such a shell exist?


title: Git pull error libcurl.so.3 not found

text: I have a php script to `git pull` from my github repository set up in my webservice hook urls like so:               <?php       echo shell_exec('~/git/usr/bin/git pull 2>&1');     ?>       When I open this script on the browser, I get this error:               git-remote-https: error while loading shared libraries: libcurl.so.3: cannot open shared object file: No such file or directory      I am on a godaddy server running CentOS release 5.9 and `uname -mrs` yields:               Linux 2.6.18-348.3.1.el5PAE i686      When I tried doing :               yum install curl      I get an error that the command `yum` cannot be found. I seriously have no idea what's going on here because when I ssh into my server and do `git pull` from the terminal or run the script like `php myscript.php`, it works fine and all the changes are fetched. How are the dependencies changed when I run it in the browser? Any help is deeply appreciated.


title: Is there a way to view a list of timestamp history of a document/file via terminal/command line?

text: This seems like it's simple but for some reason, it's not: Problem: I've been writing a paper- not even a script...just an economics paper- over the last 3 months. I'm trying to determine how much time I've spent writing it, how many times I've saved the file and how much the document grew each change. Is there a command/script to view this info? I'm not looking for exact changes, I'm just looking for the general file information. The only thing I can find is the most recent time the file was modified, but I can't find the information for the modifications before the most recent. Example of expected output:                 $ (elusive and mysterious command that is similar to stat -x) <file>           File: "file"       Current Size: 1000        FileType: Regular File       Mode: (0600/-rw-------)         Uid: (  501/user)  Gid: (   20/   group)     Device: 14,2   Inode: number    Links: 1     Access: Wed Mar 14 19:50:00 2012     Modified: Fri Dec 23 01:22:40 2011     --Size: 1000     Modified: Wed Dec 21 11:42:21 2011     --Size: 920     Modified: Wed Dec 21 11:01:12 2011     --Size: 703     Modified: Wed Dec 21 10:11:01 2011     --Size: 100     Modified: Tue Dec 20 11:42:38 2011     --Size: 0     Change: Mon Feb 13 20:44:36 2012


title: `kill -s TERM` works, `kill -s ABRT` gets "Operation not permitted"

text: There is a process that I own whose documentation claims I can send `SIGABRT` to in order to get some debugging information. However, when I try to send `SIGABRT`, I get back "Operation not permitted". I have also tried sending the same signals to other processes I own to make sure that there isn't some underlying block preventing me from sending `SIGABRT` altogether, but they respond in the appropriate manner. It's just this one program, but it's every instance of that program. A system call trace of the process shows that it never receives the signal. I have tried running `/bin/kill` explicitly in order to rule out any weirdness in my shell's builtin `kill`, and, other than some minor output differences, there was no change in behavior. root can send `SIGABRT` to the process and it works as I expect it to. I've been in this game for a while, but I've never seen an instance where a user is not able to send a signal to a process that he owns, nor have I seen an instance where a user can send one signal but not another. The OS is FreeBSD 9.0 and the process is a ruby process that is part of a Phusion Passenger Ruby-on-Rails application running under Apache. I'm currently at a total loss. Does anyone have any idea what is going on? _Update:_ Turns out that the `security.bsd.conservative_signals` sysctl was set to 1, and that prevents many signals from being delivered to setuid processes, according to the man page. Setting it to 0 solves the problem. While there was a setuid call somewhere up the process chain — the process is a child of an Apache httpd, and Apache changes its uid to relinquish root permissions — the process itself is not setuid, and its EUID, RUID, and SVUID are all the same as the user sending the signal. The only inspection of the process that I can find that would indicate that any setuid happened is the `P_SUGID` flag in `ps`'s "flags" field. ("Had set id privileges since last exec") It seems like that shouldn't be the case, but it's handled in an Apache module and I don't know its exact methods. For the record, it's a ruby process that's functioning as part of a Ruby on Rails application being handled by mod_passenger, AKA mod_rails.


title: "ps" output and comments

text: I'm pretty sure you cant do this but maybe someone has some weird hack... Is there a way to get comments (#blahblah) to show up in ps output? My problem is that i have a script, lets call it "myscript.sh" that is not very descriptive. I'd love to be able to do something like:                ./myscript.sh #Running on 10.10.45.10      and have ps output the comment line, instead of just saying "myscript.sh" The only way i can think of hacking around it would be to place the comment in a variable, grep out "myscript.sh" PID and then read that var from /proc/PID/environ. But thats very ugly, and requires root


title: Mail command to send attachements

text: I tried the below command               uuencode data.txt | mailx –s “Test Mail” “mrp@xyz.com”      But I get the below error               ksh: uuencode: not found.     Null Message body;  hope that' ok      which clearly tell that uuencode utility is not found. I there any other way to send attachments with mail through command line. At the same time I don't have admin access for the same to install the utility ( **I use AIX 5. version Server** )


title: logrotate error "error: error opening /home/web/logs/dev.log.10: No such file or directory"

text: In a run, sometimes I get such type of errors for any of the log file. Below is my configuration:               /home/web/logs/*.log.* {                 missingok          copytruncate     olddir rotate     rotate 5000     compress     maxage 1     delaycompress     notifempty         }      1) I want to know when does this happens?   2) Is there any impact on my log rotation?   3) How can I avoid it?


title: File system compatible with all OSes?

text: I use Linux and Mac OS X on a regular basis, and sometimes I have to use Windows. I need to use a flash drive on all three, and I need a filesystem that will work well on all of them. None of the ext's work on Mac or Windows, HFS+ doesn't work on Windows (or well on Linux), NTFS is read-only on Mac, and FAT sucks on all OSes. Is there a file system that would work reasonably well on all operating systems? I'd like it to work without drivers or additional installations, so it can be used on any computer.


title: Find and install Mint's default packages into new Ubuntu install

text: So I use Mint a lot, but wish to switch to Ubuntu due to trivial updating Ubuntu offers. Problem with Ubuntu is that a lot of neat packages (Such as right click commands for open in terminal etc) don't come pre-installed. I wish to get a list of packages to install on Ubuntu that are pre-installed on Mint, even just the GUI based ones would be great! Note: I am **not** trying to get Ubuntu looking like mint, just the GUI packages that make life easy. I am also **not** asking opinions on what are the best GUI packages out there, just what Mint has Ubuntu doesn't.


title: Apache suexec won't work with strace

text: I have an Apache instance with `mod_suexec` enabled. I'm trying to debug a problem and am starting Apache with `strace` to try and see what's happening. However, when I start Apache like this:               # strace -f -o /tmp/apache.strace /etc/init.d/apache2 start      I get this in the error log:               suexec failure: could not open log file     fopen: Permission denied      However, when I start Apache normally, everything works correctly. I presume that some mechanism in use by `mod_suexec` is being upset by the use of `strace`, but I'm unclear as to what exactly is happening. Is there any way of using `strace` and having `mod_suexec` work correctly?


title: Can a script be executable but not readable?

text: Is it possible to execute a script if there is no permission to read it? In root mode, I made a script and I want the other user to execute this script but not read it. I did `chmod` to forbid read and write but allow execute, however in user mode, I saw the message that says: permission denied.


title: Getting Linux computer integrated with Windows domain

text: I've tried to figure it out for several months, with no success. I have a Windows 2008R2 domain, and one Linux server (first it was Fedora 15, then 16, and now it's Centos 6.2). I am trying to make it member of the domain to the extent possible. Ideally, I would like to login and get authenticated against domain (say, login 'DOMAIN+john'). If not - at least be able to map directories through Samba with Windows credentials (better, map drives without specifying credentials, and just passing Windows credentials). I followed several articles, most closely this one; but still can't map the drive (as soon as I switch security from USER to ADS, I can't expand the server)... let alone login. I know I am close (eg., I am getting `pam_get_item returned a password` from winbind when I log in) - but pointers to something definitive would be great!


title: Bash capture any error like -e but don't exit, do something else

text: I want to set a flag in a shell script (bash) so that if anything returns non- zero, a flag is set (i.e. set a variable like `errors="True"`). So far, I've thought of calling the script with `scriptname.sh 2>Error.log` and then doing something like:                if $(wc -l error.log) != 0; then        errors="True"      There has got to be a much better way. Please enlighten me.


title: Compare the values of a column with all the values in another column

text: I have 2 input files. Each line of `File1` should be compared to each and every line of `File2`. Logic is:   1. If `Column1` of `File1` does not match `Column1` (all the values under it) of `File2`, then print the whole line of `File1` in the output file. Similarly, compare each value of `Column1` to each and every value under `Column1` of `File2`.   2. If `Column1` of the two files matches and if the value of `Column2` of `File1` is greater than `N+10` or less than `N-10`, where `N` is the value of `Column2` of `File2`, only then print the whole line of `File1` and compare all the lines in `File2` like this. **`File1`:**               Contig1  23     Contig1  42     Contig2  68     Contig3  89     Contig3  102     Contig7  79      **`File2`:**               Contig1  40     Contig1  49     Contig3  90     Contig2  90     Contig20 200     Contig1  24      **Expected Output:**               Contig2  68     Contig3  102     Contig7  79      Any solution, even those without `awk` or `sed`, will do it. I found a similar problem, but I'm not exactly sure what I have to do: Here is the Code:                 `NR==FNR {         lines[NR,"col1"] = $1        lines[NR,"col2"] = $2        lines[NR,"line"] = $0        next         }        (lines[FNR,"col1"] != $1) {         print lines[FNR,"line"]         next         }        (lines[FNR,"col2"]+10 < $2 || lines[FNR,"col2"]-10 > $2) {         print lines[FNR,"line"]         }' file1 file2`


title: Looking for resources: like C doc for reading files and their attributes? (On Linux)

text: Looking for resources: like C doc (something like JavaDoc for C on Linux would be cool) for reading files and their attributes? I'm working on recursively reading in files. I can get a list of files in a directory, with some simple code that uses `readdir( DIR* )`, but I'm looking for some code that I can, in general, browse through. I'm kind of new to Linux -- so maybe man pages are the way to go here, but since man pages typically aren't linked together (like hyperlinks), I'm looking for resources that describe relationships between C structs and function for file IO. I'm wondering if I need to go as far as understanding `inode` stuff?


title: How to re-adjust content while resizing gnome-terminal?

text: Some times when I am compiling a script the parameters are so long that they cover many lines in the terminal. When I resize the terminal in order to read more clearly, the content does not automatically re-adjust to the size of the terminal. Is there a way of telling the terminal to re-format its output depending on the window size of the terminal emulator? I am using gnome-terminal


title: Meaning of @0 in a shell script

text: I was looking at the script `/etc/init.d/sudo` in my Ubuntu 14.04 Linux system. While reading the script, I found this statement :               find /var/lib/sudo -exec touch -d @0 '{}' \;      What is the meaning of `@0` here? What does the above statement do?


title: iSCSI and runaway log file

text: I have a OpenVZ VPS running CentOS 5.7 that I've been using to get some sysadmin experience. I found a log file called brcm-iscsi.log in /var/log and it's getting big (140 MB).               INFO  [Sun Dec 18 20:15:42 2011]Initialize logger using log file: /var/log/brcm-iscsi.log     INFO  [Sun Dec 18 20:15:42 2011]Started BRCM iSCSI stack: Ver 0.6.2.13     INFO  [Sun Dec 18 20:15:42 2011]Build date: Fri Jul 22 01:19:02 EDT 2011     INFO  [Sun Dec 18 20:15:42 2011]Running on sysname: 'Linux', release: '2.6.18-274.7.1.el5.028stab095.1', version '#1 SMP Mon Oct 24 20:49:24 MSD 2011' machine: 'i686'     INFO  [Sun Dec 18 20:15:42 2011]Initialize logger using log file: /var/log/brcm-iscsi.log     INFO  [Sun Dec 18 20:15:42 2011]Started BRCM iSCSI stack: Ver 0.6.2.13     INFO  [Sun Dec 18 20:15:42 2011]Build date: Fri Jul 22 01:19:02 EDT 2011     INFO  [Sun Dec 18 20:15:42 2011]Running on sysname: 'Linux', release: '2.6.18-274.7.1.el5.028stab095.1', version '#1 SMP Mon Oct 24 20:49:24 MSD 2011' machine: 'i686'     WARN  [Sun Dec 18 20:15:42 2011]nic_utils Error when scanning path: /sys/class/iscsi_host/[No such file or directory]     INFO  [Sun Dec 18 20:15:42 2011]signal handling thread ready     ERR   [Sun Dec 18 20:15:42 2011]NIC_NL waiting binding to NETLINK_ISCSI socket     ERR   [Sun Dec 18 20:15:43 2011]NIC_NL waiting binding to NETLINK_ISCSI socket     ERR   [Sun Dec 18 20:15:44 2011]NIC_NL waiting binding to NETLINK_ISCSI socket      And every second since then I've had that line. I don't quite understand what is going on, so I'm hoping someone could tell me how to fix the underlying problem rather than just deleting the log file. I did Google this and found http://drup.org/brcm-iscsilog-filling-hard-drive which seems to just disable iSCSI and ignore any more errors. Is there a better/safer/preferable way of stopping this error logging? I don't know much about iSCSI - I get that it's a SAN protocol, but that's about it. I've certainly never setup any volumes outside of the disk space I got with my VPS. Could my VPS be relying on this in some way? I wouldn't want to trash it, although I'm getting quite practiced at reloading the VPS... I also wouldn't want to screw up anyone else's nodes. Thanks in advance for helping the n00b.


title: Servers running from chrooted Ubuntu on HP TouchPad?

text: The problem: servers appear to be broken inside my Ubuntu chroot. No matter what kind of server I try to run, they all seem unresponsive (VLC server won't respond to client, mkRemote doesn't move the cursor, Apache gives an error about binding to port 80 and won't start, etc.). If I'm not mistaken, what should normally happen inside a chroot is that all ports are shared between the chroot and the host, so if another machine tries to hit the host at port 80, it will still see the chrooted Web server. However, here, that isn't what's happening. When I run netstat from the chroot, every single process lists a foreign address of 0.0.0.0:*, meaning that the only machine which can act as a client is the local host. This is clearly incorrect and abnormal behaviour, as any process on my primary machine meant to be publicly visible lists a foreign address of :::* (which I assume means that any client can see it from any port).   _Edit: Disregard that; apparently the foreign address only distinguishes between whether it's listening for IPv4 or IPv6 connections, so it doesn't seem relevant here._ So far, Googling has returned nothing of value, and I'm basically stumped. Any ideas? Could it just be some setting which one of the chroot patch devs enabled by default, or does it seem like a more complicated issue? Thanks. More context: http://rootzwiki.com/topic/14682-webos-servers-inside-chrooted- ubuntu/


title: Would it be wise to put a Linux OS on a Mac?

text: Has anyone tried this either using bootcamp, a VM, or replacing the OS X? Google search yields old info.


title: How to update the version of gcc-c++ on Fedora?

text: I have version 4.4.4 of `gcc` installed and would like to update to either a specific version or to the latest version. Here is what I have tried:               sudo yum install gcc-c++      this tells me that `Package gcc-c++-4.4.4-10.fc12.i686 already installed and latest version` (not true, there is at least a version 4.8 available). Next I tried a specific version:               sudo yum install gcc-c++-4.8.1      with the result of `No Package gcc-c++-4.8.1 available.`. At last I tried to update the package with               sudo yum update gcc-c++      with the result `No Packages marked for Update`. So how the heck do I update the version of `gcc` and/or `gcc-c++` to be able to compile projects with C++11?


title: Using sed command convert only first character in specific line with uppercase

text: How can I convert the first character of each word in the line after `gr- description:` to uppercase? For example :               $ cat /tmp/test1     groMail:     test@xyz.com     gr-description:     abc-location-999     group-emailid:     abclocation999@xyz.com     members:     abc@xyz.com     abcd@xyz.com     abc.abc@xyz.com      Output should be               groMail:     test@xyz.com     gr-description:     Abc-Location-999     group-emailid:     abclocation999@xyz.com     members:     abc@xyz.com     abcd@xyz.com     abc.abc@xyz.com      I tried the command below command but I am unable to merge               sed -n '/gr-description:/{n;p;}' grp1 | sed 's/\<./\u&/g'


title: How to disable SELinux without restart?

text: I need to disable SELinux but cannot restart the machine i followed this link where i get bellow command               setenforce 0      But agter running this command i checked for that               sestatus     SELinux status:                 enabled     SELinuxfs mount:                /selinux     Current mode:                   permissive     Mode from config file:          disabled     Policy version:                 24     Policy from config file:        targeted      Is there any other option?


title: Should I update OpenSSL?

text: Since the problems with version 0.9.8 of OpenSSL, I have some queries. I am told that I do not have a vulnerable version, but I want to know what your recommendations are. Should I update to a more recent version? Should I apply a patch? And why? Would an update to OpenSSL affect Apache and PHP? My current version of OpenSSL is 0.9.8e-fips-rhel5.


title: `mv` has failed because of insufficient disk space, what now?

text: I have tried to move a folder `A` from partition a to partition b as folder `B` with `mv`. Now the target file system was not big enough for all the data (I know I should have checked this first). Anyway, I continued by using `rsync -av` (what I should have done in the first place), as in What does mv do in case of errors? Then I used `diff -r A B` to check for changes between the folders and diff indeed observed differences in the target directory. Now I wonder whether I should just delete the target folder and start the rsync process at once or whether there is a way to get `rsync` copy everything.


title: How can I use these partitions to install fedora 20

text: I want to install Fedora 20 from a full DVD (not live) on a new computer, with as much software as I can; so, during the set up for the installation, I tick all the repositories offered and then find that I need more space than is available. The machine was partitioned by the vendor, and Windows XP3 installed, so I will use a dual boot. I think the partitions he left me with are biased by his disdain for, or ignorance of, Linux. I include a picture of the partitions from Windows on this machine; the C: partition is only 5% full, so it should cover the little I will use it for. So my question is: please, how do I make the rest available for Linux? I don't fully understand the jargon around partitions, in Linux or Windows, so I am extremely nervous about getting it wrong and losing Windows entirely. Needless to say I have aborted all my attempts at installing F20 so far. It may be that I could use the repositories on the DVD after installation, but would I not then come up against the same space problem? (Following on from @Anthon's comment) If, in Windows, I delete partitions E: and F: ( I have no data on them), will that affect my use of the Linux and Windows in the remaining partitions, until I install a new Fedora in place of the existing one, and then will the deleted partitions be automatically be included into Linux? How will I recognise them, if necessary, in the list during installation? Please forgive my fussy ignorance, I always get to a point in an attempt at installation, where there is something that I do not understand, even with the help of the installation instructions viewed on my laptop, and have to abort and start again, so I want to be fully prepared for these dangerous actions. ![Windows partions](http://i.stack.imgur.com/pIa2q.jpg)


title: SNAT / Masquerade with shorewall

text: I've got a little question about Masquerading and SNAT in combination with shorwall and KVM. The Operating System is Scientific Linux 6.4. Setup is like this at my root server:   * Virtual Machine IP 10.16.16.30   * Standard Gateway of VM: 10.16.16.254 (Firewall int_net)   * "wan" interface ip of the firewall: 192.168.122.254 (virbr0_net)   * Default Route for the Gateway for Internet: 192.168.122.1 (virbr0)   * eth0 has three public ip-adresses at eth0:1 eth0:2 eth0:3 and is directly connected to the internet.  The outgoing traffic of the VM 10.16.16.30 will be NATed so the packets will come in at virbr0 with the source-ip 192.168.122.254 and will be NATed to the internet with the src-ip of eth0. I would like to have the opportunity to let outgoiging packets of 192.168.122.254 ( firewall-wan-if_ip) to get the external IP of eth0:1 for example. How could I do that best way? Any advice?


title: Slight change to command to compile C++ program causes error

text: This morning , I was trying to compile a C++ program using the following command on the command line               g++ -o foo.cpp foo      I spend about an hour trying t to resolve why I kept getting undefined reference & multiple definition error till I realised that my command to compile was wrong and **it should be**               g++ foo.cpp -o foo      I am just wondering what is the difference in process between `g++ -o foo.cpp foo` and `g++ foo.cpp -o foo` . Why does placing the `-o` infront cause compilation error