Replace my recurring task scheduler with some existing product

I have a couple tasks that I like to run periodically:   * Push all git repositories (5 times a day)   * Do a virus scan on files (every 90 days)   * Download backup from server (one a day) For all those tasks, I have a script. To orchestrate those, I wrote a script called `maintenance` which is part of my maintenance project. The current version of the script. It has a JSON config file for the tasks:               "git-autopush": {         "disk": true,         "internet": true,         "interval": 0.3,         "local": false     },      I would like to replace my script with some existing task scheduler, since I would like to cut down on custom software on my system. However, I have the following requirements:   * Do not run when running on battery.   * Provide some visible status. That could be through `kdialog` even.   * Run only one disk heavy task at a time. The `maintenance` script takes care of that, and I can run it whenever I have sufficient time to let the tasks run. If not, I can just abort all the tasks and restart it later. Plain cron would not be good, since it would not work when my computer is powered off. anacron might be better, but I assume that it would run all the tasks right after booting. Also, if I happen to need my disk for virtual machine, how would I tell the scheduler to stop? Is there some existing program out there, or should I just continue to use my on?


How to connect to wifi on a Gnome 2.24.1 system?

A friend gave me an old laptop running Gnome 2.24.1. It's been in storage for years but seems to run fine, albeit with this old OS. Now, I don't know too much about Linux, but I'd like to set it up for my Mum to use at home. The first problem I've run into is that I don't see how to get it to connect to the wireless internet. There are some networking applications, but they're asking about SSID and Ethernet and all that stuff. Is there any way to get it to auto-detect our wifi at home? I guess once it's connected it's going to want to get updates after all these years, right?


How to load .bashrc from "bash -c"

Trying to run a function defined in my .bashrc using "bash -c ". I end up with the error "command not found". How do I get "bash -c" to load my init file?


x120e wifi broadcom BCM43224 "unmanaged"

I have a Thinkpad x120e with a BCM43224, Debian (Gnome) reports it as "unmanaged", and won't let me set it up. It worked once, during the install, after an `apt-get install broadcom-sta- dkms`. Never worked again since an update and reboot. Any thoughts about where I could go next to troubleshoot this one? Google is full of a history of outdated answers for old firmwares from when the Thinkpad was new. I'm having trouble figuring out how to get detailed messages out of the system for this one. What does the "unmanaged" message mean in the drop down bar in Gnome? Why would the firmware load with a `modprobe` seemingly successfully and simply fail to bring up the adapter in `ifconfig`?


What commands does git use when communicating via ssh?

Using `command=""` in `authorized_keys`, I can restrict the commands that can be run by a particular key. What commands do I need to allow in order to have a functioning git remote? From the Pro Git book I can infer that `git-upload-pack` and `git-receive- pack` are required, but is there anything else? Note I still want to be able to log into the user normally, just not with this key.


set ip default outgoing in centos

I have server which has `Centos` and I want to change the outgoing IP address. This is the output of my `route` and `route list` commands.               [root@marketport tmp]# route -n     Kernel IP routing table     Destination Gateway Genmask Flags Metric Ref Use Iface     184.105.17.96 0.0.0.0 255.255.255.224 U 0 0 0 venet0     162.245.223.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0     169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 venet0     0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 venet0          [root@marketport tmp]# ip route list     184.105.17.96/27 dev venet0 proto kernel scope link src 184.105.17.106     162.245.223.0/24 dev venet0 proto kernel scope link src 162.245.223.65     169.254.0.0/16 dev venet0 scope link metric 1002     default dev venet0 scope link      I tried the below commands.               [root@marketport tmp]# ip route add default via 162.245.223.0 dev venet0 src 162.245.223.67     RTNETLINK answers: Invalid argument          [root@marketport tmp]# ip route add default via 162.245.223.67     RTNETLINK answers: File exists      But I got the error as `Invalid argument` and `File exists` as seen above. What am I doing wrong?


Backup and restore only some partitions

I have a system which runs an arcade machine. It has the regular swap and root partitions, but then I have an extra partition which I call data. Data holds many gigabytes of game content. The idea is that if anything goes wrong with the Linux system, I should be able to restore it from a backup and leave `/data` intact. My question is, what utility is best to backup and restore just the Linux system partitions? Can I just use `dd` to make an image of `/dev/sda1` and `/dev/sda2`, for example? What about the MBR - Master Boot Record?


Device mapper target to "change" sector size?

I'm wondering if there exists a device mapper target that I can use to make a device appear to have a different sector size. For example, let's say I set the "virtual" sector size to 448; then, every time I try to write 512 bytes, the mapper would redirect 448 of these bytes to one sector, and 24 bytes to the following sector. I'm aware this would cause performance issues due to misalignments, and for I know break some software. In fact, that's why I'd like to have it, to see what it's performance impact would be.


I can't find executable file for sendmail?

I did a source install of Sendmail 8.14.4, and BerkeleyDB.4.1 in ubuntu14.04lts Amazon EC2. The installation was successfully compiled, as far as I know. With the installation of the source, I made a copy to `/usr/sbin/sendmail` the new version of `sendmail` using the command `cp`. But I can't find the `sendmail` file (below refer). There is no executable file..               root@ip-192-168-10-152:/usr/local/sendmail/sendmail-8.14.4/obj.Linux.3.13.0-24-generic.x86_64/sendmail# ll sendmail*          lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.0.dist -> ../../sendmail/sendmail.0         lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.8 -> ../../sendmail/sendmail.8         lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.h -> ../../sendmail/sendmail.h      Is it not compiled properly? Why is it?               ==========The environment set at compile ==============          root@ip-192-168-10-152:/usr/local/sendmail/sendmail-8.14.4/devtools/Site# cat site.config.m4          APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB.4.1/include')         APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.1/lib')         APPENDDEF(`confLIBS', `-ldb -lpthread')          ==========================================================      ### EDIT #1 I'm assume all binary files compiled successfully, except for the sendmail binary.               root@ip-192-168-10-172:/usr/local/sendmail/sendmail-8.14.9/sendmail# ./makesendmail          Configuration: pfx=, os=Linux, rel=3.2.0-58-virtual, rbase=3, rroot=3.2, arch=x86_64, sfx=, variant=optimized     Making in /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/sendmail     cc -o sendmail  -L/usr/local/BerkeleyDB.4.1/lib main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o      /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/libsmutil/libsmutil.a /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/libsm/libsm.a  -ldb -ldl -ldb -lpthread          domain.o: In function `getmxrr':         domain.c:(.text+0x1f0): undefined reference to `__res_search'         domain.c:(.text+0x200): undefined reference to `__res_query'         domain.c:(.text+0x2a5): undefined reference to `__dn_skipname'         domain.c:(.text+0x4f4): undefined reference to `__dn_expand'         domain.c:(.text+0x5be): undefined reference to `__dn_expand'         domain.o: In function `dns_getcanonname':         domain.c:(.text+0x1017): undefined reference to `__res_querydomain'         domain.c:(.text+0x10ab): undefined reference to `__dn_skipname'         domain.c:(.text+0x1213): undefined reference to `__dn_expand'         domain.c:(.text+0x12a1): undefined reference to `__dn_expand'         sm_resolve.o: In function `dns_lookup_int':         sm_resolve.c:(.text+0x21d): undefined reference to `__res_search'         sm_resolve.c:(.text+0x313): undefined reference to `__dn_expand'         sm_resolve.c:(.text+0x42e): undefined reference to `__dn_expand'         sm_resolve.c:(.text+0x598): undefined reference to `__dn_expand'         sm_resolve.c:(.text+0x6d8): undefined reference to `__dn_expand'         sm_resolve.c:(.text+0x799): undefined reference to `__dn_expand'         sm_resolve.c:(.text+0x99f): undefined reference to `__res_search'         collect2: ld returned 1 exit status         make: *** [sendmail] Error 1


When I create a new partition for /home, the partition editor moves it to /dev/hda2 instead of /dev/hda3

I have a CentOS system I'm tying to duplicate. I can't use `dd` or `cat` over SSH from the source server so I have to initiate the command from the target server. My first choice is to duplicate each partition individually using dd then restore those partitions to a test box once it's already formatted and set up with CentOS. When I created the new partitions on the target server using the partition tool that comes with CentOS's installer, the partition for /home gets moved to /dev/hda2 by default. The original server has it on /dev/sda3. I tried deleting the partition and recreating it so it will match the original server, but no dice. Each time it gets created on the target server the part editor keeps "promoting" it to /dev/hda2. Both servers are using SATA disks but the original server labels its disc /dev/sda and the target server is /dev/hda. I'm not really concerned about this being a problem, I'm just curious as to why it's doing this since I am explicitly telling the partition tool how to create the partitions. Does anyone have an explanation for why this is happening? Again, I'm just curious. For reference, here are the partition tables: Original server:   * /dev/sda2 / 97 GB   * /dev/sda1 /boot 100 MB   * /dev/sda3 /home 352 GB Target server:   * /dev/hda1 /boot 100 MB   * /dev/hda2 /home 352 GB   * /dev/hda3 / 97 GB Swap is 2 GB on each device.


Find last edited date of file (strange exec behaviour)

I am trying to get the last modified dates of all the word documents in all the directories below this one               $ pwd     /run/user/1000/gvfs/smb-share:server=myServer,share=myResources      If I do a regular find it returns exactly what I'd expect.               $ find . -name "*.do*"     > ./AnsettGoldenWing/Project Sheets/Ansett Golden Wing Text.doc     > ./B000114/Text/060913__B000114.doc     > ./B000170/B000170_projectdetails.doc     > ./B000208/Text Files/archive/060913__B000208.doc      But if I add the `-exec` that formats the results it all goes to pot.               $ find . -name "*.do*" -exec sh -c "stat --printf='%n --- %y \n' {}" \; > fileInfo.txt     > stat: cannot stat ‘./AnsettGoldenWing/Project’: No such file or directory     > stat: cannot stat ‘Sheets/Ansett’: No such file or directory     > stat: cannot stat ‘Golden’: No such file or directory     > stat: cannot stat ‘Wing’: No such file or directory     > stat: cannot stat ‘Text.doc’: No such file or directory     > stat: cannot stat ‘./B000208/Text’: No such file or directory     > sh: 1: Spa: not found     > stat: cannot stat ‘./B000503/Submission/Hyatt’: No such file or directory      How do I make it output:               > ./AnsettGoldenWing/Project Sheets/Ansett Golden Wing Text.doc --- date     > ./B000114/Text/060913__B000114.doc --- date     > ./B000170/B000170_projectdetails.doc --- date     > ./B000208/Text Files/archive/060913__B000208.doc --- date      I'm fairly new to the command line and this is the first time I've used an `-exec` with a `find` so it still feels like black magic to me.


