title: Does rsync verify files copied between two local drives?

text: I want to make a fresh new copy of a large number of files from one local drive to another. I've read that rsync does a checksum comparison of files when sending them to a remote machine over a network.   1. Will rsync make the comparison when copying the files between two local drives?   2. If it does do a verification - is it a safe bet? Or is it better to do a byte by byte comparison?


title: Can't play DVDs on Linux Ubuntu laptop

text: I can't play a DVD on my Ubuntu laptop. I've tried VLC. A window with a traffic cone opens and the Drive spins for a short time, then stops. Nothing else happens.


title: Battery full notification

text: I am using a Linux distribution, I didn't get any notification even after the battery is full. Is there any custom script to run battery charge status and output a sound notification when the battery is fully charged?


title: Nginx config, if location not

text: My config                   rewrite /silosy /produktsiya/silosy last;              location /go/ {             rewrite /go/http\:/(.*) http://$1 permanent;         }              if (!-e $request_filename){             rewrite ^/(.*) /index.php?$query_string;         }      Now rewrite for "/go" and "/silosy" doesn't work because: "if (!-e $request_filename)" is using. How can I add location restriction like this:               location [not (go|silosy)] {         if (!-e $request_filename){             rewrite ^/(.*) /index.php?$query_string;         }     }      How will "not" be looking in nginx location?


title: Can You Send Mail With MSMTP Without Putting the Location, ISP, and Hostname in Header?

text: I've been testing sending mail with mutt and msmtp. I've noticed when replying to a message I sent with msmtp, my state, hostname, and isp show up in the In- Reply-To: header (State...@hostname.isp...). However, if I send a message from web gmail and reply to it, the In-Reply-To: header just shows a bunch of letters @mail.gmail.com. Can I prevent this information from being included, or should just I not care that it is being included?


title: Understand netstat -i flgs

text: Can anyone explain for me what each option in `Flg` means?               [root@apple ~]# netstat -i     Kernel Interface table     Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg     eth0       1500   0   110512      0      0      0     6660      0      0      0 BMRU     eth1       1500   0   110713      0      0      0     4533      0      0      0 BMRU     eth2       1500   0      733      0      0      0       17      0      0      0 BMRU     lo        16436   0       45      0      0      0       45      0      0      0 LRU      And are there any more?


title: How to detect if a disk is seeking?

text: I can use a variety of tools to measure the volume of disk I/O currently flowing through the system (such as `iotop` and `iostat`) but I'm curious if it's possible to easily detect if a disk is seeking a lot with only a small amount of I/O. I know it;s possible to extract this information using `blktrace` and then decode it using `btt` but these are somewhat unwieldy and I was hoping there was a simpler alternative?


title: Use inotifywait to move file when it loads in dropbox folder

text: I'm trying to find a way to immediately move a file to another folder as soon as it appears in my dropbox on CentOS. I have scoured the internet for some clues but I can't get any further than the fact that I need to use `inotify` to invoke a script which will process the file as it appears. My BASH knowledge is very limited and I doubt I can write this in PHP. In other words, how can I move a file to another folder as soon as it appears using `inotify`?


title: Very slow SW-RAID 5 in Debian Squeeze

text: I don't know why, but I have big trouble with speed of my raid. I have 4x WD RE4 7200RPM 500GB. Size of RAID 5 is 1000GB. 1 of HDDs is Spare. Problem is here:               Every 1,0s: cat /proc/mdstat                                                                                Mon Dec 31 10:01:11 2012          Personalities : [raid1] [raid6] [raid5] [raid4]     md1 : active raid5 sdc2[0] sdb2[3](S) sdd2[2] sde2[1]           974812160 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]           [=>...................]  check =  9.0% (44241152/487406080) finish=6696.5min speed=1102K/sec          md0 : active raid1 sdc1[0] sdb1[3](S) sdd1[2] sde1[1]           975860 blocks super 1.2 [3/3] [UUU]          unused devices: <none>      I started this checking at 2:00 AM and I thought it could be already done. It isn't. When it was new (2 months ago) it tooks only about 150 - 300minutes to check raid.               vmstat 1 shows:     procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----      r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa      2  1      0 168108 278152 6649192    0    0   385   705    0    1 47 13 33  7      1  1      0 168092 278152 6649236    0    0     0  1564 24426 42090 28 11 46 16      3  1      0 173424 278152 6649236    0    0     0  1204 23750 41592 30  7 48 15      1  2      0 173416 278160 6649228    0    0    24   592 23131 41252 25  5 47 23      2  1      0 173424 278160 6649260    0    0     0  2340 24750 42888 29  8 45 18      1  1      0 172928 278176 6649244    0    0     0  1408 23818 41362 30  8 42 21      1  0      0 172696 278176 6649304    0    0     0   471 23144 40932 25  7 58 10      1  0      0 172488 278176 6649304    0    0     0   275 26299 45241 27 17 52  5      1  2      0 172612 278184 6649304    0    0     0  1806 24572 41288 40  6 44  9      5  2      0 172752 278200 6649328    0    0     0   780 23541 41308 28  6 33 33      Iostat 1 shows:               Linux 2.6.32-5-amd64 ()       31.12.2012      _x86_64_        (4 CPU)          avg-cpu:  %user   %nice %system %iowait  %steal   %idle               47,02    0,34   12,94    6,95    0,00   32,74          Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn     sda               7,68        17,48      3428,36  112980468 22156867512     sdb               0,00         0,00         0,00        748       2208     sdc              70,20      3506,35      1574,01 22660920204 10172547974     sdd              70,32      3528,74      1551,86 22805657128 10029430470     sde              71,11      3548,29      1538,53 22931965117 9943244782     md0               0,00         0,01         0,00      55936       5416     md1             356,51      3276,98      2594,09 21178557866 16765170392          avg-cpu:  %user   %nice %system %iowait  %steal   %idle               24,88    0,00    6,47   18,41    0,00   50,25          Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn     sda               0,00         0,00         0,00          0          0     sdb               0,00         0,00         0,00          0          0     sdc             164,00        80,00      2792,00         80       2792     sdd             116,00      1072,00      1248,00       1072       1248     sde             138,00         0,00      1864,00          0       1864     md0               0,00         0,00         0,00          0          0     md1             369,00         0,00      2952,00          0       2952          avg-cpu:  %user   %nice %system %iowait  %steal   %idle               30,71    0,00    6,88   14,50    0,00   47,91          Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn     sda               0,00         0,00         0,00          0          0     sdb               0,00         0,00         0,00          0          0     sdc             187,00      1040,00      1944,00       1040       1944     sdd             286,00        64,00      4616,00         64       4616     sde             231,00      1024,00      3056,00       1024       3056     md0               0,00         0,00         0,00          0          0     md1             601,00         0,00      4808,00          0       4808          avg-cpu:  %user   %nice %system %iowait  %steal   %idle               22,03    0,00    6,68    3,71    0,00   67,57          Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn     sda               0,00         0,00         0,00          0          0     sdb               0,00         0,00         0,00          0          0     sdc              30,00         8,00       716,00          8        716     sdd              10,00        40,00        44,00         40         44     sde              33,00         0,00       740,00          0        740     md0               0,00         0,00         0,00          0          0     md1              92,00         0,00       736,00          0        736      Let me give you following questions: 1) Is there problem in full capacity of my raid? (total size 916GB, used 505G, free 365G). 2) Is there problem with " 512k chunk" ? 3) Is EXT3 optimal for SW RAID 5? 4) Is there any possibility, how to increase speed of my SW raid 5? 5) Is it possible to add next disk to my RAID to be not spare, to increase speed of raid only? 6) How much CPU TIME consumes SW Raid 5? in top it shows me only: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 422 root 20 0 0 0 0 S 1 0.0 1743:38 md1_raid5 Server uptime is 74 days (since changing them for the old one). TOP shows:               top - 10:18:43 up 74 days, 19:21,  3 users,  load average: 2.33, 2.86, 2.94     Tasks: 147 total,   2 running, 145 sleeping,   0 stopped,   0 zombie     Cpu(s): 22.6%us,  6.9%sy,  0.0%ni, 52.9%id, 17.1%wa,  0.1%hi,  0.4%si,  0.0%st     Mem:  24743684k total, 24598984k used,   144700k free,   270604k buffers     Swap:        0k total,        0k used,        0k free,  6664872k cached      I think, there is too high avarage load. But why?I don't see anything consuming too much CPU. Power TOP Shows following:               Wakeups-from-idle per second : 6122,7   interval: 10,0s     Top causes for wakeups:       74,0% (17652,4)               kvm : sys_timer_settime (posix_timer_fn)       15,0% (3579,6)      <kernel IPI> : Rescheduling interrupts        5,5% (1319,6)               kvm : apic_reg_write (kvm_timer_fn)        1,8% (422,4)       <interrupt> : ahci        1,0% (248,2)          events/0 : flush_to_ldisc (delayed_work_timer_fn)        0,7% (178,6)       worldserver : __mod_timer (process_timeout)        0,6% (153,4)       <interrupt> : eth0        0,5% (118,4)       <interrupt> : pata_atiixp        0,2% ( 43,6)               kvm : __kvm_migrate_timers (kvm_timer_fn)        0,1% ( 20,0)         md1_raid5 : __mod_timer (blk_unplug_timeout)        0,0% ( 11,2)        authserver : __mod_timer (process_timeout)


title: how to send CTRL-ALT-Fn to virtual box guest Linux?

text: This should be a simple question:   * **Host OS:** Arch Linux   * **Guest OS:** Arch Linux (GNOME) How can I send `Ctrl`+`Alt`+`F1` to my Guest Linux OS?


title: Incorrect step with grub while installing onto a USB stick?