Does Steam have special treatment of screen lock?

When I play a game through Steam, the computer is obviously active and I don't expect the screen to be locked. However, when I'm closing the game I see a locked screen. If the screen is locked, it should mean that in-game events are not registered by Linux as "activity" and so screen gets locked... Does the game somehow override this because if so, the screen should have been locked 15 minutes after the game? Or is it locked right after I quit it? I'm using Linux Mint with Cinnamon 2.0 if that matters.


printf output running over into next line

I have created Bash SS in `vi`. My output is running over into the line below it. I am new to UNIX so I'm trying to learn. My output is displayed using `printf`.               printf "%-15s %15s %15s %2d\n %2s " $name $days $phone $start $time      The output looks like this for example               name       days       phone      start           time name    days       phone      start          time name    days       phone      start           etc...      How do I get all five of my variables to print on same line?


Problems setting up web server in CentOS

I want to set up a web server on one of my computers (Dell Desktop) and decided on CentOS as the OS. Apache is installed properly (I think. pgrep httpd returns a bunch of processes that are running). I also think that my httpd.conf file is ok (I've read about 4 tutorials on apache setup). My ISP is comcast. I have httpd listening on both port 80 and 8080. But it's not working and I can't figure out why. I had a friend try to see my test.html page (which is in /var/www/html/ - where it's supposed to be.) and he got http error 504, which seems to relate to a proxy or firewall, neither of which I have. I have several questions: 1) is there a way to test my setup without having an outside friend try to see my web page? My own browser on the server sees the page fine when I use its local address (192.168.1.5) for the url, but the browser on another computer on my network (192.168.1.3) cannot see the page. 2) What, specifically, is needed to run a web server? Just a properly configured apache? Assuming I don't need php or any sql functionality. 3) is it possible that comcast is messing up the system somehow? 4) is it possible my own router is messing up the system somehow (can't see it if it is)? I don't seem to be able to attach my httpd.conf file. I don't want to cut and paste it here because it's too long (even with the comments deleted). Thanks for the help.


Prevent `finger` from giving out mail info

To quote from `finger`'s man page > Mail status is shown as `No Mail.'' if there is no mail at all, `Mail last > read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their mailbox > since new mail arriving, or `New mail received ...'',` Unread since ...'' if > they have new mail. I'd rather it didn't do that. In fact I'd like finger to only display `no mail` when asked. **Is there a way to ensure this behaviour?** I have no admin rights to the machine or the network (and Google points me to nail-biting remedies for some reason). Emptying the mail folder is one solution but I'm looking for something more elegant, if possible.


Working with columns - awk and sed

I am trying to parse a text file that is generated by an expec script that pulls down some information from a switch. Here is a sample output:               192      0000.0000.0000        1/g23      Dynamic                   192      0000.0000.0000        ch1        Dynamic                   192      0000.0000.0000        ch1        Dynamic                   192      0000.0000.0000        ch1        Dynamic      The text file has a lot of other junk in it that I am not interested in. I only want the lines that contain the switch number and the port - "1/g23" in the example above. I did a grep on the file to extract the lines that contain the pattern '/g' and it works great. Now all I want are the two middle columns. I used awk to print the columns.               0000.0000.0000 1/g23      Now that that is done I want to get ride of the '.' sed worked okay for this               000000000000 1/g23      From here I want to convert only the first column to a MAC address format.               So this     000000000000 1/g23     Becomes this     00:00:00:00:00:00 1/g23      I was able to find a sed command that would accomplish this. But my problem is I only need it done on the first column. I am not quite sure how I can edit only the one column and not lose the association between the MAC and the port.               grep -e "/g" switch6output | awk '{print $2,$3}' | sed 's/\.//g' | sed 's/../&:/g;s/:$//'      I'm sure this is a really stupid way of doing it, but it was the best I could come up with. Is there a more reliable way I can accomplish what I need without losing the MAC and port association? Thank you.


NTP not syncing in a VM

I'm managing some VirtualBox developer environments. The time drifts out of sync when the box is suspended, so I want to use NTP to keep it in sync. NTP doesn't seem to be doing its job, though - the time does not get updated. It does work if I do this:               $ service ntp stop     $ ntpdate au.pool.ntp.org     $ service ntp stop      Here is my `/etc/ntp.conf`:               driftfile /var/lib/ntp/ntp.drift          # Set tinker panic - see http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427     # Makes time sync more aggressively in a VM.     tinker panic 0          # Local users may interrogate the ntp server more closely.     restrict 127.0.0.1     restrict ::1          # Specify one or more NTP servers.     server au.pool.ntp.org          # Specify one or more NTP servers.     server 0.pool.ntp.org      Here's the relevant lines from `/var/log/syslog`:               Jun 20 18:51:30 vg ntpd[7239]: ntpd 4.2.6p3@1.2290-o Tue Jun  5 20:12:08 UTC 2012 (1)     Jun 20 18:51:30 vg ntpd[7240]: proto: precision = 0.191 usec     Jun 20 18:51:30 vg ntpd[7240]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16     Jun 20 18:51:30 vg ntpd[7240]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen and drop on 1 v6wildcard :: UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 2 lo 127.0.0.1 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 3 eth0 10.0.2.15 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 4 eth1 192.168.33.10 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 5 eth2 192.168.0.156 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 6 eth0 fe80::a00:27ff:fea0:5444 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 7 eth2 fe80::a00:27ff:fe1c:18ae UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 8 eth1 fe80::a00:27ff:fe02:b8f6 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: Listen normally on 9 lo ::1 UDP 123     Jun 20 18:51:30 vg ntpd[7240]: peers refreshed     Jun 20 18:51:30 vg ntpd[7240]: Listening on routing socket on fd #26 for interface updates      In the above logs, the date is a full 14 hours behind. The three interfaces are a quirk of our dev environment. eth2 is the interface with an IP on the office NAT, providing internet access. I have NTP 4.2.6, running on Ubuntu 12.04 (Precise). Why is NTP not updating the time on this machine?


How can I delete all files with a particular extension in a particular folder?

If I set the current/working directory (navigating to it using `cd`) to some particular directory and then type: rm *.xvg What will this command do? Is it true that the above command will **only** delete files with the extension .xvg **only** in the working directory? I was nervous about trying this before asking, because I want to be absolutely sure that the above command will only delete .xvg files **_LOCATED IN THE WORKING DIRECTORY_**. Can you please help me?


AppArmor Profile: Deny internet access

I want to deny the internet permission for some applications. Therefore, I tried first to deny the internet permission for ping, but it doesn't work. Here is the profile of `/etc/apparmor.d/bin.ping`               /{usr/,}bin/ping {       #include <abstractions/base>         # block ipv4 acces         deny network inet,         # ipv6          deny network inet6,         # raw socket         deny network raw,     }      But the pinging still happens after restarting `apparmor` with               /etc/init.d/boot.apparmor restart      ping google.de     PING google.de (64.15.112.99) 56(84) bytes of data.     64 bytes from cache.google.com (64.15.112.99): icmp_seq=1 ttl=57 time=11.8 ms     64 bytes from cache.google.com (64.15.112.99): icmp_seq=2 ttl=57 time=15.3 ms      EDIT: I forgot to mentioned that I'm running OpenSuse 13.1


Arch equvilent of Debian `dpkg-divert`

I am trying to configure Skype on Arch Linux to use a sand boxed user no matter which user calls `skype`, but I don't particularly like the use of a BASH alias to launch Skype as suggested by the wiki since as far as I can tell if a user is not using BASH or invokes Skype from `skype.desktop`, the sand boxed user will not be used. I thought it might be better to divert `/usr/bin/skype` to call               sudo -u skype /usr/bin/skype.real      where `skype.real` is the actual Skype binary. I am pretty sure in Debian I could do this with               dpkg-divert --package skype --add --rename --divert /usr/sbin/skype.real /usr/sbin/skype      and then add my own file to `/usr/sbin/skype`. How do I do this with Arch?


wireless is disabled by hardware switch even when not

I have a spartan computer. It has a built-in wireless module that up until recently I've had no issues with. The current problem is this. Everytime I shutdown the computer and it boots back up, I am unable to "hardware enable" the wireless. In NetworkManager, I am getting a 'grayed out' message that says "wireless is disabled by hardware switch". The hardware switch is enabled (I can see the green led turn on and off when I press the wireless button). The output of `rfkill` states that it is not soft blocked but IS hard blocked. I've tried the following (rt73usb is the kernel driver for my integrated wireless module) as root:               rmmod -f rt73usb      rfkill unblock all     modprobe rt73usb      but it does nothing. The only way I've been able to 'correct' this issue is to boot into windows xp (this is a dual boot machine but F16 is the primary OS of use). Windows does something that reset something. When I reboot back into fedora, I am able to access my wireless as expected. Even pressing the wireless button ON and OFF works as expected. It's just when I shutdown and then power back up that my wireless seems to have issues. What can I do to correct this issue? Most of the available google solutions point to 'soft blocked: yes' solutions and the ones that do not point to the above solution but both do not work for me. Here are a few pieces of information that might be useful: uname -a               Linux spartan-laptop 3.4.2-1.fc16.i686 #1 SMP Thu Jun 14 21:13:38 UTC 2012 i686 i686 i386 GNU/Linux      lsmod               Module                  Size  Used by     fcoe                   22665  0      libfcoe                41981  1 fcoe     libfc                 101966  2 fcoe,libfcoe     scsi_transport_fc      51903  2 fcoe,libfc     lockd                  77892  0      scsi_tgt               18993  1 scsi_transport_fc     be2iscsi               62864  0      iscsi_boot_sysfs       15121  1 be2iscsi     8021q                  23401  0      garp                   13744  1 8021q     stp                    12719  1 garp     llc                    13770  2 garp,stp     bnx2i                  49425  0      cnic                   57699  1 bnx2i     uio                    14374  1 cnic     cxgb4i                 32063  0      cxgb4                  96243  1 cxgb4i     cxgb3i                 28014  0      libcxgbi               50450  2 cxgb4i,cxgb3i     cxgb3                 130827  1 cxgb3i     mdio                   13214  1 cxgb3     ib_iser                32861  0      rdma_cm                36864  1 ib_iser     ib_cm                  36679  1 rdma_cm     iw_cm                  13715  1 rdma_cm     ib_sa                  23625  2 rdma_cm,ib_cm     ib_mad                 41285  2 ib_cm,ib_sa     ib_core                61955  6 ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad     ib_addr                13473  1 rdma_cm     iscsi_tcp              18015  0      libiscsi_tcp           19427  4 cxgb4i,cxgb3i,libcxgbi,iscsi_tcp     libiscsi               44809  8 be2iscsi,bnx2i,cxgb4i,cxgb3i,libcxgbi,ib_iser,iscsi_tcp,libiscsi_tcp     scsi_transport_iscsi    46598  8 be2iscsi,bnx2i,libcxgbi,ib_iser,iscsi_tcp,libiscsi     ip6t_REJECT            12782  2      nf_conntrack_ipv6      13921  2      nf_defrag_ipv6         13678  1 nf_conntrack_ipv6     ip6table_filter        12711  1      ip6_tables             17737  1 ip6table_filter     nf_conntrack_ipv4      14280  2      nf_defrag_ipv4         12601  1 nf_conntrack_ipv4     xt_state               12514  4      nf_conntrack           71472  3 nf_conntrack_ipv6,nf_conntrack_ipv4,xt_state     arc4                   12473  2      snd_hda_codec_si3054    12864  1      snd_hda_codec_realtek    63058  1      snd_hda_intel          32323  3      rt73usb                26833  0      snd_hda_codec         103493  3 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel     rt2x00usb              19162  1 rt73usb     snd_hwdep              13236  1 snd_hda_codec     rt2x00lib              51790  2 rt73usb,rt2x00usb     mac80211              436414  2 rt2x00usb,rt2x00lib     snd_seq                54638  0      snd_seq_device         13817  1 snd_seq     cfg80211              161266  2 rt2x00lib,mac80211     snd_pcm                81330  3 snd_hda_codec_si3054,snd_hda_intel,snd_hda_codec     rfkill                 20417  2 cfg80211     coretemp               13240  0      microcode              18713  0      joydev                 17124  0      iTCO_wdt               17652  0      iTCO_vendor_support    13243  1 iTCO_wdt     serio_raw              13155  0      i2c_i801               17485  0      snd_timer              23896  2 snd_seq,snd_pcm     snd                    63169  15 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_device,snd_pcm,snd_timer     soundcore              14116  1 snd     snd_page_alloc         13709  2 snd_hda_intel,snd_pcm     r8169                  51284  0      mii                    13311  1 r8169     uinput                 17246  0      sunrpc                215122  2 lockd     binfmt_misc            17207  1      firewire_ohci          35498  0      firewire_core          55317  1 firewire_ohci     crc_itu_t              12523  2 rt73usb,firewire_core     sdhci_pci              18211  0      sdhci                  32642  1 sdhci_pci     yenta_socket           40293  0      mmc_core               96866  2 sdhci_pci,sdhci     i915                  413476  3      drm_kms_helper         30905  1 i915     drm                   205796  4 i915,drm_kms_helper     i2c_algo_bit           13058  1 i915     i2c_core               28151  5 i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit     video                  18500  1 i915      lspci               00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)     00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)     00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)     00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)     00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)     00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)     00:1c.2 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 3 (rev 02)     00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)     00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)     00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)     00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)     00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)     00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)     00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)     00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)     02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)     04:04.0 CardBus bridge: O2 Micro, Inc. OZ711MP1/MS1 MemoryCardBus Controller (rev 21)     04:04.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)     04:04.3 Bridge: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)     04:04.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)     [angelo@spartan-laptop ~]$ lspci     00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)     00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)     00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)     00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)     00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)     00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)     00:1c.2 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 3 (rev 02)     00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)     00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)     00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)     00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)     00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)     00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)     00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)     00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)     02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)     04:04.0 CardBus bridge: O2 Micro, Inc. OZ711MP1/MS1 MemoryCardBus Controller (rev 21)     04:04.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)     04:04.3 Bridge: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)     04:04.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)     [angelo@spartan-laptop ~]$ lspci     00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)     00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)     00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)     00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)     00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)     00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)     00:1c.2 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 3 (rev 02)     00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)     00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)     00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)     00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)     00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)     00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)     00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)     00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)     02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)     04:04.0 CardBus bridge: O2 Micro, Inc. OZ711MP1/MS1 MemoryCardBus Controller (rev 21)     04:04.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)     04:04.3 Bridge: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)     04:04.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)


Restoring an option at the end of a function in zsh

I'm writing a zsh shell function (as opposed to a script) where I would really like the `extended_glob` option to be enabled. But since the function runs in the caller's context, I don't want to clobber their settings. What I'd like to do is conditionally enabled `extended_glob` as long as I need it and then restore it to the user's option. Is there any way to check whether an option is enabled in zsh?


File comparing and appending based on fields

I want to compare 2 files, locus_file.txt is a very large file and atrr.txt is a small file. I want to match the first 2 columns of the first file to the second column of atrr.txt and print the attributes together. locus_file.txt:large file               LOC_Os02g47020, LOC_Os03g57840,0.88725114     LOC_Os02g47020, LOC_Os07g36080,0.94455624     LOC_Os02g47020, LOC_Os03g02590,0.81881344      attr.txt: attribute file               blue LOC_Os02g47020     red  LOC_Os02g40830     blue LOC_Os07g36080     yellow LOC_Os03g57840     red LOC_Os03g02590      Desired output:               LOC_Os02g47020, LOC_Os03g57840,0.88725114,blue, yellow     LOC_Os02g47020, LOC_Os07g36080,0.94455624,blue, blue     LOC_Os02g47020, LOC_Os03g02590,0.81881344,blue, red      Note that: for example, In the first line of desired output, the 4th column has the color of LOC_Os02g47020 from atrr.txt and the 5th column has the color of LOC_Os03g57840 from atrr.txt


Sqlite Browser NOT opening on Centos 6.5

When I try to open an .exe file in centOS (Release 6.5) by double clicking, it is not opening. I am creating an app which requires databases. I cannot check whether the data has gone in database or not because of this.I think may be some silly settings are blocking it. Any help appreciated.


Strange symbols instead of icons in Firefox

I am running Firefox 27.0 and sometimes it shows strange symbols instead of icons. For example, instead of arrows up/down for up voting or down voting in a forum, it show some Japanese looking character.


Alternative Info reader

I enjoy having choices of $PAGER, e.g.   * more   * less   * most   * ... Can I enjoy the same choice when reading Info documentation? (i.e. `info tar`) What are my options?


Change monitor settings before gnome login

I am attempting to use Fedora on a laptop with a broken screen connected to an external monitor. At what I assume is the login screen, I only see a solid grey screen. I am unable to log in because the computer is displaying the login box on the broken screen. Strangely, Fedora automatically mirrored the screens when I was booting from a live disk. Is there anyway I can change the monitor settings without logging in? Extra information: Fedora 18 GNOME, lenovo ideapad U350.


lightdm starting without rights when not started at boot