text: I tried installing debian on a USB stick. I believed I made a mistake with the grub boot up part. I want to leave my harddrives alone and with my bios choose to boot up from a stick. Do I need grub if linux is the only OS on my stick? I believe I selected the USB drive I was using but I think the next step asked about `/dev/sdX` which I left as blank (didn't I just say install for that drive...). I'm not sure how to know which sdX it is because I'm install from a USB stick as well with the same name.


title: Can I use shortcuts inside a repository for yum?

text: I'm creating a repository for distributing specific software. I want to be able to store old versions of the software in the repository, but I'd like the users of the repo to not need to specify a version to download the latest. Can I use a shortcut in the directory that simply points to the latest version? Or must a create a second copy of the latest software? As an example, say I had a package (.rpm) called "example", and I had versions "1.0.0" and "1.1.0". I would like the user to be able to specify their version by:               yum install example 1.0.0      or               yum install example 1.1.0      and if they simply:               yum install example      They would get version "1.1.0", the latest. So if there were a shortcut in the repo called "example", and this shortcut pointed to "example 1.1.0" would "yum install example" install that file? I don't mind updating the shortcut when adding a new version, I'm just wondering if it would work to avoid duplicating the most recent file. Will yum automatically pick the most recent version without a version specification?


title: Running a script every time a new kernel is installed

text: I'm currently having to recompile my wireless driver from source every time I get a new kernel release. Thinking it would be awesomely hackerish to automate this process, I symlinked my Bash build script to `/etc/kernel/postinst.d`. I've verified that it does, in fact, run when the latest kernel update is installed, but one thing is left as a problem: the driver compiles for the existing running version of the kernel. For example, if I'm running 3.0.0-14-generic and `apt-get dist-upgrade` to kernel 3.0.0-15-generic, then it compiles for kernel 3.0.0-14-generic, which doesn't really help me at all. Is there a way to tell from my kernel postinst script which version of the kernel has been installed so I can pass it to my `make` call so it can be compiled for the newly installed kernel?


title: avconv/ffmpeg output through /dev/ttyAMA0

text: I tried to pipe streaming video from video4linux2 webcam connected to a Raspberry Pi through /dev/ttyAMA0 to a computer using an Arduino as a intermediary. First of all, is it possible? Because I was thinking about with the max baud base from ttyAMA0 (115200bps) I tried to make a fifo using mkfifo inside tty and does not works, I tried to use avconv documentation to learn how to make properly the pipe inside the encoding line like:               avconv -f video4linux2 -i /dev/video0 -somestuff -f mpeg2video pipe:1 | cat > serial:/dev/ttyAMA0:115200/webcam.mpg      Also doesn't works. *ttyAMA0 is made executable whith chmod and I have the permisions commenting the /etc/inittab corresponding line. Another option was:               avconv -i in ${encoding options} -f mkv /dev/serial      And so on. In than case the output was "'mkv' is not a suitable output format". I had defined the serial before the command line. It has to be with the UART pins because i can only use the USB to connect the Arduino to the computer and I cannot use an usbnet. Anyone could help me? It doesn't matter if the answer is extremely simple and it could offend me. I need some help.


title: cgroups: blkio.weight doesn't seem to have the expected effect

text: I've got 2 LXC containers with these cgroup settings:               lxc.cgroup.blkio.weight = 200     lxc.cgroup.cpu.shares = 200          and          lxc.cgroup.blkio.weight = 800     lxc.cgroup.cpu.shares = 800      I have verified in `/sys/fs/cgroup/blkio/lxc/test1-lxccontainer/blkio.weight` is indeed set to 200 on the host OS. I have verified that `cpu.shares` are split up 80% to container 1 and 20% to container 2. But when I run this command in both containers:               # write a 10GB file to disk     dd bs=1M count=10000 if=/dev/zero of=1test conv=fdatasync      I ran a similar test on reads:               davidparks21@test-cgroups1:/tmp$ time sh -c "dd if=1test of=/dev/null bs=1M"     10000+0 records in     10000+0 records out     10485760000 bytes (10 GB) copied, 37.9176 s, 277 MB/s          real    0m37.939s     user    0m0.004s     sys     0m24.306s      The IO speeds see in `iotop` on the host OS are virtually the same between the two containers. I expected to see container 2 command 80% of the IO access in this case.


title: lost directory cannot find it with testdisk

text: I was moving a directory on my parents computer using a teamviewer session. The session responds slow and somehow, when I was moving the directory (location: /sdb/synchronisatie/nel/) something went wrong I guess but now the directory is gone! And I cannot find it anywhere... I'm sure I've used 'paste' but I think nothing happened and the directory hasn't been pasted. Now the directory is gone as I said and I cannot find it anymore. I tried testdisk but testdisk didn't list the directory. The directory contains all the files from my mother so I am really hoping I can find this directory again. What can I do?


title: Booting from usb fails as I try to install elementary OS on my PC

text: I'm trying to install Elementary OS Luna on my PC. The problem is that every time I try to boot from my usb, on which I've got the OS installation files, it fails. First I press `F12` to get to the Boot Manager, then I select the usb-hdd option and press enter. Then I see a black screen with some log messages and in the middle of the screen there's a message saying "KingstonDataTraveller (- this is the name of the USB I'm using) capability - disabled". It looks like my BIOS can't open the files on the USB or I might have to change some other BIOS settings. This screen stays for a few seconds and then my Windows 7 load again. Please help me I can't see what's wrong. I've created the bootable USB by using UNetbootin. This shouldn't be a problem, should it?


title: How to check which process is using a given file descriptor?

text: Somewhere in the middle of my application, the framework I'm using (`ROOT`) gives me the following error:                *** Break *** write on a pipe with no one to read it     SysError in <TUnixSystem::UnixSend>: send (Broken pipe)     SysError in <TUnixSystem::DispatchOneEvent>: select: read error on 24      (Bad file descriptor)      How can I check which process is using this file descriptor, preferably without `sudo`?


title: locale-gen command in centos6

text: In my bare centos6.5 system, which is a `docker` container, `en_US.utf-8` locale is missing:               bash-4.1# locale -a     C     POSIX      Normally in Ubuntu there is command `locale-gen` to do this:               # locale-gen en_US.UTF-8     # echo 'LANG="en_US.UTF-8"' > /etc/default/locale      How can I do this in centos 6.5?


title: Do savestate before power off host (Virtualbox/OpenSUSE)

text: I was working on a old version of VirtualBox (3.2.6) in which I can edit `/etc/sysconfig/vbox`, there I can add as many VM to start when the host boots up. Now on the this new version 4.2.6 can't edit that file because it's no longer supported. Checking on the forum I found something but I does not work.               cat /etc/default/virtualbox     # /etc/default/virtualbox     #     # -------------------------------------------------------------------------------------------------     # In the "SHUTDOWN_USERS" list all users for which a check for runnings VMs should be done during     # shutdown of "vboxdrv" resp. the server:     # SHUTDOWN_USERS="foo bar"     #     # Set "SHUTDOWN" to one of "poweroff", "acpibutton" or "savestate" depending on which of the     # shutdown methods for running VMs are wanted:     # SHUTDOWN="poweroff"     # SHUTDOWN="acpibutton"     # SHUTDOWN="savestate"     # -------------------------------------------------------------------------------------------------     #     #SHUTDOWN_USERS="foo bar"     #SHUTDOWN="savestate"     VBOXAUTOSTART_DB=/etc/vbox     #VBOXAUTOSTART_CONFIG=/etc/vbox/vbox.cfg     VBOXAUTOSTART_CONFIG=/etc/vbox/vboxauto.conf      this is `vboxauto.conf`:               cat /etc/vbox/vboxauto.conf     # Default policy is to deny starting a VM, the other option is "allow".     default_policy = deny          root = {         allow = true     }      then I do this:               VBoxManage setproperty autostartdbpath /etc/vbox      and this               VBoxManage modifyvm <the_machine> --autostart-enabled on      when i try to look at the status               rcvboxes status     Virtualbox machines: no virtual machines running.                                                                                skipped     vboxes.service - LSB: Autostart Virtual Box VMs               Loaded: loaded (/etc/init.d/vboxes)               Active: active (exited) since Tue, 2013-02-05 23:34:57 UYST; 32min ago              Process: 30764 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS)               CGroup: name=systemd:/system/vboxes.service          Feb 05 23:34:57 my.machine vboxes[30764]: Starting Virtualbox machines: no virtual machines configured..unused     Feb 05 23:34:57 my.machine systemd[1]: Started LSB: Autostart Virtual Box VMs.      why won't VirtualBox see my virtual machines to leave them headless? **Edit 30 - may** I did configure it in _/etc/sysconfig/vbox_ , but get this when I run it under init.d               /etc/init.d/vboxes status     Virtualbox machines: no virtual machines running.                    skipped     vboxes.service - LSB: Autostart Virtual Box VMs               Loaded: loaded (/etc/init.d/vboxes)               Active: inactive (dead) since Sat, 2013-02-02 22:00:49 UYST; 1 day and 21h ago              Process: 4155 ExecStop=/etc/init.d/vboxes stop (code=exited, status=0/SUCCESS)              Process: 3955 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS)               CGroup: name=systemd:/system/vboxes.service      I did a small test and move the script to /root/bin an it worked just fine.               ./vboxes_test status      test (user: root):                                       running (since 2013-02-04 21:55:46)                                                        running      test (user: root):                                       running (since 2013-02-04 21:55:46)      **small edit:** So far this is what I was talking about.... anyway did the old configuration (add the vm in /etc/sysconfig/vbox) and **now then I reboot the host the vms also do that.** The thing is I don want the vms to reboot when I poweroff the host: t* _he vms must do savestate before the host shutdown_ *. **small_coment:** If I previous do a savestate and the reboot the host.. the vms do work as I wanted... Is there any info to make it work?


title: How to change themes for GNOME3

text: I have installed live desktop. How can I change it's theme?


I host about 200 websites and I have noticed that some got huge error_log files. I would like to see which ones are consuming the most space so I can take a look on them and solve the error so they stop increasing in size so fast. How can I find the biggest "error_log" files listed by location and size?


title: Readonly in mounted partition's root

text: /etc/fstab     UUID=<someuuid> /mnt/data ext4 defaults,relatime,data=ordered   0 2      and               /mnt$ ll     drwxr-xr-x 2 manuel users 4096 15. Apr 18:25 data     /mnt$ mount -a     /mnt$ ll     drwxr-xr-x 4 root root 4096 14. Apr 22:54 data     /mnt$       I dont get it. What is the problem with this? I want to have write permissions in /mnt/data. In subfolders I can write. It is just in this rootfolder. Why does the owner of the folder change?


title: How do I check if I have packet socket support enabled in my distro's kernel?

text: How do I check that packet socket support has been compiled into my kernel? I'm running Crunchbang, a Debian-based distribution.


title: How can I check if a gzipped file is empty?

text: Is there a quick way to check if a gzipped file is empty, or do I have to unzip it first? example:               $ touch foo     $ if [ -s foo ]; then echo not empty; fi     $ gzip foo     $ if [ -s foo.gz ]; then echo not empty; fi     not empty     $ wc -l foo.gz           1 foo.gz


title: Exchange NDR Hybrid Setup

text: NDR changed within hybrid messaging solution . Hybrid of Exchange Server + open sources base Mail Server (using postfix , Cyrus IMAP , etc) unable to view "Email id Or Users ID" in Bounced mail/NDR when Exchange user sending mail to Group ID which is on Linux Base Server. Exchange users didn't understand from which users & how many users mail bounced . Thanks Daya


title: Graphics driver for Linux Mint 16 on Acer Aspire 5100 laptop