I'm having problems with starting lightdm manually. When I start it with `sudo service lightdm start` it starts, but my screen immediately switches back to the TTY where I issued the command. When I then go back and login it again switches back to the TTY. Once I'm logged in (I'm using XFCE) almost everything works as expected. The problem is that XFCE doesn't allow me anything that would require root privileges. This means (besides some other stuff) I can't use the shutdown button (and friends). None of the above happens when lightdm is started ad boot time. But when I then restart lightdm the problems happen again. My OS: Debian jessie (frequently updated)   My desktop manager: XFCE 4.10   My lightdm version: 1.10.1   My init system: sysvinit 2.88dsf


How to download an archive and extract it without saving the archive to disk?

I'd like to download, and extract an archive under a given directory. Here is how I've been doing it so far:               wget http://downloads.mysql.com/source/dbt2-0.37.50.3.tar.gz     tar zxf dbt2-0.37.50.3.tar.gz     mv dbt2-0.37.50.3 dbt2      I'd like instead to download and extract the archive _on the fly_ , without having the `tar.gz` written to the disk. I think this is possible by piping the output of `wget` to `tar`, and giving `tar` a target, but in practice I don't know how to put the pieces together.


On an Apple Keyboard under Linux, how do I make the Function keys work without the fn modifier key?

I use an Apple wired keyboard on Linux. By default the function keys (F1, F2, F3, etc) require the `fn` key to be pressed for them to work. Without the `fn` key, these keys control the features like Screen Brightness, Volume, and Music Track Control. Is there any way to swap these around, so the Function keys do not require the `fn` modifier, but the other functions (Brightness etc) do?


System cannot load Ubuntu based OS's

I built a computer a few months ago, specs listed here. I then installed Linux Mint 13, but then when I wanted to install Ubuntu, the install would start, and I would select "Install". But when it loaded, it said something like this: > BuzyBox vX.X.X   >  ...   >  ...   >  ...   >  (initramfs) Unable to find a medium containing a live file system. So I thought "Whatever". Then recently, I purchased Zorin OS 7 Ultimate. This is Ubuntu based, so when I launch it, I just want to run it for now, so I select "Boot the Live file system" and The same issue happens. I don't want my purchase to go to waste, so any help is greatly appreciated. Note: I do not have a disc drive at the moment. I will get that soon. Also I have tried this same image on multiple other computers and I have also tried loading the image on Oracle VMWare and it worked fine.


How to return the directory of a given executable?

If I want to return the path of a given executable, I can run:               which mysql      Which returns for example:               /usr/bin/mysql      I'd like to return only:               /usr/bin      How can I do that?


Nexenta (Solaris), strange user membership from LDAP

Anybody help me, why do run id command in the Nexenta OS (Solaris+Ubuntu), i get different result?               a_ay@nexenta:/etc$ id -G     513 512 1000 201 203 1010 1013 1019 1020 1036 1039 1040 1041 1045 1046 1047          a_ay@nexenta:/etc$ id -G a_ay     513 1019 1041 1047 512 1039 1036 201 3333 1000 1013 1020 1046 1057 1100 1040 1045 1048 203 1010      Moreover, I'm having a membership in one of the secondary group (1048) and I can not enter to the folder 'Folder' with GID permission is 1048.               drw-r-xr-x 1 1062 1048       0 Apr 12 16:13 Folder      All users in LDAP. _gentent group_ work fine, and get all users correct.               root@nexenta:/tmp# getent group | grep 1048     mygroupname::1048:a_ay,fred,john,superman      p.s. very sorry for bad english..


How to find out out WHEN an user account was locked

With `passwd -S user_name` one can find out, if an account is locked, but is there a way to find out when it was locked and who it locked? Further links:   * http://serverfault.com/a/485760/78439   * Disable a user's login without disabling the account


Debian 6.0 RC1: Cannot login as root and user is not a sudoer

After installing Debian 6.0 rc1, I can't do anything as administrator because I cannot login as root (but I did setup the password during installation) and user is not a sudoer either. Did I miss anything? [ **update** ] I used Live CD to boot and edit the sudoer file, and the problem is fixed.


How to list currently not installed packages?

I'd like to output a list of all, currently not installed, packages (they are visible in Synaptic for example) using only shell commands.   How do I do this?


Problem with Fedora 14 Virtual Desktops (KDE, Compiz)

I have multiple, random problems with my Virtual Desktops. I'm running Fedora 14 with KDE and Compiz on a dual-monitor config. What happens (at random):   * I often (almost always) have a problem with the Desktop of my Virtual Desktops (except for the 1st virtual desktop, that works all the time):     * Often, the background of the desktop is black and unresponsive (no wallpaper loaded, unresponsive to mouse actions).     * Sometimes the background of the desktop is composed of the windows opened in Virtual Desktop #1, but still unresponsive (I can only interact with the windows when I am on the correct VD)   * I sometimes have problems with the task bars:     * Minimized windows appear on the task bars of all the VDs.     * Then, if for example on VD #1 task bar I click on a Window which is opened in VD #2, it will switch to VD #2, displays the window and that window won't appear in other VDs task bars (because it is not minimized anymore).   * I installed the plugin rotating cube in compiz (to have hotkey to switch from one VD to another). But when I try to switch to the next or previous VD, it does the animation, but instead of switching it just stays on the same VD and minimize all the windows... Any idea?


bash -i behavior and "why is my terminal hung?"

This happens on every distro I've tried:               $ cat | bash -i     bash-3.2$ ls     foo bar     bash-3.2$      And now the session is hung. Ie, you get **one** command and then you pretty much have to close the terminal window. SIGTERM (aka ^C) is caught by bash but it won't get you back to a working shell. I'm guessing it has something to do with the `-i` causing bash to fight with cat for control of the tty, but I can't find anything definitive. Can anyone explain what's going on? And how do I automate input to a program that's running `execlp("/bin/bash", "bash", "-i")` without hanging? Do I have to write an `expect`-like program that handles tty vagaries?


Is there a way to find which iptables rule was responsible for dropping a packet?

I have a system that came with a firewall already in place. The firewall consists of over 1000 iptables rules. One of these rule is dropping packets I don't want dropped. (I know this because I did `iptables-save` followed by `iptables -F` and the application started working.) There are way too many rules to sort through manually. Can I do something to show me which rule is dropping the packets?


Backing up to DVD

> **Possible Duplicate:**   >  Splitting large directory tree into specified-size chunks? I have a partition that is about 14G and I need to back it up to DVD in such a way that I can use each disc to extract the contents if I need to. Normally to backup such a partition, one can tar zip the folder and it's contents and slice it to 4.4G and then burn each slice to DVD, eg: to backup /mnt/data folder which contains about 14G of data, we run               tar cvzf - /mnt/data | split -b 4.4G backup.tgz        which would create something like (following is just an example)               backup.tgzaa        4.4G in size     backup.tgzab        4.4G in size     backup.tgzac        4.4G in size     backup.tgzad        0.8G in size      Once burned and if the situation arises for me to restore it, I need to put the slices together using cat and then gunzip and untar, if however there was an error with one of the discs when restoring then it's not possible to restore the backup. To avoid this, I would like to backup the first 4.4G to the first DVD, then next 4.4G to the second disk, with any files hitting the 4.4G to cross over the next disc and so o. In the event of any issues, I would at least have some access to the data. Is there a way to do this?? Mani


Can we now find boost 1.48.0 on yum in Fedora 16?

Not sure if this is the right place to ask this question, but I really cannot find any information on the Web. Boost 1.48.0 has been out on the website for two days but there has still been no update on yum. I just want to make sure if everything is right.


Duplicate entries in $PATH a problem?

I source bashrc's of few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is the problem for commands taking long to start. How does $PATH internally work in bash? Does having more PATHS slow my start up time?


Red Hat Kernel Upgrade problem

I'm using a Red Hat 4 Enterprise Linux. But, when I upgrade the kernel, an error occurred. And after, when computer is booting with new kernel (red hat enterprıse 2.6.9-100.el), I receive the following the error.               mkrootdev: label /1 not found     mount: error 2 mountıng ext 3     mount: error 2 mountıng none     switchroot : mount failed :22     umount /initrd/dev failed :2     kernel panic -not syncing :Attemped to kill init!      After, when I try to boot the system with old kernel (red hat enterprıse 2.6.9-42.el), the system successfully booted. My question is; when I rebooted the system, it attempt to boot with new kernel every time and so I have got to choose the old kernel with hand all the time. How to get rid from this problem?How can I uninstall the new kernel without problem? or How can I use the new kernel without problem? something like this grub.conf;               "default=0     timeout=5     splashimage=(hd0,0)/boot/grub/splash.xpm.gz     hiddenmenu     title Red Hat Enterprise Linux ES (2.6.9-100.ELsmp)         root (hd0,0)         kernel /boot/vmlinuz-2.6.9-100.ELsmp ro root=LABEL=/1 rhgb quiet         initrd /boot/initrd-2.6.9-100.ELsmp.img     title Red Hat Enterprise Linux ES (2.6.9-100.EL)         root (hd0,0)         kernel /boot/vmlinuz-2.6.9-100.EL ro root=LABEL=/1 rhgb quiet         initrd /boot/initrd-2.6.9-100.EL.img     title Red Hat Enterprise Linux ES (2.6.9-42.ELsmp)         root (hd0,0)"


Debian 6 xsession hangs after login

Debian 6 amd64, Gnome desktop. The logon screen appears regularly. After logon, the desktop background and mousecursor appears. Nothing else happens even after a lengthy wait (hours). Same happens for a newly created user account, or root. .xsession-errors only contains "beginning session setup...", and thats it. No further changes until I shutdown the system from the commandline. Then xsession complains about losing the Display. System used to work until before my holiday. I did not change the system in a while, except for updates, and I did reboot about 3 weeks ago, did work then. System clock is correct. How do I debug what component is hanging?


NAT and source IP filtering in PF, using OpenBSD >= 4.7

I just read a book about PF (The Book Of PF, No Starch), but there's one question not answered by it. If I have a gateway machine using two interfaces, $int_if and $ext_if, and I NAT the packages coming from $int_if:net (which is, let's say, 10.0.0.0/24) to $ext_if using `match`, when gets the NAT applied? Before or after the filtering rules? Example:               match out on $ext_if from 10.0.0.0/24 nat-to ($ext_if)     pass out on $ext_if from 10.0.0.0/24     block drop out on $ext_if from 10.0.0.23      Does that work? Or gets the source IP of a packet coming from 10.0.0.23 NATed to the address of $ext_if before the check if it's from 10.0.0.23 gets evaluated? This diagram is not helpful to answer this question, I think, but it's interesting nevertheless: [http://www.benzedrine.cx/pf_flow.png] If you read the PF NAT FAQ [http://www.openbsd.org/faq/pf/nat.html], especially the section "Configuring NAT", you'll come across this sentences: _When a packet is selected by a match rule, parameters (e.g. nat-to) in that rule are remembered and are applied to the packet when a pass rule matching the packet is reached. This permits a whole class of packets to be handled by a single match rule and then specific decisions on whether to allow the traffic can be made with block and pass rules._ I think that sounds as if it's not as I stated in the paragraph above, so the source IP gets "remembered" until there's a decision about the action to be done with the packet. If the decision is made, the NATting gets applied. What do you think? P.S.: This is a quite theoretic question. If you're a little bit pragmatic, you'll do it this way:               match out on $ext_if from 10.0.0.0/24 nat-to ($ext_if)     block drop from 10.0.0.23     # or, explicitly,     # block drop in on $int_if from 10.0.0.23      So the `block` rule gets already applied when the packet comes in on $int_if. EDIT: Another possibility is, of course, to decide before NAT:               pass from 10.0.0.0/24     block drop from 10.0.0.23     match out on $ext_if from 10.0.0.0/24 nat-to ($ext_if)      If a packet from .23 arrives, it first matches the first rule, then matches the second rule and the third "rule". But as the second rule is the last deciding about passing/blocking, the packet gets blocked. Right?


How to delete a range of mails in Solaris using the 'mail' command?

I have some 1k+ mails in an inbox (old cronjob stdout), how to delete them in bulk? I'm on Solaris 8 and I have only `mail` available, no `pine` or `mutt` or similar "UI"-based client. Inline help and man page only give "`d #`" to delete a specific mail. I've tried for example `d 1 - 100` but not luck. And I don't feel like doing `d` 1000 times... Any ideas how to clean up this inbox? I'd actually like to purge all mails older than x days.


linux: How can I view all UUIDs for all available disks on my system?

My `/etc/fstab` contains this:               # / was on /dev/sda1 during installation     UUID=77d8da74-a690-481a-86d5-9beab5a8e842 /               ext4    errors=remount-ro 0       1      There are several other disks on this system, and not all disks are being mounted to the correct location (For example, /dev/sda1 and /dev/sdb1 are sometimes reversed). How can I see the UUIDs for all disks on my system? Can I see the UUID for the third disk on this system?


executing binary file: file not found

I know there are similar questions out there, but I haven't found a solution nor this exact case. The binary was built on Arch Linux using its GCC 4.7. The package works fine on the build system. The commands below were executed on: > Linux vbox-ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC > 2012 x86_64 x86_64 x86_64 GNU/Linux The file in question is located here. It's a Linux 64-bit to Windows 64-bit cross-compiler. Untarring it to `~/` gives a single `~/mingw64` directory which contains everything needed. When I try to run `~/mingw64/x86_64-w64-mingw32/bin/as` this is what I get:               bash: /home/ruben/mingw64/x86_64-w64-mingw32/bin/as: No such file or directory      Running `file ~/mingw64/x86_64-w64-mingw32/bin/as` gives me:               /home/ruben/mingw64/x86_64-w64-mingw32/bin/as: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x0b8e50955e7919b76967bac042f49c5876804248, not stripped      Running `ldd ~/mingw64/x86_64-w64-mingw32/bin/as` gives me:                   linux-vdso.so.1 =>  (0x00007fff3e367000)         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2ceae7e000)         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ceaac1000)         /lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f2ceb0a8000)      I am truly at a loss. Any help is much appreciated. **EDIT** : Some more details: The build system is Arch Linux (currently glibc 2.16). The output of `ls -l` is:               -rwxr-xr-x 2 ruben users 1506464 11 aug 23:49 /home/ruben/mingw64/bin/x86_64-w64-mingw32-as      The output of `objdump -p` is:               Version References:       required from libz.so.1:         0x0827e5c0 0x00 05 ZLIB_1.2.0       required from libc.so.6:         0x0d696917 0x00 06 GLIBC_2.7         0x06969194 0x00 04 GLIBC_2.14         0x0d696913 0x00 03 GLIBC_2.3         0x09691a75 0x00 02 GLIBC_2.2.5      The output of `ldd -v` on Ubuntu 12.04 is:                   linux-vdso.so.1 =>  (0x00007fff225ff000)     libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd525c71000)     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd5258b4000)     /lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fd525e9b000)          Version information:     /home/ruben/mingw64/x86_64-w64-mingw32/bin/as:         libz.so.1 (ZLIB_1.2.0) => /lib/x86_64-linux-gnu/libz.so.1         libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6         libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6         libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6         libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6     /lib/x86_64-linux-gnu/libz.so.1:         libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6         libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6         libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6     /lib/x86_64-linux-gnu/libc.so.6:         ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2         ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2      The tested other OSes are Fedora 17 (glibc 2.15) and Ubuntu 12.04 (eglibc 2.15). Both zlib and glibc version requirements are met.


How can I know my job number when I executing a COBOL program through a shell script

How can I know my job number when executing a COBOL program through a shell script?


How can other processes affect measurements made with `time`?

If I time a process using the `time` command, I get output for 'real', 'user', and 'sys'. My understanding from this discussion is that 'real' is wall time, whereas 'user' and 'sys' are process time. Does this imply that 'user' and 'sys' will be unaffected by other processes? In other words, if the computer is under heavy load or light load from other processes, it may take more time on the wall clock ('real') to finish my process. But my process may have only required 5 seconds of running time, even though it was spread out over 20 seconds of real-world time. **Am I guaranteed that I'll be told '5 seconds user time' regardless of whatever else the system is doing?**


How do you time how long a command took to run?

How would you find out how long a running process took to complete? Example:                date; dd bs=1m if=/foo of=bar; date      ^This example only has 1 second of resolution. Any shell is acceptable.


How do I time a specific command?

(The linux equivalent of TimeThis.exe) Something like:               timethis wget foo.com     Receiving foo.com       ...          wget foo.com took 3 seconds.


Why does parallel slow down after a while?

I'm executing 60 scripts with GNU parallel(they all have `wget` commands in there)but I have noticed that after a few hours execution will slow down a bit. What could be causing this? I'm executing parallel with this command: `parallel -j 60 < list` where "list" is just a file with directories to 60 scripts. I'm on a CentOS 6.5 machine.


What does tail -0a do?

In the documentation for logstash, they mention the command `tail -0a` I have never heard of the -a flag and I can't find any information on google, tail --help or the man pages. What is the difference between `tail -0a foo.bar` and `tail foo.bar` **Update** After testing this further, I wonder if it is a typo. Neither command works on my mac.               [root@interactive adaptive]# tail -0a /var/log/messages     tail: option used in invalid context -- 0               [root@interactive adaptive]# tail -a0 /var/log/messages     tail: invalid option -- 'a'


centos httpd.conf set different ip for a directory

I have 3 IPs in my server, i want use them to increase twitter API limits. How to set a different ip for a directory in centos 6.1 `httpd.conf` (apache 2.3.1) I added these line in the bottom of `httpd.conf`               <VirtualHost NEW IP:80>         ServerName mydomain.com/subdir         ServerAlias www.mydomain.com/subdir         DocumentRoot /var/www/html/subdir         <directory "/var/www/html/subdir">             Options Indexes FollowSymLinks             AllowOverride all             Order Deny,Allow             Allow from all         </directory>     </VirtualHost>      But when I test `/var/www/html/subdir/index.php` with code               <?php     function get_server_ip() {         if (isset($_SERVER)) {             if($_SERVER['SERVER_ADDR']) {                 $server_ip = $_SERVER['SERVER_ADDR'];             }else{                 $server_ip = $_SERVER['LOCAL_ADDR'];             }         }else {             $server_ip = getenv('SERVER_ADDR');         }         return $server_ip;     }     echo get_server_ip();     ?>      it still return OLD IP (default ip for my server). So is it possible and how? If it couldn't, how to use 3 IPs to increase twitter API limits.


Creating a user valid for a given time period?

I wan to create a user on Ubuntu valid for 10 min. How can I do that if it's possible?


Need some sed magic: Moving marked lines to the beginning of a file

I find myself in dire need of some `sed` magic (I _really_ need to sit myself down and learn this). I have a file with lots of lines. After reviewing it, I've marked some lines by adding a star (*) to the beginning of the line. What I would like to do with some `sed`trickery (if possible), is to move all the marked-lines to the beginning (or the end - I'm not picky) of the file, so they form a single block. The other lines (unmarked) should be left undisturbed. How can I do something like this with `sed`? I know `sed` has some buffers for moving text...


rsync only subdirectories and content

I have a directory that contains a number of files and subdirectories. See below:               baseDir       bad1       bad2       subDir1         file1       subDir2         file1      I would like to rsync the contents of baseDir without rsyncing bad1 and bad2. resulting in               targetDir       SubDir1         file1       SubDir2         file1       I dont care if it takes two commands but how do I a


Why most distros' package managers don't allow the same package in multiple versions and newest versions without upgrading?

I mean it's no problem in Win, but in Linux it's sometimes impossible to install new programs if you didn't update the whole OS. And if you didn't update it for a long time then you have to do several updates in a row which is very time-consuming and sometimes unaffordable. Why can't I update the OS from a several releases older version to the newest. And also often I encounter old programs that require older versions of libs. Why can't I separately install older libs for such cases? I know that there are distros that can solve these problems. But they are unpopular and have too little documentation and packages and too unstable and raw. And why are such distros so raw and unpopular?


How can I make the screen black and white?

This is basically to transform the screen (of a laptop), into a black and white screen. I am using Ubuntu 13.04.


Cut + Copy + Paste in Linux Puppy Wary

Trying to cut + copy + paste from the standard urxvt shell in Puppy Linux Wary 5.3. If I follow this post on http://crunchbang.org/forums/viewtopic.php?id=15085 and I press:   * in urxvt: ctrl + insert = copy   * in abiword: shift + insert = paste It doesn't work. Please suggest, what's the shortcut? Or the menu command?


Creating partition using parted instead of fdisk

I have a script which uses the following command to add a partition to /dev/sda               cat <<-EOF |fdisk /dev/sda                                                                                n                                                                                w                                                                                EOF      I want to use parted instead of fdisk (fdisk is not compatible with my Linux). Can i use simply parted instead of fdisk in the above script or how can achieve this?


Where are passwords stored and how are they encrypted in OS X?

I know that on a Linux system passwords are stored in /etc/shadow and are salted and encrypted using a one way hashing algorithm like MD5, SHA-256 or SHA-512. It looks like there is no /etc/shadow file in OS X. How and where are they physically stored then? Are they encrypted in a similar manner as above?


A small challenge to familiarize myself with Linux

I would like to learn more about Linux. I briefly went through a few books and quite a few articles online, but the only way to learn something is to actually start using it. I would like to jump in the deep end and configure a Linux server. So far I have downloaded Ubuntu Server. I'm looking for goal or a challenge if you like, something that will familiarize me with Linux servers. Ideally, I would like to be able to configure a secure mail, file and web servers. I have a strong programming background so I hope that it will help me out. I understand that this is not a specific question, I'm just looking for a milestone or a goal, otherwise I can spend weeks reading books and online articles. **Edit 1:** Thank you all for replies. Based on what you have said so far, I think that there are few different areas that I need to learn about:   1. Kernels. Am I correct to say that this is a first thing I should concentrate on?   2. Virtualisation. Once I'm happy with my knowledge about kernels I'd like to concentrate on KVM. I've read briedly about hypervisors and I believe that they also fall under virtualisation. Please correct me if I'm wrong.    3. Security. Ideally I would like to leave this till last, but I guess that the majority of packages that I will require are online. So I'm not sure whether I should give this a higher priority. SSH, Linux as Firewall and remote access through shell fall under this category.   4. Finally I will have a look at backup routines (using Linux as a file-server) and I'll configure web and mail servers. I guess that mail server might be a pain. I'm tempted to start a blog and see where it takes me after two weeks. In regards to distributives, I have seen that there are hundreds of different Linux distributives. To be perfectly honest I don't want anything simple, but, at the same time, I don't want to spend hours on a very basic operation to start with. Ideally I would like to work only from command prompt, once I can do that I'll be able to work with most of pretty GUIs (I hope so anyway). Once again, thank you for your help and I will really appreciate any further advise. **Edit 2:** This leaves me with a final question on what distribution of Linux I should be using?