text: I have a 6-7 year old Acer Aspire 5100 laptop on which I installed Linux Mint 16 recently. Everything works fine except that the screen flickers badly whenever the computer resumes from sleep (e.g., close the lid and open it back up). I did some google search and it seems to be a graphics driver problem. However I couldn't find the specific graphics driver for this model. The sticker on the computer says "Graphics by ATI RADEON XPRESS 1100". The following is the output from `more /etc/*-release`               /etc/lsb-release     ::::::::::::::     DISTRIB_ID=LinuxMint     DISTRIB_RELEASE=16     DISTRIB_CODENAME=petra     DISTRIB_DESCRIPTION="Linux Mint 16 Petra"     ::::::::::::::     /etc/os-release     ::::::::::::::     NAME="Ubuntu"     VERSION="13.10, Saucy Salamander"     ID=ubuntu     ID_LIKE=debian     PRETTY_NAME="Ubuntu 13.10"     VERSION_ID="13.10"     HOME_URL="http://www.ubuntu.com/"     SUPPORT_URL="http://help.ubuntu.com/"     BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"      This is the output using `lspci`               00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RS480/RS482/RS485 Host Bridge (rev 10)     00:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RC4xx/RS4xx PCI Bridge [int gfx]     00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RC4xx/RS4xx PCI Express Port 1     00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RC4xx/RS4xx PCI Express Port 2     00:12.0 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 Serial ATA Controller (rev 80)     00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 USB Host Controller (rev 80)     00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 USB Host Controller (rev 80)     00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 USB2 Host Controller (rev 80)     00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 SMBus Controller (rev 83)     00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 IDE Controller (rev 80)     00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 High Definition Audio Controller (rev 01)     00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 PCI-ISA Bridge (rev 80)     00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 PCI-PCI Bridge (rev 80)     00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration     00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Address Map     00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] DRAM Controller     00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Miscellaneous Control     01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS482M [Mobility Radeon Xpress 200]     06:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)     06:02.0 Ethernet controller: Qualcomm Atheros AR2413/AR2414 Wireless Network Adapter [AR5005G(S) 802.11bg] (rev 01)     06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)     06:04.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)     06:04.2 SD Host controller: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)     06:04.3 FLASH memory: ENE Technology Inc FLASH memory: ENE Technology Inc: (rev 01)     06:04.4 FLASH memory: ENE Technology Inc SD/MMC Card Reader Controller (rev 01)      I really need some help here. Any help is greatly appreciated.


title: Is it possible to use libc at the bootloader stage itself?

text: I would like to use some the functions given by libc at the boot loader stage itself. Is it possible to get them at that stage of loading?


title: Fetching all Git repositories in the background

text: I'm thinking about setting up a cronjob for fetching all my repositories every once in a while, to have the current status ready in case I'm offline. Something like the following (wrapped for better readability):               find $HOME -name .git -type d -printf "%h\0" |       parallel --gnu -0 --delay 0.2 --jobs 100 --progress \       'cd {}; git fetch --all --quiet'      I don't really care what happens if the fetch fails -- it might succeed the next time. Perhaps error output could be logged. My questions are:   * What if the background process fetches into a Git repository while I'm committing to it?   * Can you recommend other switches to `parallel` to make this really fail-safe?


title: Ubuntu freeze after upgrade installation interrupt

text: I was upgrading my Ubuntu distro and shut down the laptop in the middle of the installation process. Upon restart, I only get a black screen with these messages:               Starting Hardware RNG entropy gatherer daemon: (Hardware RNG device inode not found)     /etc/rc2.d/S21rng-tools: Cannot find a hardware RNG device to use.     saned disabled: edit /etc/default/saned     * Restoring resolver state... [OK]      And then it waits there forever. Is there any way to restore Ubuntu or does it need a fresh install? I would hate to have to reinstall and reconfigure my development environments all over again.


title: Linux btrfs how to remove unexistent filesystem from list?

text: I'm giving a try to btrfs. As newbie I did some mistakes, which are good for learning! I created several btrfs filesystems upon different devices (sdX, loop, lvm, etc). During these tests, I removed (abruptly) some or all devices which were part of a btrfs filesystem (fs were unmounted first). But now, command `btrfs show` still shows filesystems UUID and list of devices. I understand that I should have done a `btfrs device del` BEFORE removing devices... But where does btrfs stores its list of handled filesystems? Is there a conf file somewhere? A special command in btrfs-tools? I didn't come with a comprehensive answer reading wiki and tutos... It is said that we can recover a dead filesystem and mounting it with `mount -o recovery /dev/yourBTFSvolume /mount/point` but that implies metadata/data and related devices still exist, which isn't the case here. Here I do not attempt to recover data, I just want to clean btrfs management. Thanks for any tip.


title: Installed root certificate authority doesn't appear to be working?

text: * OS : archlinux   * Openssl dir : /etc/ssl I just installed a root certificates authority. The `xxx.pem` and `yyy.0` file exists in the `/etc/ssl/certs` folder. Then I verify the `vimeo.com:443` via bash:               $ openssl s_client  -connect vimeo.com:443      It shows:               SSL-Session:         Protocol  : TLSv1.2         Cipher    : RC4-MD5         Session-ID: 001635EF0132A25577F3799825F2698A8FEDCDF916393DB44E9FCC5701D5E310         Session-ID-ctx:          Master-Key: C5AA72B1E0A805AA950D1E0EFC7565F0EF3949618927EA84081B65E65B664C7AB803757CFF1CB12333CB8FC7D8298BA6         Key-Arg   : None         PSK identity: None         PSK identity hint: None         SRP username: None         Start Time: 1394981067         Timeout   : 300 (sec)         Verify return code: 20 (unable to get local issuer certificate)      And if I explicitly set the CA file:               $ openssl s_client  -connect vimeo.com:443 -CAfile XXX.pem          SSL-Session:         Protocol  : TLSv1.2         Cipher    : RC4-MD5         Session-ID: BF58BED9C13FF42E5DDEBC938CED703CD81A96EC59442B91FC6669D31D13E510         Session-ID-ctx:          Master-Key: 197D80168908A8491C26F27B1C5AAA29BE2DC9CCBB8B840BAA45FCE683BDDB95133E58A48EDAC5AF820C97C948D436E2         Key-Arg   : None         PSK identity: None         PSK identity hint: None         SRP username: None         Start Time: 1394981110         Timeout   : 300 (sec)         Verify return code: 0 (ok)      Have I successfully installed the certificates? Why must I specify the CA file?


title: Can Linux support a "Ralink corp. RT2800 802.11n PCI" (maybe a RT2860STA?) in an Asus EEE 901 netbook

text: OK, I know that this isn't going to be straightforward, but I'd really like to get it working. About 18-24 months ago, my Asus EEE 901 netbook was working fine - running Ubuntu - and I let it 'upgrade' as the update manager suggested. The wi-fi subsequently failed - and, while busy with other things, fiddled and 'hosed' the OS install. The netbook stayed in a cupboard until this weekend... when I overwrote the drives using /dev/zero - then installed a completely fresh copy of Linux Mint 12. On the fresh install, I'm still having problems with the Wi-Fi, though everything else is fine. With the default Linux Mint install, the first indication of a problem comes from this entry in /var/log/syslog               ... [5.048933] rt2800pci 0000:01:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19     ... [5.048980] rt2800pci 0000:01:00.0: setting latency timer to 64     ... [5.062119] phy0 -> rt2800_init_eeprom: Error - Invalid RF chipset detected.     ... [5.062134] phy0 -> rt2x00lib_probe_dev: Error failed to allocate device     ... [...     ] rt2800pci 0000:01:00.0: PCI INT A disabled      Following some advice found online, I blacklisted rt2800pci by entering the following into /etc/modprobe.d/rt2800.conf               blacklist rt2800pci     blacklist rt2800lib      This left me with a working install - but no wi-fi support. I then set out to identify the correct driver. The relevant output from lshw is:               *-network UNCLAIMED         description: Network controller         product: RT2800 802.11n PCI         vendor: Ralink corp         physical id: 0         bus info: pci@0000:01:00.0         version: 00         width: 32 bits         clock: 33MHz         capabilities: bus_master cap_list         configuration: latency=0         resources: memory:fbef0000-febfffff      If I then use lspci to investigate further with "lspci -vs 01:00.0"               01:00.0 Network controller: Ralink corp. RT2800 802.11n PCI             Subsystem: Ralink corp. Device 2860             Physical Slot: eeepc-wifi             Flags: bus master, fast devsel, latency 0, IRQ 11             Memory at febef0000 (32-bit, non-prefetchable) [size=64K]             Kernel modules: rt2800pci      A little more searching online suggested that, rather than use the rt2800pci driver for a 2860 device, I needed to use the rt2860sta driver. I don't have one of those installed with the generic kernel. I visited http://www.ralinktech.com/en/04_support/support.php?sn=501 - and downloaded "RT2860PCI/mPCI/CB/PCIe(RT2760/RT2790/RT2860/RT2890)" - and followed the instructions in README_STA. When I used insmod to install the new driver, I got an ra0 device reported... and network-manager identified that the netbook had a wireless capability. Unfortunately, that's where things fell apart. None of the local infrastructure-mode access points were found by the network-manager... and when I tried to connect to one by explicitly giving its name... no connection was able to be established - and ifconfig gave some worrying output... The Mac address looked bogus 00:00:ff:ff:ff:ff - and thousands of 'overruns'. So... The question: Does Linux still support the Ralink driver in my Asus EEE 901? If so, which is the correct driver to use - and how do I configure that driver? **Requests** Output of "lspci -n" (I've no idea what might be useful in this...)               00:00.0 0600: 8086:27ac (rev 03)     00:02.0 0300: 8086:27ae (rev 03)     00:02.1 0380: 8086:27a6 (rev 03)     00:1b.0 0403: 8086:27d8 (rev 02)     00:1c.0 0604: 8086:27d0 (rev 02)     00:1c.1 0604: 8086:27d2 (rev 02)     00:1c.2 0604: 8086:27d4 (rev 02)     00:1c.3 0604: 8086:27d6 (rev 02)     00:1d.0 0c03: 8086:27c8 (rev 02)     00:1d.1 0c03: 8086:27c9 (rev 02)     00:1d.2 0c03: 8086:27ca (rev 02)     00:1d.3 0c03: 8086:27cb (rev 02)     00:1d.7 0c03: 8086:27cc (rev 02)     00:1e.0 0604: 8086:2448 (rev e2)     00:1f.0 0601: 8086:27b9 (rev 02)     00:1f.2 0101: 8086:27c4 (rev 02)     00:1f.3 0c05: 8086:27da (rev 02)     01:00.0 0280: 1814:0601     04:00.0 0200: 1969:1026 (rev b0)      If I return to the default configuration - with nothing blacklisted, and run "lsmod | grep rt", I get this:               parport_pc             32114  0      rt2800pci              18340  0      rt2800lib              48717  1 rt2800pci     crc_ccitt              12595  1 rt2800lib     rt2x00pci              14202  1 rt2800pci     rt2x00lib              48114  3 rt2800pci,rt2800lib,rt2x00pci     mac80211              272785  3 rt2800lib,rt2x00pci,rt2x00lib     cfg80211              172392  2 rt2x00lib,mac80211     eeprom_93cx6           12653  1 rt2800pci     parport                40930  3 parport_pc,ppdev,lp      From this I don't see any obvious conflicts - advice as to what else to look for welcome. **Even more info...** I've opted to take a screwdriver to my 901, and removed the Wi-Fi card. On the back of it, there's a label that suggests it's not a 2800 series at all - but, rather, it's an RT2700E. Perhaps, if Linux is wrongly detecting it as being a 2800 series, that's the root of my troubles? ![Picture of front of card](http://i.stack.imgur.com/w6F0o.jpg) ![Picture of back of card](http://i.stack.imgur.com/lEutP.jpg)