What's up with this 'gnome' package?

I have recently grown tired of the way Rhythmbox starts up every time I plug in my MP3 player. I know I could simply disable this, but I've decided to uninstall Rhythmbox instead. It's such a memory-hungry application anyhow. However, there's a mysterious package called simply `gnome` that `apt-get` lists as being dependent on Rhythmbox. I guess it's the very GNOME environment. But why does aptitude recommend uninstalling it? Wouldn't that break my system? Here is the output of `dpkg -L gnome`               hostname:/home/user# dpkg -L gnome      /.     /usr     /usr/share     /usr/share/doc     /usr/share/doc/gnome     /usr/share/doc/gnome/copyright     /usr/share/doc/gnome/changelog.gz      Here is the output of `aptitude remove rhythmbox`:               The following packages are BROKEN:       gnome      The following packages will be REMOVED:       rhythmbox      0 packages upgraded, 0 newly installed, 1 to remove and 20 not upgraded.     Need to get 0B of archives. After unpacking 14.0MB will be freed.     The following packages have unmet dependencies:       gnome: Depends: rhythmbox (>= 0.11.5) but it is not installable     The following actions will resolve these dependencies:          Remove the following packages:     gnome          Score is 119


How do I install Chromium on Linux Mint using Software Manager?

I intalled Linux Mint 10 and would like to use it instead of Windows as a desktop OS. The first thing I would like to do is to install the Chromium web browser. So I start _Software Manager_ and then goes to _Chromium_ and there is a button _Install_ that I click on. The the progress bar at the bottom of the Software Manager goes up to _5%_ before it goes down to _0_ againg, and nothings happens. How do I install Chromium using Software Manager or any other graphical software in Linux Mint 10? * * * The reason to do it only by using graphical tools, was to compare the usability with Windows. Now I tested the commands that NES suggested, `sudo apt-get install chromium-browser` but it failed with this messages:               Err http://archive.ubuntu.com/ubuntu/ maverick-updates/universe chromium-browser-inspector all 7.0.517.41~r62167-0ubuntu0.10.10.1       404  Not Found [IP: 91.189.92.169 80]     Err http://security.ubuntu.com/ubuntu/ maverick-security/universe chromium-browser-inspector all 7.0.517.41~r62167-0ubuntu0.10.10.1       404  Not Found [IP: 91.189.88.37 80]     Err http://security.ubuntu.com/ubuntu/ maverick-security/universe chromium-browser amd64 7.0.517.41~r62167-0ubuntu0.10.10.1       404  Not Found [IP: 91.189.88.37 80]     Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser-inspector_7.0.517.41~r62167-0ubuntu0.10.10.1_all.deb  404  Not Found [IP: 91.189.88.37 80]     Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser_7.0.517.41~r62167-0ubuntu0.10.10.1_amd64.deb  404  Not Found [IP: 91.189.88.37 80]     E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Darcula dark theme for Eclipse

I wonder if there is a way to use Android Studio Darcula theme in Eclipse? I am trying to make Eclipse look a little bit like AS. So far I have made changes to the editor window and I have no idea how to tackle the rest of window frames etc. Any ideas how to change colour of window frames without affecting rest of the Ubuntu?


Mounting NFS: owners are nobody:nogroup

I mounted an NFS filesytem from the shell using the code:               LINE='nfs.mit.edu:/export/evodesign/beatdb /beatdb nfs tcp,intr,rw 0 0'     grep "$LINE" /etc/fstab >/dev/null || echo $LINE >> /etc/fstab     mkdir /beatdb     mount -a # Remount /etc/fstab Without Reboot in Linux      I show the files as nobody:nogroup: ![enter image description here](http://i.stack.imgur.com/AypTg.png) Any idea to fix this issue and display the right owners? I use Ubuntu 12.04. Edit: Client-side (I don't have access to the NFS server): `rpcidmapd` is running: ![enter image description here](http://i.stack.imgur.com/xSG8i.png) `rpcinfo -p`: ![enter image description here](http://i.stack.imgur.com/64ag0.png) `/etc/idmapd.conf`: ![enter image description here](http://i.stack.imgur.com/G4jNh.png)


How to increase size of /dev/sda2 in suse running on vmware

how to increase the partition /dev/sda2 partition. df -h :               Filesystem      Size  Used Avail Use% Mounted on     /dev/sda2       7.0G  3.7G  3.0G  56% /     devtmpfs        432M  172K  432M   1% /dev     tmpfs           432M     0  432M   0% /dev/shm     IOInterceptor   7.0G  3.7G  3.0G  56% /primary/iointerceptor/mountdir      fdisk -l :               Disk /dev/sda: 42.9 GB, 42949672960 bytes     255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x0007c01d          Device Boot      Start         End      Blocks   Id  System     /dev/sda1            2048     2056191     1027072   82  Linux swap / Solaris     /dev/sda2   *     2056192    16777215     7360512   83  Linux      I've also edited the virtual machine settings to make hard disk size from 8GB(initially allocated) to 40GB, now how should i increase above mentioned partition? searched over Google but didn't get how to do this? **EDIT:** Created new partition **/dev/sda3**. **fdisk -l** after creating new partition               /dev/sda1            2048     2056191     1027072   82  Linux swap / Solaris     /dev/sda2   *     2056192    16777215     7360512   83  Linux     /dev/sda3        16777216    41943039    12582912   83  Linux      But when used **resize2fs /dev/sda3**. It showed below error               resize2fs 1.41.9 (22-Aug-2009)     resize2fs: Bad magic number in super-block while trying to open /dev/sda3     Couldn't find valid filesystem superblock.      Pradi


How to automatically mount an USB device on plugin-time on an already running system?

I know how to use `/etc/fstab` to automatically mount devices on boot or when doing `sudo mount -a`, which works perfectly fine. For example, here is my current line for my device               UUID=B864-497A /media/usbstick vfat defaults,users,noatime,nodiratime,umask=000 0 0      **How do I achieve automatic mounting when this USB device with known UUID is plugged in while the system is already running, so that I _don't_ have to run `sudo mount -a` after it is plugged in?** Additional info: I'm working on an up-to-date console-only Debian wheezy linux.


Anti Aliased Fonts with NoMachine NX

I am running nx server on a headless ubuntu server. Its desktop is to Unix -> Custom -> Emacs which gives me an Emacs window on the local machine. The only thing that does not work as expected is the anti aliased fonts. I do have anti aliased fonts on my local X but nx seems to not honor my remote Xresources file.


Why isn't this XMLStarlet Query Working?

I'm trying to write a simple bash script that parses price info from the ebay developer API search results. Here's an example of XML search results for "Detective Comics 700":               <findItemsAdvancedResponse xmlns="http://www.ebay.com/marketplace/search/v1/services">     <ack>Success</ack>     <version>1.12.0</version>     <timestamp>2014-06-21T19:03:49.943Z</timestamp>     <searchResult count="1">     <item>     <itemId>301209856743</itemId>     <title>     DETECTIVE COMICS (1937 Series) #700 Near Mint Comics Book     </title>     <globalId>EBAY-US</globalId>     <primaryCategory>     <categoryId>77</categoryId>     <categoryName>Other</categoryName>     </primaryCategory>     <galleryURL>     http://thumbs4.ebaystatic.com/m/mBYOI1SLUSGe0DL1FmHjdCw/140.jpg     </galleryURL>     <viewItemURL>     http://www.ebay.com/itm/DETECTIVE-COMICS-1937-Series-700-Near-Mint-Comics-Book-/301209856743?pt=US_Comic_Books     </viewItemURL>     <paymentMethod>PayPal</paymentMethod>     <paymentMethod>VisaMC</paymentMethod>     <paymentMethod>Discover</paymentMethod>     <autoPay>false</autoPay>     <location>USA</location>     <country>US</country>     <shippingInfo>     <shippingServiceCost currencyId="USD">4.95</shippingServiceCost>     <shippingType>Flat</shippingType>     <shipToLocations>Worldwide</shipToLocations>     <expeditedShipping>true</expeditedShipping>     <oneDayShippingAvailable>false</oneDayShippingAvailable>     <handlingTime>3</handlingTime>     </shippingInfo>     <sellingStatus>     <currentPrice currencyId="USD">6.0</currentPrice>     <convertedCurrentPrice currencyId="USD">6.0</convertedCurrentPrice>     <sellingState>Active</sellingState>     <timeLeft>P17DT7H31M1S</timeLeft>     </sellingStatus>     <listingInfo>     <bestOfferEnabled>false</bestOfferEnabled>     <buyItNowAvailable>false</buyItNowAvailable>     <startTime>2014-06-09T02:34:50.000Z</startTime>     <endTime>2014-07-09T02:34:50.000Z</endTime>     <listingType>StoreInventory</listingType>     <gift>false</gift>     </listingInfo>     <returnsAccepted>true</returnsAccepted>     <galleryPlusPictureURL>     http://galleryplus.ebayimg.com/ws/web/301209856743_1_0_1.jpg     </galleryPlusPictureURL>     <isMultiVariationListing>false</isMultiVariationListing>     <topRatedListing>false</topRatedListing>     </item>     </searchResult>     <paginationOutput>     <pageNumber>1</pageNumber>     <entriesPerPage>1</entriesPerPage>     <totalPages>111</totalPages>     <totalEntries>111</totalEntries>     </paginationOutput>     <itemSearchURL>     http://www.ebay.com/sch/63/i.html?LH_TitleDesc=1&_nkw=detective+comics+700&_ddo=1&_ipg=1&_pgn=1     </itemSearchURL>     </findItemsAdvancedResponse>      I essentially want to parse just the title, price, and maybe shipping cost. Preliminary research indicated that `xmlstarlet` is a sensible choice for this but it's not working (I know I must be doing something wrong). When I try searching, I get a blank result:               [foouser@foobox fooapp]# cat xmlsample | xmlstarlet sel -t -v "//title"     [foouser@foobox fooapp]#          [foouser@foobox fooapp]# xmlstarlet sel -t -v "//findItemsAdvancedResponse/searchResult/item/title" xmlsample     [foouser@foobox fooapp]#      Any ideas on where I've gone astray?


Fastest & Most Core way to replace "\r\n" with "\n" in a file?