title: Pattern matching across multiple lines

text: What is a quick and easy way to validate if the pattern "301 domaname.com 200" is present within BASH when spread across multiple lines of output? I was using something like the following:                awk '/301|domain.com|200/'      pcregrep -M '301|domain\.com|200'      but the order doesn't matter. I'm not sure how to state it so it does. What I thought would work apparently isn't catching the line endings.               pcregrep -M '301.*domain\.com.*200'      **Background:** I'm building a small mod_rewrite server and I need a way to monitor what domains are getting redirected to what destinations. As a result I'm assembling a small Nagios check script that will handle this for me. What I have so far is the following:               curl qa-mod-rewrite.domain.com -i -I -L          HTTP/1.1 301 Moved Permanently     Via: 1.1 GREGORY     Connection: close     Proxy-Connection: close     Date: Thu, 14 Nov 2013 16:35:19 GMT     Location: http://qa.domain.com/     Content-Type: text/html; charset=iso-8859-1     Server: Apache/2.2.3 (CentOS)          HTTP/1.1 200 OK     Via: 1.1 GREGORY     Connection: Keep-Alive     Proxy-Connection: Keep-Alive     Content-Length: 56772     Expires: -1     Date: Thu, 14 Nov 2013 16:35:03 GMT     Content-Type: text/html; charset=utf-8     Server: Microsoft-IIS/7.5     Cache-Control: no-cache, no-store     Pragma: no-cache     X-AspNet-Version: 2.0.50727     Set-Cookie: cfcausa.qa#sc_wede=1; path=/     Set-Cookie: ASP.NET_SessionId=i4z1c4ahqoiw13552z413hbs; path=/; HttpOnly     X-Powered-By: ASP.NET


title: How can I pass in a parameter to sed?

text: To be more precise - how can I pass in a parameter to a program that then calls sed - how can I 'pass' that parameter along? I have a file 'source_code.sc'.   I have a sed script "find_expect":               #n     /expect/{     =     p     }      that I invoke from inside a program that's looping through files with               sed -f find_expect.= source_code.sc      that print finds with their line numbers, such as               712           expect(it).to be_true      However that search is hard-coded to search for "expect" How can I change this so that the search text itself is also passed. I am also looping through files with find so sed is currently invoked for many files. For example, to search for 'blob' the program looping through files would invoke it with               sed -f find_expect.= "$file_from_loop" source_code.sc 'blob'     # with 'blob' being passed in from the main script     # which would be invoked with `./change_all.sh 'blob'     # I don't pass the file pattern in to this main call as I just     # recursively do all files (that match a pattern) from the current directory down


title: Which Linux file systems for USB sticks?

text: For Linux desktops, when Windows compatibility is not an issue, which file system is preferred for USB sticks? For example ext2, ext3, ext4, btrfs, nilfs, or even NTFS? Would journaling wear them out prematurely? I heard it's better to mount with noatime option, but how to set it if it's used across many computers?


title: Recover deleted file that is currently being written to

text: I started downloading a big file and accidently deleted it a while ago. I know how to get its current contents by `cp`ing `/proc/<pid>/fd/<fd>` but since the download is still in progress it'll be incomplete at the time I copy it someplace else. Can I somehow salvage the file right at the moment the download finishes but before the downloader closes the file and I lose it for good?


title: Changing file permissions of auto-mounted hot-plugged FAT32 USB partition

text: Linux can read from, write to and execute files (vfat driver) formatted as FAT32. Auto-mounting (in my case Ubuntu) leads however to all files owned by root and not executable. By changing the file /etc/fstab these permissions can be changed. Indeed files can now be owned by any user and can be made executable by everyone. However this is a static solution. The USB disk has to be plugged in on start-up. Re- plugging the same stick restores the old root-owned situation. To get the partition re-owned by a user and executable by everyone a "umount" and a "mount" has to be performed. This is irritating, not in the last place because "mount" requires root privilege. Is it possible to create a situation than when a USB stick with a FAT32 partition on it is hot-plugged into a running Linux system that FAT32 partition is auto-mounted with such permissions that world can write to it and execute files on it?


title: Resizing terminal splits

text: I'm trying to find a way to manipulate my terminal splits In my `.vimrc` I have `set width=78` When I have vertical splits and change back and forth the active split is at least 78 chars. It squishes any inactive splits to allow the active split it's set width. Right now I use iterm2. I am using iterm2's vertical split ability. Can someone suggest a way to to resize the active split to have a minimum amount of chars per line? I often do my vim on the right and have a second shell split on the left. I will accept solutions that require splitting the shell some way other than with iterm2's split key combos. The splits have a border between them that can be dragged to resize. I have found a way to save the screen arrangement but there isn't a way to restore it as far as I can tell. Restoring the screen arrangement opens a new instance of iterm2. Thank you


title: Responsive and Attractive UI: IDE

text: I'm using Kubuntu but I'm looking for an IDE/text editor that is responsive and has a UI unlike others. For example, I use this on Windows 8: http://apps.microsoft.com/windows/en-us/app/code- writer/5149f454-94a7-40bc-90ef-eafd38355079 I am looking for a text editor similar to that for Linux that their main purpose is attractive UI and responsiveness.


title: Changing the default installation directory?

text: Is there a way to change the directory where applications are installed? I mean instead of `/usr/bin` can I change the settings to install them at `/usr/local/bin` or something like that, as long as they are in the **PATH** variable? Currently using Ubuntu 14.04 64 bit. If the solution depends upon the package manager, is there any generic approach? Which configuration file(s) should I target?


title: compare columns in a one file and print the count of matches

text: I have a CSV file that contains two columns. I want to compare the two columns and print the number of matches. `file1`               M,M     A,M     A,A     M,A      Expected output: If the first columns in the first row is the same, I want to print the second column in the output file, i.e.               M (for first line)     0 (for second line not same, zero value)     A (for third line)     0 (for fourth line not same, zero value)


title: Modifying networking and daemons using systemd

text: I'm trying to follow this guide however, it appears `rc.conf` is discontinued and `systemd` has taken over. How can I modify the networking and daemons shown in step one using systemd? Any help is appreciated.


title: How can I format the output of stat to contain the null character?

text: I want to delimit file paths by using the null character (NUL, \0, ...) just like for example find -print0 does. I'm using bash and I tried the following without success:               find $1 -print0 > dircontent     cat dircontent | xargs -0 stat --format="%X %Y %Z %f %u %g %i %h \0%n\0%s" > dirstats      Seems like I', getting a literal '\' and a '0' instead of a null character.


title: how to select specific range of line & count the specific occurence of the first charcter w.r.t. each unique second charcter?

text: Hi I have a file like this :               #0     0:()     1b:cg*b     1c     0:cg     xe     #4     0:()     0b:cg*b     xc     0:cg     1e     #8     0:()     0b:cg*b     xc     0:cg     xe     #12     1b:cg*b     xc     0:cg     0e     #16     xb:cg*b     1c     xe     #20     1:()     xb:cg*b     xc     1:cg     1e     #24     x:()     xb:cg*b     xc     xe     #28     0:()     1b:cg*b     0c     x:cg     0e     #29     0:()     0b:cg*b     1c     x:cg     xe     #32     0:()     1b:cg*b      Where `#0` means at time 0 , `#8` means at time 8 & so on. Now I want to print the portion of this file based on a given time range like 2 to 30 (I want to enter it manually). Here in this file time 2 & 30 do not exist so the output should be from the next time after 2 (#4) till the line before the next time after 30 (#32) (result temp1 = line 7 to 50) temp1 output should be like this :               #4     0:()     0bd*b     xc     0:cg     1e     #8     0:()     0bd*b     xc     0:cg     xe     #12     1bd*b     xc     0:cg     0e     #16     xbd*b     1c     xe     #20     1:()     xbd*b     xc     1:cg     1e     #24     x:()     xbd*b     xc     xe     #28     0:()     1bd*b     0c     x:cg     0e     #29     0:()     0bd*b     1c     x:cg     xe      here :() , bd*b , c , :cg , e are the strings after first character of column 2. And 0 , 1 , x are the first character now temp2 output should be like this:                       4 8 12 16 20 24 28 29     :()     0 0 -  -  1  x  0   0     b:cg*b  0 0 1  x  x  x  1   0     c       x x x  1  x  x  0   1     :cg     0 0 0  -  1  -  x   x     e       1 x 0  x  1  x  0   x      Now I have to count the no. of x for each entry in column 1 of the temp2 output the rule for it:   1. only consider x before which there is 0 or 1   2. don't count x before which there is another x   3. if a x is present at the starting of time range then count it   4. if somehow there is any other character other than 0,1,x in temp2 output than it should ignore this.  So, the final output should be like this :               name     count x     :()      1     x     b:cg*b   1     x     c        2     x     :cg      1     x     e        4     x      Note : I just want the final output anyhow, I don't need to keep the intermediate temp output file, but if the temp file will be kept then this will be an advantage for me. Obviously I don't want any blank lines in any output file if any blank line is present in the input file, it should be removed) I am new to scripting , I wrote a long tcl script but its run time is very long so I want an awk or sed solution.


title: UFW is blocking DNS

text: I am configuring the security in my server. For easier the manage at the firewall, I installed the UFW. I did some settings in the UFW and I allowed some ports. Therefor when I enabled it the DNS services not responding. I tried running the command `DIG www.domain.com.br` to test the DNS but it did not succeed. This command run without problems when the UFW is disabled. I already allowed the 53 port (TCP and UDP) but the DNS does not work. My UFW settings:               Status: active     Logging: on (low)     Default: deny (incoming), deny (outgoing), disabled (routed)     New profiles: skip          To                         Action      From     --                         ------      ----     21/tcp                     ALLOW IN    Anywhere     16/tcp                     ALLOW IN    Anywhere     443/tcp                    ALLOW IN    Anywhere     80                         ALLOW IN    Anywhere     53                         ALLOW IN    Anywhere     465                        ALLOW IN    Anywhere     25/tcp                     ALLOW IN    Anywhere     22                         ALLOW IN    Anywhere     21/tcp (v6)                ALLOW IN    Anywhere (v6)     16/tcp (v6)                ALLOW IN    Anywhere (v6)     443/tcp (v6)               ALLOW IN    Anywhere (v6)     80 (v6)                    ALLOW IN    Anywhere (v6)     53 (v6)                    ALLOW IN    Anywhere (v6)     465 (v6)                   ALLOW IN    Anywhere (v6)     25/tcp (v6)                ALLOW IN    Anywhere (v6)     22 (v6)                    ALLOW IN    Anywhere (v6)


title: How to install JRE on firefox with fedora (64bits)

text: What do I need to run Java web applications on firefox with my 64bits fedora 17? I can't pass this test but I have installed the x64 rpm from there. What is missing? Additional note: I tried to follow these instructions (linking the libnpjp2.so) but then the JRE test crashed firefox.


title: How can I stop ls from descending into directories, similar to prune for find?

text: If I type `ls *ro*` I also get files in subdirectories that match the `*ro*` pattern.   Is there any option for ls similar to prune? Ideally a flag, otherwise perhaps an exec?


title: dependency error when run apt-get -f install in debian squeeze

text: I can't install or remove packages in Debian. When I type `apt-get -f install` to fix the problem I get this error:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Correcting dependencies... Done     The following packages were automatically installed and are no longer required:      libgmp3c2 libpython2.6 libssl-dev python-gnupginterface python2.6-dev zlib1g-dev     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:         python-pkg-resources python-setuptools         Suggested packages:       python-distribute-doc     The following packages will be upgraded:       python-pkg-resources python-setuptools     2 upgraded, 0 newly installed, 0 to remove and 190 not upgraded.     1 not fully installed or removed.     Need to get 0 B/323 kB of archives.     After this operation, 989 kB of additional disk space will be used.     Do you want to continue? [Y/n] y     Reading changelogs... Done     dpkg: error processing /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'python-setuptools':     `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')     dpkg: error processing /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-pkg-resources':      `Depends' field, invalid package name `python:any': character `:' not  allowed (only letters, digits and characters `-+._')     Errors were encountered while processing:      /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb      /var/cache/apt/archives/python-pkg-resources_3.4.1-1_all.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      I've searched a lot but can't solve this problem.


title: File is mysteriously empty. Options to recover?

text: I have seen several posts about recovering deleted files, but this situation is different. My wife had a file called Journal.odt in which she kept a lot of important personal information such as special memories about our kids. The other day when she tried to open it in OpenOffice it complained about the format. I had her hit cancel and back out. When I `cat` the file it is completely empty. `ls` says the file is 0 bytes. Had she accidentally selected all of the text in the file, hit backspace and saved it there would still be the OpenOffice meta information in the file. I immediately shut her laptop down to prevent making any more changes to disk until I can think of something to do. I have done some complicated things in the past such as using `dd` to recover raw text off the disk but I have no idea what to do here. Since odt files aren't flat text I can't just pipe the whole disk through grep. Any suggestions would be greatly appreciated. Also if anyone has any insight as to what might have gone wrong I would love to hear it. Thanks


title: Live program output monitoring tool

text: I would like to know if there is a tool that would enable you to watch how the program output changes live. Something like `tail -f` but instead of monitoring the file changes, it would repeatedly call some executable and display it live. For example, if the tool is caled `foobar` and I would call `foobar 'ps -Al'`, it would behave kind of like `top` - displaying the output in real time.


title: scp wildcard not working in zsh