I suppose `tr` is a more core method and thus probably a faster way to replace things within a given file. However tr can only replace equal amounts of characters. meaning... 2 characters can only be replaced with 2 characters which means replacing `\r\n` with `\n` is out of the question via `tr` is the next best option `sed` ? is sed the most core and fastest way to replacing `\r\n` with `\n` in a file given the lack of capabilities in tr ? would like an example if possible.


Centos not respecting ClientAliveCountMax

I'm running Centos 6.3 and trying to connect to it via OS X through capistrano deploying a Rails project. Capistrano is notorious for not respecting `ServerAliveInternal` from the client so I must set `ClientAliveInternal` and `ClientAliveCountMax` on the server. I have set `ClientAliveInterval` to 60 and `ClientAliveCountMax` to 15, which should give me a 15 minutes idling time on a SSH connection. However, on my test, the connection becomes shut down within 2 minutes. Note also that I have ran `service sshd restart` after resetting these values in `/etc/ssh/sshd_config`. Anybody have any insights into what might be wrong?


gitweb.cgi: "Premature end of script headers: gitweb.cgi"

I'm running LAMP on Arch and now want the gitweb going on apache. Followed the instructions as in https://wiki.archlinux.org/index.php/Gitweb but on the gitweb directory (here `localhost/~myuser/gitweb`) I get:               Server error!          The server encountered an internal error and was unable to complete your request.          Error message:      Premature end of script headers: gitweb.cgi          If you think this is a server error, please contact the webmaster.          Error 500          localhost     Fri Jun 8 15:14:11 2012     Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c DAV/2 PHP/5.4.3      Appreciating your helps. Thanks.


"No package wine available" and "No package fluxbox available"

I'm running "Centos 6 64-bit" on a Virtual Private Server (VPS) (i.e. on the cloud). When I issue this command: " **yum install** vnc-server **wine** xterm **fluxbox** vsftpd firefox vnstat" I get some results that all seem to be fine except:- (...)   "No package wine available."   (...)   "No package fluxbox available."   (...)   What is the problem? How can I solve it? This is my first time to use CentOS, and I've rarely used linux (Ubuntu) at all. Thanks in advance. * * * **EDIT:** 1) To download the package as instructed, I presume this is the way to do it:-               wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm      _Result (last line only):-_               You have new mail in /var/spool/mail/root            2) I then executed this:-               rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt      _Result:-_               You have new mail in /var/spool/mail/root            3) Then:-               rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm      _Result:-_               rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK            4) After that:-               rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm      _Result:-_               package rpmforge-release-0.5.2-2.el6.rf.x86_64 is already installed            5) Installing Fluxbox:-               yum install fluxbox      _Result:-_               No package flusbox available.     Error: Nothing to do     You have new mail in /var/spool/mail/root            Steps from http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-f0c3ecee3dbb407e4eed79a56ec0ae92d1398e01 **EDIT 2:-** By the way, I did the following before all of this (as suggested in a tutorial):- Copy & paste the following into the Extra.repo file:               [dag]     name=Dag RPM Repository for Red Hat Enterprise Linux     baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag     gpgcheck=1     enabled=1          [kbs-CentOS-Extras]     name=CentOS.Karan.Org-EL$releasever - Stable     gpgcheck=1     gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt     enabled=1     baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/          [kbs-CentOS-Misc]     name=CentOS.Karan.Org-EL$releasever - Stable     gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt     gpgcheck=1     enabled=1     baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/      Save & exit. (Then:-)               # rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt     # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt     # yum update


Converting a bootable USB into an ISO image

I know how to make a bootable USB, but how does one make an ISO image out of a bootable USB?


How to download all images from a website (not webpage) using the terminal?

I want a command that I type a URL, for example photos.tumblr.com, and it download all photos on this site in a folder, but not only images of the site's homepage. This command need to download the images from all parts of the site, such as photos.tumblr.com/ph1/1.png / photos.tumblr.com/ph3/4.jpg. **Please show me an example using this url:http://neverending- fairytale.tumblr.com/ and test it before answer the question**


What is a cheap Citrix XenServer build?

Was wondering if anyone knew of a cheap XenServer build. Want to build two hypervisors using Citrix XenServer (based on open source Xen project). I was hoping for at least 8gb of ram on each and should have a HVM compatible processor. Let me know if anyone has a good rig. Needs to be cheap cause I am looking to get two to test WLB and HA.


VPN like solution for SSH Tunneling?

Socksify like program for Fedora? Socksify, tsocks, proxycommand in ssh, they're great softwares/solutions that can be used to "constrain" given apps to use a SOCKS5 proxy (what was created with an SSH TUNNEL). Even if the given apps doesn't support to use SOCKS5. But: Are there any solutions to use an SSH Tunnel to "constrain" all the traffic on a PC to it? So it would be like some "kind of a VPN solution". So all the traffic from the PC would go through **only** in the SSH Tunnel. Are there any solutions for this? It would be a very-very-very good feature. p.s.: because installing OpenVPN vs. Installing SSHD+restrict a ssh user to only have "ssh tunneling" permissions is much simpler... Thank you.


How to test the difference between using disk encryption or not?

If I have a laptop, and I want to install an Ubuntu 11.04 on it, but disk performance would be an important thing, then how could I test the real differences between:      - not using encryption   - using luks/aes 128bit   - using luks/aes 256bit      So I would Install Ubuntu 3 times, I just not know how to do perf. test (good).      What programs/methods could be good for such io performance tests? (or it affects the CPU too? - software encryption! my cpu doesn't has aes-ni) e.g.: I would install a minimal ubuntu iso, with no gui+run tests in single user mode


Removed apt-get from Ubuntu

Well my fingers did manage to do `sudo apt-get remove libstdc++6` and write, `yes`. That removed alot of system files. Is there any way to bring it up working again? I have connected to terminal, and `wget` is working fine. As I managed to `ctrl+C` when figured out what was happening ... I think, the main thing would be, is to get `apt-get`, but how? Ubuntu 11.10 Oneiric x64bit


Is it possible to execute code in heap space?

I would like to know if i can execute a code piece sitting inside the heap space?


`power/persist` file not found in USB device sysfs directory

The file /usr/share/doc/linux-doc/usb/persist.txt.gz mentions that the USB- persist capability can be enabled for a given USB device by writing `1` to the file `persist` in that device's directory in `/sys/bus/usb/devices/$device/power`. This is said — if I understood correctly — to allow mountings of volumes on the drive to persist across power loss during suspend. However, I've discovered that the device I'd like to enable this facility for — a USB hard drive — does not have such a file in its corresponding directory, and that attempts to create it are rebuffed. Is there perhaps a kernel module that needs to be loaded for this to work? Do I need to build a custom kernel? I'm running ubuntu 10.10.


use pacmd to undo these changes to pulseaudio sink settings

Recently I discovered this question and answer on askubuntu.com which, while useful, also rendered my sound system unusable for practical purposes. The commands               pactl load-module module-null-sink sink_name=nullsinkname     pactl move-sink-input nullsinkname steam      My null sinks are still mapped to various applications, even after `halt`. I suspect it may be due to the default behavior of the module itself (Load Once: no). I don't know how to turn this off or to restore my system to its original state.               >>> describe-module module-null-sink     Name: module-null-sink     Version: 2.0     Description: Clocked NULL sink     Author: Lennart Poettering     Usage: sink_name=<name of sink> sink_properties=<properties for the sink> format=<sample format> rate=<sample rate> channels=<number of channels> channel_map=<channel map>     Load Once: no      Here's an example of `mplayer` not working:               >>> list-sink-inputs     1 sink input(s) available.         index: 63             driver: <protocol-native.c>             flags:              state: RUNNING             sink: 6 <rooki>             volume: 0:  84%                     0: -4.54 dB                     balance 0.00             muted: no             current latency: 182.62 ms             requested latency: 210.00 ms             sample spec: float32le 1ch 16000Hz             channel map: mono                          Mono             resample method: speex-float-3             module: 7             client: 176 <MPlayer>             properties:                     media.name = "audio stream"                     application.name = "MPlayer"                     native-protocol.peer = "UNIX socket client"                     native-protocol.version = "26"                     application.process.id = "14224"                     application.process.user = "alec"                     application.process.host = "ROOROO"                     application.process.binary = "mplayer"                     application.language = "C"                     window.x11.display = ":0"                     application.process.machine_id = "eec7c6ae60f90bb3921ad16d0000302d"                     application.process.session_id = "eec7c6ae60f90bb3921ad16d0000302d-1345384044.64188-1149507345"                     module-stream-restore.id = "sink-input-by-application-name:MPlayer"      It's been mapped to sink 6, which I called "rooki". I don't know what the original sink was called, or how to undo the mapping.


Resetting user directory permissions etc

My "Linux mint Debian edition" installation worked well until I used a live-CD to boot and then copied some files back and forth to and between the hard drive and a usb device. Now it says that it is starting up without access to the /user/home directory. it is starting with a temp "home", and I cannot access the files in the users "home' directory. How do reset the access and permissions on the users directory space?


open a file using CDPATH and symlink

To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc:               export CDPATH=~/symlinks      When working with directories, everything's fine and I can access the symlinked folders from everywhere. For example if I do:               $ ln -s ~/path/to/folder ~/symlinks/folder      I can then just write:               $ cd folder      to get inside the symlinked folder, regardless of my current directory. However, when I create a symlink to a file and then try to open it with an editor, I get an empty file, unless I'm in the symlink directory. For example if I do:               $ ln -s ~/path/to/file/filename ~/symlinks/filename      and then write:               $ kwrite filename      I get an empty file, if I'm not in the symlink folder. I want to access the file from anywhere though, how can I achieve this?


Change script to use whiptail instead of zenity

I'm having difficulty converting some zenity based script to use whiptail instead. The working script looks something like this:               #!/bin/bash     xfreerdp /v:farm.company.com \     /d:company.com \     /u:$(zenity \     --entry \     --title="Username" \     --text="Enter your Username")      I am trying to convert this to use whiptail instead, but keep getting a blank screen. This is what I have so far:               #!/bin/bash     xfreerdp /v:farm.company.com \     /d:company.com \     /u:$(whiptail \     --inputbox "Username" 10 30)      What am I doing wrong?


Postfix/devcot MailServer - not receiving emails

I'm new to linux and unix in general, I've worked with a shared hosting provider over the years where everything was setup for me, including email. I'm now trying to create my own mail server in my VPS (where I'm moving everything I used to host under shared hosting), I'm running CentOS6 and followed the guide at: http://wiki.centos.org/HowTos/postfix (I have my own domain - lets call it example.com) Did everything step by step (acknowledging that sometimes I was just blindly following the steps), at the end I went ahead and created 2 new DNS records with my registrar: an **MX** record (example.com => mail.example.com) and an extra **A** record (mail.example.com=>VPS IP) Doing a dig MX example.com gets me:               ;; Got answer:     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41372     ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0          ;; QUESTION SECTION:     ;example.com.               IN      MX          ;; ANSWER SECTION:     example.com.        299     IN      MX      1 dc-8c1937cd-mail.example.com.          ;; Query time: 43 msec     ;; SERVER: 8.8.8.8#53(8.8.8.8)     ;; WHEN: Sat Mar 29 14:36:20 2014     ;; MSG SIZE  rcvd: 66      I am frankly unsure what this "dc-8c1937cd-mail.example.com" MX record is, I would have expected it to be just "mail.example.com" as that is what I setup the record as (could this have anything to do with my old shared hosting settings? I have switched dns nameservers since moving to a VPS). I have also tried sending a test email using telnet:               [root@server ~]# telnet localhost 25     Trying ::1...     Connected to localhost.     Escape character is '^]'.     220 mail.exampe.com ESMTP Postfix     mail from: root@localhost     rcpt to: user@example.com     data     Subject: My first mail on Postfix          test!     .250 2.1.0 Ok     250 2.1.5 Ok     354 End data with <CR><LF>.<CR><LF>      The response seems OK, but I've checked both **/var/mail/user** and **/var/spool/mail/user** for emails and see nothing (my user file is indeed in these folders both files are empty) Any idea where I went wrong and how to find the problem? postconf -n results:               alias_database = hash:/etc/aliases     alias_maps = hash:/etc/aliases     command_directory = /usr/sbin     config_directory = /etc/postfix     daemon_directory = /usr/libexec/postfix     data_directory = /var/lib/postfix     debug_peer_level = 2     home_mailbox = Maildir/     html_directory = no     inet_interfaces = localhost     inet_protocols = all     mail_owner = postfix     mailq_path = /usr/bin/mailq.postfix     manpage_directory = /usr/share/man     mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain     mydomain = example.com     myhostname = mail.example.com     mynetworks = 168.100.189.0/28, 127.0.0.0/8     myorigin = $mydomain     newaliases_path = /usr/bin/newaliases.postfix     queue_directory = /var/spool/postfix     readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES     relay_domains =     sample_directory = /usr/share/doc/postfix-2.6.6/samples     sendmail_path = /usr/sbin/sendmail.postfix     setgid_group = postdrop     unknown_local_recipient_reject_code = 550