text: I have switched over to zsh, and it is working fine. One strange thing, when I try to scp with a * wildcard, it does not work, and I have to drop into bash. The second command below works fine. Any ideas on why this would be and how to fix it?               ~/dmp ⌚ 16:06:10     $ scp abc@123:/home/se/exports/201405091107/* .     zsh: no matches found: root@uf3:/home/se/exports/201405091107/*          ~/dmp ⌚ 16:06:53     $ bash      sean@seanlaptop:~/dmp$ scp abc@123:/home/se/exports/201405091107/* .


title: Samba file share shows user directory

text: I recently set up a Samba file share on Raspian and when I login to it from a Windows, it shows the home directory for the logged in user. Below is an excerpt from my `/etc/samba/smb.conf` file               [Backup]     comment = Backup Folder     path = /media/USBHDD/shares     valid users = @users     force group = users     create mask = 0660     directory mask = 0755     read only = no      Below is a screen shot to show what I am experiencing: ![enter image description here](http://i.stack.imgur.com/25OYY.png) My questions are:   1. Is this common? (I don't want user's home directories to be displayed, just the backups)   2. How can I make it so that the user's home directory is _not_ displayed?


title: Change Apache httpd "Server:" HTTP header

text: One of the HTTP headers that the Apache `httpd` sends back with response data is "Server". For example, my web server machine is relatively up-to-date Arch Linux. It sends back headers closely resembling the following:               HTTP/1.1 404 Not Found     Date: Thu, 10 Apr 2014 17:19:27 GMT     Server: Apache/2.4.9 (Unix)     Content-Length: 1149     Connection: close     Content-Type: text/html      I have `ServerSignature off` in `/etc/httpd/conf/httpd.conf`, but the "Server:" header still appears. I have experimented with mod_headers. I have it enabled, and I've tried a few things:               <IfModule headers_module>     Header set ProcessingTime "%D"     Header set Server BigJohn     </IfModule>      After stopping and starting `httpd` with the above configuration, the HTTP headers include something like `ProcessingTime: 1523`, but the "Server:" header line remains unchanged. So I know that "mod_headers" is installed and enabled, and working, but not as I desire. I see that something called "mod_security" claims to do this, but I don't want all the rest of the baggage that mod_security carries with it. **UPDATE:** Once you get `mod_security` installed, you only need a few directives:               <IfModule security2_module>     SecRuleEngine on     ServerTokens Full     SecServerSignature "Microsoft-IIS/6.0"     </IfModule>      That's for `mod_security` 2.7.7


title: Difference between Ubuntu and Linux Mint

text: Can someone please tell me the differences between Ubuntu and Linux Mint ? I thought they were almost the same thing until I downloaded Ubuntu 13.10 versions of softwares for my Linux mint 16 system, and half of them didn't work. (I did that as those are the links I got when I searched for Linux mint versions)


title: How to stop tmux capturing key sequences?

text: My `xterm` is configured to produce this sequence:               Ctrl ~Shift <Key>Tab: string(0x1b) string("[27;5;9~") \n\      Under `tmux` it almost always does not work (sometimes it passes through). What could be the reason?


title: How can I move between words in the command prompt in tcsh in linux?

text: I want a feature like vim's going forward or backwards command `(w,e,ge,b)` etc in the shell prompt. I am using _tcsh_ shell in _Linux_. I would like to go _'n'_ number of words backs or forward etc and do some editing(may be append or replace). How can I do that? It doesn't have to be the exact same commands as vim but how do I achieve the same results in the shell prompt?


title: Can I make a second mouse/keyboard (virtual) for xdotool to use?

text: I have a script running a set of xdotool commands. It only uses half of my screen but I cannot use my keyboard or mouse while it is running due to the number of clicks and typing that is executed. Is there a way to set up a second keyboard/mouse for the xdotool to use without physically having 2 sets of keyboards/mouse? I am using Fedora 20 with a Gnome Desktop Manager.


title: How to make files created by a specific user to have specific permissions by default

text: Here's a sequence of commands and the resulting output:               $ touch testfile     $ stat -c'%a %A' testfile     644 -rw-r--r--      What must I do so that when a user follows that sequence, I get this output instead:               664 -rw-rw-r--


title: Vbox crashes while installing RHEL 6.5

text: I'm using Vbox 4.3.10 to run a RHEL 6.5 vm. Host is Win 8.1. All goes well during installation until the very last moment when I press REBOOT, then VBox crashes. I should mention that the first install (Server mode) was fine! However, I wanted the Desktop mode so I reinstalled RHEL 6.5, this time with the extension pack (Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack) provided by Oracle. Before installing this extension I got a message:                          ![VBox Warning](http://i.stack.imgur.com/pTWP9.png). So it seems I shouldn't have installed this extension....however, the following steps:   * removing the extension   * removing the rhel 6.5 vm   * removing VBox 4.3.10 and cleaning the registry with ccleaner   * reinstalling VBox, version 4.2.24   * reinstalling rhel 6.5   * installing a different Linux: Ubuntu 13.10_x64......... Didn't solve the issue: the VBox crashes right before the REBOOT at end of installation. I can attach the Application Error log from Event Viewer if necessary. Any insights on how to overcome this? 25.4.14 EDIT: Sorry to be gone 5 days. HERE'S the log:(thanks for helping out) Event Xml: 1000 2 100 0x80000000000000 910 Application GolokaDham VirtualBox.exe 4.3.10.0 533315cb MSVCR100.dll 10.0.40219.1 4d5f034a c000041d 000000000003c145 bd0 01cf5ba9bc4b3321 C:\Program Files\Oracle\VirtualBox\VirtualBox.exe C:\Program Files\Oracle\VirtualBox\MSVCR100.dll 453a7db6-c7a3-11e3-825d-bcee7b8a7850 thanks for helping out asaf


title: How to Determine the IP Address of who logged into Root?

text: There are several people with root access to a particular VM I am in charge of. I would like to find out which IP address was used to log into root.


title: Retrieve serial port information of a libvirt domain?

text: I'm trying to retrieve the serial port information, aka `Source Path` of a libvirt domain (using qemu/KVM machine):               Serial Device 1 (Primary Console)       Device type: pty       Source path: /dev/pts/2      But I checked the API reference here and it doesn't seem to support a `Source Path`. Is there any command like `VBoxManage` that can list such information directly? * * * Weird, I'm in the `libvirt` group, I can control (start, stop etc.) the KVM machine with `virt-manager`, `virsh` also shows a `virsh #` prompt. But I'm not able to see anything with `virsh list --all` command, I still have to run that with root privileges.


title: Swap (exchange) two big files in limited environment

text: Let's say I have two flash memory devices 1GB capacity each. Let's also say each device contains one big file ~ 1GB size. Assuming, I have limited (64MB) RAM and no hard disk drive, **what is the shortest way to swap this two files ?** I mean: if file `a` is on device `A` and `b` is on device `B`, I want swap operation to place `a` on `B` and `b` on `A`. I know there is no exact linux tool to do that according to this discussion. I am interested in shortest way to achieve my goal. If that way will be too long, I probably will have to implement my own dedicated solution that will perform swap chunk by chunk, am I right ?


title: Counting number of lines I type in vim

text: I want to track number of lines I write everyday. I want that count to be visible on vim status line. It should look something like `[# lines today | # lines since the beginning]`. A log file that stores those numbers would be nice. How to do that?


title: How to start a second X session?

text: I tried to do it with the command `startx 1`. It seemed to flicker to a different screen momentarily, but then exited. Got the following error:               /usr/bin/xterm: No absolute path found for shell: :1      Any ideas?


title: PlayOnLinux error on application when I change my timezone

text: I have a game (scrolls.com) that I'm running under wine. Everything was OK, until I moved and changed my timezone. Now, if I keep my old timezone it works. But if I change the timezone to something else, I get a black screen and the following error message:               [08/02/13 22:15:47] - Running wine-1.7.0 Scrolls.exe (Working directory : /home/user/.PlayOnLinux/wineprefix/scrolls/drive_c/users/user/Local Settings/Application Data/Mojang/Scrolls)     fixme:iphlpapi:NotifyAddrChange (Handle 0x10ee8d0, overlapped 0x10ee8dc): stub     fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for bias 240, std (d/m/y): 28/04/2013, dlt (d/m/y): 8/09/2013     wine: configuration in '/home/user/.PlayOnLinux//wineprefix/scrolls' has been updated.     fixme:heap:HeapSetInformation (nil) 1 (nil) 0     fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for bias 240, std (d/m/y): 28/04/2013, dlt (d/m/y): 8/09/2013     Mono path[0] = 'C:/users/user/Local Settings/Application Data/Mojang/Scrolls/Scrolls_Data/Managed'     Mono path[1] = 'C:/users/user/Local Settings/Application Data/Mojang/Scrolls/Scrolls_Data/Mono'     Mono config path = 'C:/users/user/Local Settings/Application Data/Mojang/Scrolls/Scrolls_Data/Mono/etc'     fixme:imm:ImmReleaseContext (0x20062, 0x1401c0): stub     fixme:win:EnumDisplayDevicesW ((null),0,0x32f768,0x00000000), stub!     fixme:win:EnumDisplayDevicesW ((null),0,0x32f0a8,0x00000000), stub!     fixme:dxgi:dxgi_output_GetDesc iface 0x143388, desc 0x32f6a4 stub!     fixme:wbemprox:client_security_SetBlanket 0xf6b1d8e0, 0x1431e8, 10, 0, (null), 3, 3, (nil), 0x00000000     fixme:wbemprox:client_security_Release 0xf6b1d8e0     fixme:win:EnumDisplayDevicesW ((null),0,0x32efb8,0x00000000), stub!     fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff     fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff     fixme:d3d9:wined3dformat_from_d3dformat Unhandled D3DFORMAT 0xffffffff     fixme:d3d:debug_d3dformat Unrecognized 0x36314644 (as fourcc: DF16) WINED3DFORMAT!     fixme:d3d:wined3d_get_format Can't find format unrecognized (0x36314644) in the format lookup table     fixme:d3d:debug_d3dformat Unrecognized 0x34324644 (as fourcc: DF24) WINED3DFORMAT!     fixme:d3d:wined3d_get_format Can't find format unrecognized (0x34324644) in the format lookup table     fixme:d3d:debug_d3dformat Unrecognized 0x5a574152 (as fourcc: RAWZ) WINED3DFORMAT!     fixme:d3d:wined3d_get_format Can't find format unrecognized (0x5a574152) in the format lookup table     fixme:d3d:query_init Unhandled query type 0xc.     fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.     fixme:win:RegisterDeviceNotificationW (hwnd=0x20062, filter=0x32fc6c,flags=0x00000000) returns a fake device notification handle!     fixme:win:RegisterRawInputDevices Unhandled flags 0x100 for device 0.     fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!      I read that the issue is due to a mismatch between the timezone in the registry, and the one in the computer. Strangely I tried to reinstall using the new timezone, but the problem persists. How can I update the registry inside wine? and preferable using PlayOnLinux would be better. **Edit**. Moreover, it seems that the problem is only with my new timezone (Santiago) as others seem to work fine.


title: How can I make my sed command work on OSX as well as Ubuntu

text: I like customizing my PS1 prompt and including the current directory. I also have several other items such as time, user, git branch and the like, i.e. ![enter image description here](http://i.stack.imgur.com/fvpXZ.png) However one problem is that when my current directory is many layers 'deep' such as `/home/durrantmm/Dropnot/webs/rails_apps/linker/app/views` there is too much text. (btw I carriage return at the end within my PS1 prompt setting anyway so my actual $ is back on the left, that is not the issue here). So I have a solution for that, to use this for the location part:               LOCATION='\033[01;34m\]`pwd | sed "s#\(/[^/]\+/[^/]\+/[^/]\+/\).*\(/[^/]\+/[^/]\+\)/\?#\1_\2#g"`'      not pretty, but it does the job and I then combine it with the other stuff (not shown, not needed here) and I get "first 3 levels _ last two levels" for the directories, i.e. ![enter image description here](http://i.stack.imgur.com/9XMkW.png) Unfortunately though on my mac the sed part isn't working correctly and I get: ![enter image description here](http://i.stack.imgur.com/N21bT.png)   [this is actually from my Linux machine, I faked it to show what it looks like on my mac in case you are wondering). How can I get the `3_2` format for the current directory on my mac ?


title: Why doesn't colordiff work with stdin?

text: I have one file and one input coming from a pipe. They're identical. So why does `colordiff` report differences?:               echo "123" | colordiff <(echo "123") -     1d0     < 123      It looks that this is colordiff causing the problem. With pure diff, all works OK.


title: Emacs : Ctrl+space (set mark) insert only a space in Konsole

text: I'm having a problem with emacs in Konsole : I can't set a mark to select text in emacs. Ctrl+space insert a space character instead of setting the mark. On XTerm, i've almost the same behaviour. It insert a tilde instead of the setting the mark. Any idea on how to solve this problem ?


title: keyserver timed out when trying to add a GPG public key

text: I am trying to add a public key for installing a program with CPG. But i am pretty new to this but every command i found gave me the same error:               gpg --keyserver keyserver.ubuntu.com --recv-keys 94558F59     gpg: requesting key 94558F59 from hkp server keyserver.ubuntu.com     gpg: keyserver timed out     gpg: keyserver receive failed: keyserver error      How is this possible it seems that the i am behind some kind of blockade which makes it impossible to establish a connection to the key server. I looked into many OP questions and tried all commands i could find but nothing worked. Anyone had this problem before?


title: Can I allow users to chmod a file not owned by them?

text: I would like to allow users to chmod a file that is owned by root or some user that is not themselves. I have chmod'ed the file to 777 and I get "operation not permitted". I have added the user to the group of the file and get the same. Why can't a user chmod a file they have write access to?


title: Querying an overlayfs

text: I'm looking for a way to query a mounted overlay filesystem (`overlayfs`) in order to check it's upper and lower directory, but until now I haven't found any suitable command for that. Is there is a way to do such a check ? I mounted the `overlayfs` with a command like the one below:               mount -t overlayfs -o lowerdir=/mnt/root-ro,upperdir=/data/root-rw overlayfs-root ${rootmnt}      The `mount` command didn't give me enough information:               root@ubuntu12:~# mount -l     overlayfs-root on / type overlayfs (rw)     /dev/sda1 on /mnt/root-ro type ext4 (ro,relatime,data=ordered) [ROOT]     /dev/sdb1 on /data type ext4 (rw,errors=remount-ro) [DATA]


title: Use of .. in Linux scripting and makefiles

text: what is the use of `..` in linux scripting and in the following makefile?               MODULE =       EQUALIZER = ..       SRCS =           include ${EQUALIZER}/xyz.mak       include ${EQUALIZER}/pqr.mak


title: Opera, Firefox has no kiosk option like Chrome gives it openly?

text: While using Chrome kiosk mode, i have problem with openbox desktop, its not doing correct for some javascript rendering. So i wanted to test opera and firefox but both does not support kiosk at all like chrome does? I installed opera and firefox where i am using openbox desktop. When i try to do the following it does not make the full screen mode, and keeps showing the window borders to minimize, maximize (like nonsense). How do i remove the window borders for firefox/opera to make it full kiosk mode? (like Chrome does!).               sun@sun-Alienware-X51:/var/tmp$ export DISPLAY=:0.0 && opera -kioskmode -k -kioskbuttons -kioskresetstation -kioskwindows  -kiosknormalscreen -kioskspeeddial  -nochangebuttons -nochangefullscreen  -nocontextmenu  -nodownload  -noexit  -nohotlist  -nopanel -nokeys  -nomaillinks  -nomenu  -noprint  -nosave  -nosplash  -resetonexit  www.google.com


title: Why does nginx starts process as root?

text: I have installed nginx server. I've just checked listening ports and saw the following:               $ sudo lsof -nP -i | grep LISTEN     sshd       614     root    3u  IPv4   7712      0t0  TCP *:22 (LISTEN)     nginx      822     root    7u  IPv4   8745      0t0  TCP *:80 (LISTEN)     nginx      827 www-data    7u  IPv4   8745      0t0  TCP *:80 (LISTEN)     nginx      828 www-data    7u  IPv4   8745      0t0  TCP *:80 (LISTEN)     nginx      829 www-data    7u  IPv4   8745      0t0  TCP *:80 (LISTEN)     nginx      830 www-data    7u  IPv4   8745      0t0  TCP *:80 (LISTEN)     .     .     .      And I'm just interested why there is four nginx processes run as 'www-data' user and one as 'root user'?


title: CentOS - Creating a partition for OpenVZ

text: I've recently installed a fresh copy of CentOS 6.4 and I was going to install OpenVZ on it however on the install instructions it said that it is advised to make a separate EXT4 partition for the VMs. Now I've spent around 30 minutes trying to figure out how to do this and I still don't know what to do. I don't even know how many partitions I have or if I have any free space at all. Could someone shine some light on this problem?


title: Exiting a '&pattern' search in less

text: After using a search in less of the format &pattern, which displays only matching lines, how can I go back to displaying all lines in the file? Esc doesn't do anything as far as I can tell. ^C doesn't either. q simply exits less.


title: Find a pattern with no repeated numbers in egrep

text: I need help finding a regular expression to match all digit sequences which has no repeated digit. Example: 198345 -> matched. 198315 -> not matched (1 repeated twice ) How can I achieve this in `grep\egrep`?


title: How to create low-overhead file system

text: I have usb keychain with size of 7.5GB and I need to copy file on it with size 7.4GB. But I can't because superblocks consume 0.5GB of space.


title: fsarchiver error

text: I'm running the following fsarchiver command:               $ fsarchiver restfs /tmp/backup/c0d0p2.fsa id=0,dest=/dev/cciss/c0d0p2      I get the following error:               [errno=22, Invalid argument]: oper_restore.c#213,extractar_restore_attr_xattr(): xattr:lsetxattr(/racoon,security.selinux) failed Statistics for filesystem 0      What is errno 22? How do I fix it? I'm using Red Hat 5.4, Linux kernel 2.6.18-164.2.1.el5PAE


title: How to enter into BusyBox when booting?

text: I have occasionally installed `cloud-init` package in Ubuntu, which blocks me from booting. Neither recovery mode works. Because `cloud-init` installed some upstart job configuration. So I want to enter into busybox to remove `/etc/init/cloud-init*.conf`, but it seems like no way to do it. I can press `Ctrl+Alt+SysRq` which brings on a rough hack menu, but there is no busybox option. So is it possible? My CDROM is broken so I can't use Live CD too.


title: Mount samba filesystem into RHEL 5.5

text: I have a trial RHEL version for a proof of concept where I was asked to mount a windows filesystem into linux. I tried               mount -t smbfs -o username=samba,password=samba //Desktop/Public /mnt/public      But it gives me:               mount: unknown filesystem type 'smbfs'      I get to know I need samba-client to do this. Question. After executing               rpm -qa 'samba*'      This is what I get:               samba-common-3.0.33-3.28.el5:     samba-client-3.0.33-3.28.el5dir      Does it mean I have samba-client already? If so, what do I need to to to mount the windows share? Someone suggested me to try: `yum -install samba-client` but since this is a trial version, I'm not subscribed to RHN and can't get the update. How else can I install the client? Final question, if I can't do this, am I able to still mount for instance other RHEL? ( how is that called? regular mount or somthing? ) Thanks in advance


title: How do I choose between Unix / Linux and Windows in a Server environment?

text: I need a server, and I'm used to windows at home and in the office, but it seems that Unix / Linux is an option, but I don't really know what it is. I don't know which one to get, how do I choose? What kinds of questions do I need to ask my host (if applicable)? my system administrators? my programmers? is there anything else I should know?


title: Do any package managers come installed default in NetBSD?

text: I am using NetBSD - I know ports and pkgsrc are available as package managers, but do these or any others come pre-installed in NetBSD?


title: Does "apt-get purge" remove config files stored in user home dir?

text: I used               sudo apt-get purge [package_name]      and               sudo apt-get autoremove --purge      to remove an application so that on reinstalling it gets back to default configuration. But it didn't work, all previous modified configuration were still there. On searching I found a dir in "/root/.[package_name]". Does `apt-get purge` remove config files stored in user home dir? If not then how to remove them?


title: Is knowing Linux required to learn Unix

text: Is it required to know Linux to learn other Unix. I don't know Linux but I am planning to learn Sun Solaris.


title: What does an exclamation mark at the beginning of a value in KDE configuration files do?

text: In `~/.kde/share/config/kdeglobals`, the value for the default web browser starts with an exclamation mark. What is the purpose of the exclamation mark?               [General]     BrowserApplication[$e]=!sensible-browser


title: persistent network interface naming and kvm

text: I wonder why my network interface is still named `eth0` in my kvm guests. udevadm just outputs               # udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null     ID_NET_NAME_MAC=enxc2184ae7ab3f      I would expect them to be called like `enpXsY`. The directory `/etc/udev/rules.d` is empty. The Linux brand is Gentoo, 3.15.5-hardened-r2. Virtualization is KVM with qemu 2.0, the net interface is virtio. On the host and on other machines the setup is the same w.r.t. udev but the interfaces are called by their new names as expected. Why is this so? What would it need to enable the new identifiers? My first thought was that the new identifiers refer to PCI devices, and that virtio devices are not PCI devices. However, `lspci` proved me wrong:               00:03.0 Ethernet controller: Red Hat, Inc Virtio network device         Subsystem: Red Hat, Inc Device 0001         Flags: bus master, fast devsel, latency 0, IRQ 11         I/O ports at c040 [size=32]         Memory at febd1000 (32-bit, non-prefetchable) [size=4K]         Expansion ROM at feb80000 [disabled] [size=256K]         Capabilities: [40] MSI-X: Enable+ Count=3 Masked-         Kernel driver in use: virtio-pci          00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device         Subsystem: Red Hat, Inc Device 0002         Flags: bus master, fast devsel, latency 0, IRQ 10                                             I/O ports at c000 [size=64]         Memory at febd2000 (32-bit, non-prefetchable) [size=4K]         Capabilities: [40] MSI-X: Enable+ Count=2 Masked-         Kernel driver in use: virtio-pci      So that's not the reason.


title: Adding efficient storage to a laptop-based system

text: I've recently asked an as-yet-unanswered related question. My question here is a bit different: I want to know the best way to add storage to a laptop-based system without sacrificing power efficiency or "material efficiency". By the last, I mean anything which would cause the storage elements to deteriorate more rapidly than necessary. The main example I can think of is if spindown happens too infrequently, or perhaps also too frequently, the lifespan of the drive in question may be reduced. **aside** Currently I'm trying to figure out how to get an HP Simplesave 2.5" drive to behave reasonably well. Obviously this is not the optimal choice; it was a boxing week sale which may end up being taken back. Various tests on it using `hdparm` seem to indicate that it's not using the value of the `-S` parameter, which is supposed to determine how long it waits to spin down. Instead, it seems to spin down after 10 seconds if the `-B` option is set to 127 or less, and after a long period of time, or perhaps not at all, if it is higher. I mention this mainly because I'm not entirely convinced that these directives will tend to work as `man hdparm` says they should even on drives mounted in proper USB enclosures. The manual does mention that newer enclosures tend to support these features. **main point** The system tends to function mostly as a server, though does see occasional use as a media box. It may get suspended from time to time, or may end up being powered on and active (though idle) for months. I'd like to have available the same sort of power management functionality that I would get with an internally-mounted HDD in a desktop (or rack- mounted?) server. This includes spinning down and/or sleeping the drive when the server is suspended. So I'd like to know the best approach to finding an efficient storage solution. Are certain brands of enclosures better for this? Is it necessary to use a 3.5" enclosure, or at least one that is powered separately from the USB line, to get proper power management facilities? Or would I have use a full NAS system for that?


title: Need a programmers advice on *X display manager, window manager and composit manager combination

text: First of all: I asked this question on SuperUser, when I wasn't thinking about a StackExchange Site for Linux-related questions. So if this violates any rules please feel free to close. I have fought with myself whether or not i should ask this question but I find myself stuck and I need another expert opinion.   I can't seem find the right combination of display and window manager (and composit manager). I have tried some different combinations but most of them don't work for me. I have been working with Linux for a few years now and currently I'm running Gentoo with GDM, Openbox(stand alone, Gnome aware) and xcompmgr.   But I have tried Metacity, Awesome and Fluxbox with and without Compiz, but always with GDM. What I want: A lightweight, HIGHLY configurable environment that doesn't rely on mouse-input too much (except for web browsing and image processing). At 95% I work programming or so with multiple consoles and desktops on multiple screens.   What makes me ask is that most lightweight environments seem somewhat "unfinished" and show unexpected behavior quite often and that doesn't make me feel too good as I want an environment thats stable.   And of course I want an environment which is not TOO ugly to look at as I use it at an average of 10 hours a day. :) Any thoughts? What do you use in a similar situation?   Thanks for any advice! (At SuperUser I was told to try XFCE. I am doing that right now.) Greetings


title: Which systems have 'pager' shortcut/alias?

text: On a Debian system, one can type `pager` in order to use whatever pager program happens to be default/available. By default, `less` is used, and if not available, the lesser `more` gets to do the job. Is such a thing available in other Unix and Linux systems?


title: How do I know if dd is still working?

text: I've not used `dd` all that much, but so far it's not failed me yet. Right now, I've had a `dd` going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little worried, as I was able to `dd` from the disk to the image in about 7 hours. I'm running OSX 10.6.6 on a MacBook with a Core 2 Duo at 2.1ghz/core with 4gb RAM. I'm reading from a .dmg on a 7200rpm hard drive (the boot drive), and I'm writing to a 7200rpm drive connected over a SATA-to-USB connector. I left the blocksize at default, and the image is about 160gb. EDIT: And, after 14 hours of pure stress, the `dd` worked perfectly after all. Next time, though, I'm going to run it through `pv` and track it with `strace`. Thanks to everyone for all your help.


title: How to avoid powering down certain USB devices when a machine is suspended

text: I'd like to maintain power supply to a USB-powered drive when the system goes into suspend (AKA S3 or "suspend-to-RAM") mode. Normally the power is cut while the machine is suspended, which causes it to be dismounted and then remounted when the system is resumed. This is not really great, especially if the drive itself supports power management. Although I could run it on a separate power supply, I'd prefer to have to avoid allocating more wiring for something that can, at least in theory, be done with my existing hardware. How can I determine if it is possible to do this with my system, and how can I arrange for a particular USB device, i.e. this enclosure, to always be treated this way? I'm running ubuntu 10.10. **update** Discovered this ubuntuforums thread which suggests to use `acpitool -w` to determine the available wake-up level for the USB controller. Running this on my system shows S1 for the USB controllers:               $ acpitool -w        Device   S-state   Status   Sysfs node       ---------------------------------------       1. LID      S3    *enabled          2. PBTN     S4    *enabled          3. PCI0     S3    *disabled  no-bus:pci0000:00       4. USB0     S1    *disabled  pci:0000:00:1d.0       5. USB1     S1    *disabled  pci:0000:00:1d.1       6. USB2     S1    *disabled  pci:0000:00:1d.2       7. USB3     S1    *disabled  pci:0000:00:1d.7       8. MODM     S3    *disabled         9. PCIE     S4    *disabled  pci:0000:00:1e.0      Which seems to be telling me that wake-up capability can only be enabled for USB in the S1 state. I'm not sure how useful this is, since providing full power and allowing wake- up may be orthogonal concerns. It may be enabling wake-up only provides low power, so there may be a different way to enable full power. If turning on wake-up does equate to providing full power, it looks like I may be able to do what I want by putting a USB card in the expansion slot (I guess that's what `PCIE` is?). Though I think I'd want to know a bit more about this before attempting to excavate a USB2 PC card.


title: What program can I use to get copier/fax functionality from separate scanner and printer?

text: It is difficult to find a good multifunction laser printer in my price range. But there are several good cheap laser printers (non-multifunction) and I have an excellent scanner (better than I could get on a multifunction). But making copies would be a pain if I had to operate the printer and scanner separately. Is there a program or script that can imitate the copier &/or fax functions of a good multifunction printer by automating the scan and passing it to the printer?


title: How can I concatenate a shell variable to other other parameters in my command lines?

text: How can I concatenate a shell variable to other other parameters in my command lines ? For example,               #!/bin/sh     WEBSITE="danydiop"      /usr/bin/mysqldump --opt -u root --ppassword $WEBSITE > $WEBSITE.sql      I need to concatenate ".sql" to $WEBSITE thanks


title: getting an old logitech webcam to work in Linux

text: I'm trying to get an old Logitech QuickCam Web to work in Linux. There's a kernel module, but the last time it was updated was in 2006 and it doesn't compile against a recent kernel anymore. In particular, it seems to use the old video API V4L1. There's a Debian bug that basically says that the driver has been abandoned. Is anybody aware of a way to make this webcam work with a recent kernel version?


title: Problem in using SSH tunnel

text: In a network, due to a reason that I don't know, I can't browse the web in Linux(In windows it has no problem). I get _Error 301 moved permanently_ when I try to load a web page. I decided to bypass this restriction by using SSH tunnel. I can connect to ssh server with the following command: `ssh user@server -D 1024` Problem is: even using ssh tunnel I still can't browse the web. Using firefox, in status bar I see "Waiting for example.com" But it doesn't load the website and remains in this status. I have tested the above command in another networks to create tunnel with no problem.


title: Is it possible to write portable service scripts to control a daemon?

text: I (or one of my colleagues) need to write one or more shell scripts to control the execution of a daemon. We need to be able to start the daemon, tell it to gracefully shut down, and force a shutdown. Basically, it's the sort of thing one would traditionally use a script in `/etc/init.d` for. We will be deploying to Ubuntu. We may want to deploy to RedHat/CentOS, and possibly AIX. I'd like to have the ability to deploy to any unix, because i like doing things portably. So, is it possible to write portable service scripts? I suppose i can write a portable Bourne shell script which works like a normal init.d script, and accepts 'start' and 'stop' as commands. That would work anywhere, and would offer a natural interface on at least Debian and RedHat style systems. Would it fit in elsewhere? Is init.d universal? Are there any pitfalls to watch out for? Are there any tools for generating service scripts in different forms? Something where i can write script fragments for starting and stopping, and have the tool produce scripts for various different platforms. Are there any alternatives to platform-specific service script conventions? I've come across daemontools and runit; are these alternatives to init.d scripts? Are they any good? What else is there like this? Does this make any sense?


title: Installing XRDP on Cent OS 6.5

text: I am trying to install `xrdp` service on one my VPS server, and though all installed successfully I get following error after connecting via Windows MSTSC service. Following are the resources I have used to install => **_(1) (2) (3) (4) (5) (6)_** Imagine this as GUI Window -> Sample               Connection Log         connecting to sesman ip 127.0.0.1 port 3350         sesman connect ok         sending login info to session manager, please wait ...         xrdp_mm_process_login_response: login successful for display         started connecting         connecting to 127.0.0.1 5911         error - problem connecting      and following is the error log I see from `/var/log/xrdp-sesman.log`               [20140328-19:50:31] [INFO ] scp thread on sck 7 started successfully     [20140328-19:50:32] [INFO ] ++ created session (access granted): username root, ip my.ip.addr.ess:63327 - socket: 7     [20140328-19:50:32] [INFO ] starting Xvnc session...     [20140328-19:50:32] [INFO ] starting xrdp-sessvc - xpid=7552 - wmpid=7551     [20140328-19:50:32] [INFO ] ++ terminated session:  username root, display :11.0, session_pid 7549, ip my.ip.addr.ess:63327 - socket: 7      and following are the logs of my `/root/.vnc/servername:2.log`               Xvnc TigerVNC 1.1.0 - built Feb  4 2014 05:26:31     Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)     See http://www.tigervnc.org for information on TigerVNC.     Underlying X server release 11300000, The X.Org Foundation          Initializing built-in extension Generic Event Extension     Initializing built-in extension SHAPE     Initializing built-in extension MIT-SHM     Initializing built-in extension XInputExtension     Initializing built-in extension XTEST     Initializing built-in extension BIG-REQUESTS     Initializing built-in extension SYNC     Initializing built-in extension XKEYBOARD     Initializing built-in extension XC-MISC     Initializing built-in extension XFIXES     Initializing built-in extension RENDER     Initializing built-in extension RANDR     Initializing built-in extension DAMAGE     Initializing built-in extension MIT-SCREEN-SAVER     Initializing built-in extension DOUBLE-BUFFER     Initializing built-in extension RECORD     Initializing built-in extension DPMS     Initializing built-in extension X-Resource     Initializing built-in extension XVideo     Initializing built-in extension XVideo-MotionCompensation     Initializing built-in extension VNC     Initializing built-in extension GLX          Fri Mar 28 19:36:33 2014      vncext:      VNC extension running!      vncext:      Listening for VNC connections on all interface(s), port 5902      vncext:      created VNC server for screen 0     /root/.vnc/xstartup: line 27: xsetroot: command not found     /root/.vnc/xstartup: line 28: xterm: command not found     /root/.vnc/xstartup: line 29: twm: command not found      And Following are the commands I used to install `tigervnc-server` and `xrdp` on my two cent OS.               root@servername [~]#  cat /etc/*-release     CentOS release 6.5 (Final)     CentOS release 6.5 (Final)     CentOS release 6.5 (Final)     root@servername [~]# yum install xrdp tigervnc-server     root@servername [~]# service vncserver start     Starting VNC server: no displays configured                [FAILED]     root@servername [~]#     root@servername [~]#  vim /etc/sysconfig/vncservers     VNCSERVERS="2:root"     VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"     :wq!     root@servername [~]# service vncserver start     Starting VNC server: 2:root     New 'servername:2 (root)' desktop is servername:2          Starting applications specified in /root/.vnc/xstartup     Log file is /root/.vnc/servername:2.log                                                                     [  OK  ]     root@servername [~]# service xrdp start     Starting xrdp:                                             [  OK  ]     Starting xrdp-sesman:                                      [  OK  ]     root@servername [~]# chkconfig xrdp on     root@servername [~]# chkconfig vncserver on     root@servername [~]# vncpasswd     Password:     Verify:     root@servername [~]#       _**Note: I don't mind paying for help, that works!._**


title: What's the advantage of mounting a file system in the same file system

text: RE-EDIT: We can usually see mounting a file system to a mountpoint, like:               /usr/bin/truncate -s 128M /tmp/foo     chmod 0700 /tmp/foo     mke2fs -t ext4 -m 1 -F /tmp/foo     mount -t ext4 -o loop /tmp/foo /mnt      I wonder what's the benefit of mounting a file system in the same file system? /tmp/foo and /mnt are in the same file system.


title: Can the shell be more "offensive"?

text: My _Gentoo_ Linux is compiled with the _offensive_ USE flag enabled:               # sudo su -     Password:      Hold it up to the light --- not a brain in sight!     Password:       It is also possible to select fortunes based on the degree of offensiveness:               # fortune -o kernelcookies | cowsay -b      _________________________________________      / /* This is total bullshit: */           \     |                                         |     \ linux-2.6.6/drivers/video/sis/init301.c /      -----------------------------------------              \   ^__^              \  (==)\_______                 (__)\       )\/\                     ||----w |                     ||     ||      Considering the list of flavored items1 provided in the link is short - and I personally don't use a _molecular dynamics simulation package_ - is there any more of that sort of spice in the **shell(s)** in Linux generally (or UNIX)? * * * 1- It's good to remember that `cowsay` can output any argument, not just fortunes, for instance the output of a command or script: `cowsay -s $(script_in_path_or_command)`. Note -s is just for the cow's appearance here, see manpages.


title: iptables rules - input and output

text: I'm new with Linux and `iptables`. I have a Ubuntu Server distro (12.04) on a PC which has 2 network interfaces (`eth0` and `eth1`). I also have 2 laptops, one is plugged to `eth0` and the other to `eth1`. laptop1 ipconfig: 172.16.221.120 - 255.255.252.0 laptop2 ipconfig: 192.168.222.250 - 255.255.255.0 I want to ping the laptop2 from laptop1 successfully. Do I have to create `INPUT` and `OUTPUT` rules? Or a `FORWARD` rule, too? I've tried this with no success:               iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT


title: bash not setting autocd

text: I try to set `autocd` option in bash so I don't have to type `cd src` and can just type `src`. However `shopt -s autocd` gives me:               -bash: shopt: autocd: invalid shell option name      (Ubuntu 8.04 hardy)


title: Hotplug NIC on openbsd running in KVM

text: I'm having a hard time while trying to configure hotplugd on an OpenBSD5.4 VM running in KVM. When I attach the NIC to the host something goes really wrong and I lose all connection with the VM so I really cannot tell what's the problem. I just have to reboot the vm and start over. I'm using the default attach script that can be found in the hotplugd man page. (I'm quite new to openbsd so any advice would be really helpful) Thanx a lot


title: shell script for mounting external device to mount point