Does anyone know how to configure a Wacom Bamboo tablet to work left-handled?

I have my Wacom Bamboo tablet working fine under Fedora 14 but would like to switch it from right- to left-handed. How can this be done?


Why is Linux NFS server implemented in the kernel as opposed to userspace?

I was just wondering why the Linux NFS server is implemented in the kernel as opposed to a userspace application? I know a userspace NFS daemon exists, but it's not the standard method for providing NFS server services. I would think that running NFS server as a userspace application would be the preferred approach as it can provide added security having a daemon run in userspace instead of the kernel. It also would fit with the common Linux principal of doing one thing and doing it well (and that daemons shouldn't be a job for the kernel).   In fact the only benefit I can think of running in the kernel would a performance boost from context switching (and that is a debatable reason). So is there any documented reason why it is implemented the way it is? I tried googling around but couldn't find anything. * * * _There seems to be a lot of confusion, please note I am not asking about mounting filesystems, I am asking about providing the **server side of a network filesystem**. There is a very distinct difference. Mounting a filesystem locally requires support for the filesystem in the kernel, providing it does not (eg samba or unfs3)._


xmodmap problems and inconsistencies with more than 4 alternative symbols per key

I was trying to make my keyboard more useful and used `xmodmap` to map mathematical and greek symbols to `mod3` modifier level. Where caps lock is mapped to `mod3`. As I understand, the 8-entry lines in `.Xmodmap` work as following: [nothing], [shift], [mod3], [mod3+shift], [altgr], [altgr+shift], [altgr+mod3], [altgr+shift+mod3] I used this and it mostly worked. Except for some strange occurences. For instance:               keycode  49 = backslash bar includes includedin infinity infinity EuroSign EuroSign      This produces the first four entries nicely, but then it cycles around (altgr+key=backshlash, not infinity). However, if I do               keycode  10 = backslash bar includes includedin infinity infinity EuroSign EuroSign      it produces first four entries _and_ infinities, but the euro sign doesn't show (I get `includes` and `includedin` instead). Notice that I just used a different key, everything else is the same! Even with only 6 entries (in case there was a parsing problem with 8), infinities are not shown on that particular key. Furthermore, I mapped greek letters to 3rd and 4th entries (mod3 and mod3+shift). The lowercase work fine, but the uppercase doesn't work for Shift+mod3+S and Shift+mod3+W and Shift+mod3+X. It's not a font problem, `xev` doesn't show _any_ event when I use these combinations. The entry is               keycode  39 = s S Greek_sigma   Greek_SIGMA   integral integral downarrow downarrow      Additionally, the last two entries mostly don't work. Even worse, one line gets particularly confused. I entered               keycode  51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke      but when I do `xmodmap -pke` I get               keycode  51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke zcaron Zcaron dstroke Dstroke zcaron Zcaron dstroke Dstroke      Notice it duplicated all the entries. A couple of keys do that, but not all of them! So, my questions are:   * Am I using the 8-entry lines correctly?   * Why do I get different number of working keysyms on different keycodes?   * Is it possible that something in the window manager maps these combinations and swallows them?   * Why are _some_ lines getting duplicated when they are applied?   * Is this an obscure xlib bug?   * Is the modifier functionality limited? Note that I'm in a unique situation where there simply can't be any unknown shortcuts that I don't know about because my window manager is of my own making and I control all of them. More details: the mapping of caps lock is done like this:               keycode  66 = Mode_switch          clear lock     clear control     clear mod1     clear mod2     clear mod3     clear mod4     clear mod5     add control = Control_L Control_R     add mod1 = Alt_L Meta_L     add mod2 = Num_Lock     add mod3 = Mode_switch     add mod4 = Super_L Super_R Hyper_L     add mod5 = ISO_Level3_Shift      The system is a freshly updated arch linux. * * * Edit: I found out that a small part of the problem (the SWX that didn't work at all) was due to the adjacency of the keys on the keyboard (key jamming, couldn't handle 3 concurrently pressed keys in this combination). Right shift removed the problem for W and X but not for S (on this particular keyboard). The rest is still a mystery, particularly the broken 5th and 6th entry for keycode 49 (the totally useless thingy above the tab).


which unix or linux command is used to change root password of remote machine(Just an IP address) without using SSH Login

which unix or linux command is used to change root password of remote machine(Just an IP address)? Suppose I just have an IP address of the target machine which is on my network, But I do not know root password of this machine, Is there any command available in Linux or unix that allow me to change root password that target machine, So that after changing the root password of the target machine I can do ssh to login into the target machine with new root password.


Bash: process substitution and stdin

The following line is obvious:               echo "bla" | foo | bar      But does the ones below do the same?               echo "bla" | bar <(foo)     echo "bla" | bar < <(foo)      Which of the `foo` and `bar` read "bla" from stdin and why? I mean that, of course, I can just code it and check it, but I'm not sure if it's defined behavior or I'm exploiting features I should not rely on.


Remove GET parameters from file names in directory

I need to remove the part starting with `?` from a bunch of files with names like `image.jpg?foo=bar&bar=foo`. Would someone please show me how it's done? These commands aren't working for some reason:               rename "\?." "" *     rename 's/(.*)\.jpg\?.*/$1\.jpg/' *


"cat" command: how to automatically escape everything that might be a violation?

If you copy the contents of               httpd.conf      and then paste it into a cat command.. such as this one..               #!/bin/bash     cat > /test << EOF     pasted here..     EOF      you run into this error:               -bash: command substitution: line 1: unexpected EOF while looking for matching `''     -bash: command substitution: line 4: syntax error: unexpected end of file      perhaps the solution is to escape the dollar signs and maybe even quotes and so on.. but given that this is such a large file.. can dollar signs be automatically be escaped ? is my only option to escape them via another program and then give it to the cat command ?


Tips for debugging WiFi on the command line?

I am running `Ubuntu 13.10` on a Thnkpad X1 Carbon. My Wifi card is `Centrino Advanced-N 6205 [Taylor Peak]` I normally connect to open WiFi networks using the commands               sudo iw dev wlan0 connect <ESSID> <Frequency> <BSSID>     dhclient wlan0      This method works for me everywhere except in one room on my campus, where the signal is very strong (`iwlist` reports a signal strength of under `-30dB`. I am fairly certain there is nothing wrong with the Access Point, because my phone connects to it just fine. However, when I do the first command above, I am never able to associate with the Access Point, and `dmesg` always shows a message containing something about `ipv6` and `Wifi not ready`. I have tried various version of the `iwlwifi` driver but none of them are able to work for this Access Point. I am wondering if anyone has suggestions for debugging, such as "turning down the radio power", "turning up the radio power", other obscure settings that can be set on WiFi cards that might help? I am also interested in knowing what sorts of root causes this kind of problem might have, since my wireless card seems to be able to other networks and AP's just fine.


Unable to format a CF card

I have a compact flash card formatted to FAT16. I am unable to format it to any other file system. I used GParted to format the card to ext2 for example, after I do that, the file system becomes unknown to GParted! ~~I ran fsck on the card and it returned a dirty bit to be deleted. Do I deleted this dirty bit?~~ 'sudo fsck /dev/sdb1' output now:               fsck from util-linux 2.20.1     dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN     /dev/sdb1: 1 files, 0/61366 clusters