text: I want to make a script to mount an external device to a particular mount point e.g say `/mnt`. Let me elaborate my question, suppose I run `fdisk -l` in terminal I would get this output               Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *           1         493     3956672    6  FAT16      so I want to write a script so that when I run that script it checks for where external device is mounted(in my case sdb1) and automatically takes that partition and mount it to `/mnt` I have scientific linux 6.4(32 bit) .


title: How to change key mapping for HOME and END keys in XTERM?

text: I am working on RHEL 6.4. In my old system running on RHEL 5.3, the `Home` is mapped to `^[[1~` and `End` is mapped to `^[[4~`. In the new system, `Home` is mapped to `^[[H` and `End` is mapped to `^[[F`, which is causing some undesirable behaviour in my application. Please tell me how can I change this?


title: User associated with a socket

text: I use `ss -p` to see TCP sockets information. But process info are not printed for some sockets. Below:               $ ss -p4     State  Recv-Q  Send-Q  Local Address:Port   Peer Address:Port     ESTAB  0       0       10.146.18.213:50368  199.7.59.72:http      But with sudo, I can see the process info:               $ sudo ss -p4     State  Recv-Q  Send-Q  Local Address:Port   Peer Address:Port     ESTAB  0       0       10.146.18.213:50368  199.7.59.72:http      users:(("sshd",473,18))      With `netstat -net`, no root, I can see the user:               $ netstat -net     Active Internet connections (w/o servers)     Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode     tcp        0      0 10.146.18.213:50368         199.7.59.72:80              ESTABLISHED 222        3693189      My user id is 222:               $ id -u     222      But ss shows process info only with root. My questions are:   1. Why are there sockets with no user associated?   2. Are these sockets with no user subjected to the `owner` module matching of iptables?


title: Find alternative for Debian 5 to work with big files

text: I have a problem using find               find ./  -mtime +7          Value too large for defined data type      because of 2 Gb file (backup) on x32 VDS and it is not possible to reinstall OS. I need to remove old files but this error makes not possible to use find + xarg + rm. Please advise a solution. Reinstallation of GNU coreutils did not help. Also file have name with creation date, for example "2012_04_03.tar", may be this can be used for removing old files. Thanks