Determining Specific File Responsible for High I/O

This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, but if I have to give a PID or TID I'm alright with that. I'd like to go without having to do a `strace` on the program that pops up in `iotop`. Preferably, using a tool in the same vein as `iotop` but one that itemizes by file. I can use `lsof` to see which files mailman has open but it doesn't indicate which file is receiving I/O or how much. I've seen elsewhere where it was suggested to use `auditd` but I'd prefer to not do that since it would put the information into our audit files, which we use for other purposes and this seems like an issue I ought to be able to research in this way. The specific problem I have right now is with LVM snapshots filling too rapidly. I've since resolved the problem but would like to have been able to fix it this way rather than just doing an `ls` on all the open file descriptors in `/proc/<pid>/fd` to see which one was growing fastest.


Footnotes in emacs org mode: how to disable [n], but keep [fn:]?

How can I disable the `[n]` being linked to a footnote and highlighted? `[n] can be many things, like any index of an array. So, I want my footnotes to be`[fn:n]`and only`[fn:n]`.


HOWTO check if a user account is blocked against /etc/shadow

After set the Account Expire parameter on /etc/shadow (field #7) to 90 days,I need to know where to look around if an user account is locked down or not after those amount of days. Right now, the only solid way which I did find to do that is just seeing the message that says the account is expired when the user tries to do ssh against the server. Any ideas on how to check that from inside the server? I'm using a Red Hat (Santiago) one.


Create a custom XDG_DIR with custom icon

I'd like to create a custom XDG_CUSTOM_DIR directory in my home directory pointing to $HOME/Custom and assign an icon to it. I've done:               xdg-user-dirs-update --set CUSTOM ~/Custom      So far so good... ~/.config/user-dirs.dirs has been changed acordingly. Now: how do I assign an icon to it?


DNS resolution problem with Fedora 20

I have a newly built Fedora 20 server that I've just hooked to my network. It's a virtual server running on a VirtualBox host. Everything seems to be working but I have a problem with name resolution. (I should say at this point that name resolution is provided by a Windows server on separate hardware that works well for every other machine on the network.) From the command line I can resolve an external host like `unix.stackexchange.com`. I can quite happily resolve that and ping it, as with every other external host I've tried. However, my local network (let's call it `xyz.local`) is different. The network interface on my F20 machine has `DOMAIN=xyx.local` in the network script (full script below). From the command line I can resolve, say, `server-01`, but not `server-01.xyz.local`. I can resolve an alias in the short form, even though the canonical name is the long form, so, for example, `ping mysql` successfully resolves to its alias `linux-04.xyz.local`, but I can resolve neither `mysql.xyz.local` nor `linux-04.xyz.local`. Clearly I've missed something. Can anyone suggest what? /etc/hosts has only the standard localhost entries for 127.0.0.1 /etc/resolv.conf is as follows:               #Generated by Network Manager     search xyz.local     nameserver 192.168.xxx.xxx      My interface script is               TYPE=Ethernet     BOOTPROTO=none     DEFROUTE=yes     IPV4_FAILURE_FATAL=no     IPV6INIT=yes     IPV6_AUTOCONF=yes     IPV6_DEFROUTE=yes     IPV6_FAILURE_FATAL=no     NAME="Wired connection 1"     UUID=<uuid>     ONBOOT=yes     IPADDR0=192.168.xxx.xxx     PREFIX0=24     GATEWAY0=192.168.xxx.xxx     DNS1=192.168.xxx.xxx     HWADDR=<mac>     DOMAIN=xyz.local     IPV6_PEERDNS=yes     IPV6_PEERROUTES=yes


Improved MySQL interface

Is there a MySQL terminal prompt that supports things like tab-completion and history? The standard one that comes with MySQL doesn't have those features


No installation option with livecd

I'm currently running Windows 7 x64 Professional and want to dual-boot with CentOS. I made a disk partitioning and wrote an image of CentOS on flash drive. But when it is being booted there's no option to install linux - only   * Boot,    * Boot(textual mode),    * Memory Test,    * Network installation and    * Boot from local drive (which is booting Windows).  I want to install linux, not to use livecd all the time, what's the problem?


Lock a byobu session with password?

I used to leave my `byobu` sessions detached on a server. I want to lock the session to prevent other users (root account) accessing my session. Is this possible?


suppress rsync warning: some files vanished before they could be transferred

I get loads of warnings when backing up my running Postfix and Courier server files like:               file has vanished: /var/kunden/mail/username/name@mymail.de/tmp/courier.lock      How do I suppress those warnings from `rsync` when running it from Cron `/usr/bin/rsnapshot hourly`? Can I somehow exclude those dirs?               /var/kunden/mail/*/*/tmp/      the `tmp` folder can be deeper as well, for example:               file has vanished: /var/kunden/mail/username/name@mymail.de/.Presse/tmp/1353871473.M716135P32214_imapuid_36.test.de     file has vanished: /var/kunden/mail/username/name@mymail.de/.Presse/tmp/courier.lock


Error installing ns83820 driver in linux 3.2.0 (invalid physical address)

In Debian Wheezy I am getting the following error on loading the `ns83820` module. Anyone have a idea how to fix this?               Oct  6 13:15:00 soter kernel: [    1.566727] ns83820.c: National Semiconductor DP83820 10/100/1000 driver.     Oct  6 13:15:00 soter kernel: [    1.566836] ioremap: invalid physical address fffffffff4000000     Oct  6 13:15:00 soter kernel: [    1.566840] ------------[ cut here ]------------     Oct  6 13:15:00 soter kernel: [    1.566858] WARNING: at /build/linux-dJLVDt/linux-3.2.46/arch/x86/mm/ioremap.c:83 __ioremap_caller+0xa9/0x372()     Oct  6 13:15:00 soter kernel: [    1.566863] Hardware name: Unknown     Oct  6 13:15:00 soter kernel: [    1.566866] Modules linked in: ns83820(+)     Oct  6 13:15:00 soter kernel: [    1.566874] Pid: 73, comm: modprobe Not tainted 3.2.0-4-686-pae #1 Debian 3.2.46-1     Oct  6 13:15:00 soter kernel: [    1.566878] Call Trace:     Oct  6 13:15:00 soter kernel: [    1.566896]  [] ? warn_slowpath_common+0x68/0x79     Oct  6 13:15:00 soter kernel: [    1.566902]  [] ? __ioremap_caller+0xa9/0x372     Oct  6 13:15:00 soter kernel: [    1.566907]  [] ? warn_slowpath_null+0xd/0x10     Oct  6 13:15:00 soter kernel: [    1.566912]  [] ? __ioremap_caller+0xa9/0x372     Oct  6 13:15:00 soter kernel: [    1.566918]  [] ? ioremap_nocache+0xa/0xd     Oct  6 13:15:00 soter kernel: [    1.566927]  [] ? ns83820_init_one+0x12b/0x5d4 [ns83820]     Oct  6 13:15:00 soter kernel: [    1.566935]  [] ? ns83820_init_one+0x12b/0x5d4 [ns83820]     Oct  6 13:15:00 soter kernel: [    1.566944]  [] ? pci_device_probe+0x53/0x9a     Oct  6 13:15:00 soter kernel: [    1.566954]  [] ? driver_probe_device+0x10c/0x10c     Oct  6 13:15:00 soter kernel: [    1.566959]  [] ? driver_probe_device+0x8c/0x10c     Oct  6 13:15:00 soter kernel: [    1.566964]  [] ? __driver_attach+0x40/0x5b     Oct  6 13:15:00 soter kernel: [    1.566970]  [] ? bus_for_each_dev+0x3b/0x5d     Oct  6 13:15:00 soter kernel: [    1.566976]  [] ? driver_attach+0x14/0x17     Oct  6 13:15:00 soter kernel: [    1.566981]  [] ? driver_probe_device+0x10c/0x10c     Oct  6 13:15:00 soter kernel: [    1.566985]  [] ? bus_add_driver+0x86/0x1af     Oct  6 13:15:00 soter kernel: [    1.566997]  [] ? kset_find_obj_hinted+0x4c/0x8d     Oct  6 13:15:00 soter kernel: [    1.567001]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567005]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567010]  [] ? driver_register+0x73/0xc6     Oct  6 13:15:00 soter kernel: [    1.567014]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567017]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567021]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567026]  [] ? __pci_register_driver+0x32/0x86     Oct  6 13:15:00 soter kernel: [    1.567030]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567033]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567039]  [] ? do_one_initcall+0x66/0x10e     Oct  6 13:15:00 soter kernel: [    1.567043]  [] ? 0xf8253fff     Oct  6 13:15:00 soter kernel: [    1.567057]  [] ? sys_init_module+0x14c0/0x1677     Oct  6 13:15:00 soter kernel: [    1.567068]  [] ? syscall_call+0x7/0xb     Oct  6 13:15:00 soter kernel: [    1.567072] ---[ end trace c623892f829e745a ]---     Oct  6 13:15:00 soter kernel: [    1.567118] ns83820: probe of 0000:00:08.0 failed with error -12      Some details:               $ uname --all     Linux bob 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux


Remove notifications icon or make notifications fade after a while

Just installed Ubuntu 11.10, along with Gnome 3 to replace Unity. I'm using the classic Gnome look rather than the new one which is way too much like Unity for my tastes. Seems like everything is getting harder and harder to configure, fewer and fewer options. It's driving me nuts. Anyway, on occasion I get various notifications, which appear both as a brief bubble (sometimes, if I'm lucky) and in the panel as an annoying "mail" like icon. The bubbles are fine, and the icon too if not for the fact that unlike the bubbles the icon stays and gives me a growing list of old news that I have to clear manually. Can I remove the icon, or make it automatically clear notifications after, say, 30 seconds? Also, I can't seem to make Banshee show up in the sound menu as it advertises. I can change the settings to get an additional Banshee icon in the panel but not only shouldn't that be necessary when I already have a sound menu (or a volume control at least) it's also an ugly icon that kinda grates on my eyes.


What is the debian equivalent to this repoquery command?               repoquery --repofrompath="abc,http://path/to/repo" --repoid=abc -q mypkg      --qf %{NAME}_%{VERSION}_%{RELEASE}_%{ARCH}_%{BUILDTIME}_%{PACKAGER}_%{LOCATION}      This will ignore any repos specified under /etc/yum.repos.d, and list the requested information for the latest available version of mypkg in the repo specified in repofrompath. So far, I have found               apt-cache showpkg mypkg      but I am not sure how to use the -c config-file option to simulate the effect of repofrompath above.


Vim key binding to cycle through windows

How do I bind one single key to cycle through the windows? For example, each time I want to switch a window, I have to click `ctrl-a` (default was `ctrl-c`) then use arrow key up/down/left/right to switch. Can I have just one key that does `ctrl-a` + switching the window? I was thinking to bind it with the `tab` key, but I couldn't resolve the issue yet.


I try to setup zabbix server on CentOS 6 (close system) but can find zabbix-server binary file after run rpm install rpm package

I try to setup zabbix on CentOS 6 in closed system ( no internet connection ). So I can only put rpm to that machine, and run command > > > rpm -ivh zabbix-2.2.3-1.el6.x86_64.rpm after it's done. I can find any > binary or execute file in /var/run/zabbix or any zabbix related folder. > Anyone know where is it installed.


Using the Wifi of a notebook via ethernet for another PC

I want to connect a PC to the internet via my notebook, which is connected to a WLAN. The setup should look like the following scheme: `PC (eth0) -> Notebook (eth0) -> Notebook(wlan0) -> Router`.   Both are running linux - arch on the notebook and funtoo on the PC. **Edit** : So I tried rush's method and it didn't work for me, here is what I did: PC:               ifconfig eth0 192.168.2.3     route add default gateway 192.168.2.2     nameserver 8.8.8.8 > resolv.conf      Notebook:               echo 1 > /proc/sys/net/ipv4/ip_forward     iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to-source 192.168.2.101      192.168.2.101 is the wlan0 IP address. I can't ping 192.168.2.2 (connect: Network is unreachable) and the connection doesn't seem to be working anymore on the notebook.


I can't find my tape library changer under centos 5 with a quantum scalar i40

i have a quantum scalar i40 connect on a centos 5 machine trough SAS interface. I fight with it since a while because the media changer does not work. I finally understood yesterday that the system does not see the changer at all. I can see my tape drives but not the changer. On my hardware i see :               # lsscsi      [0:3:0:0]    tape    HP       Ultrium 5-SCSI   Z38Z  /dev/st0     [0:3:0:1]    tape    HP       Ultrium 5-SCSI   Z38Z  /dev/st1      And i should have the mediumx QUANTUM field like on this output :               [3:0:2:0]    tape    HP       Ultrium 5-SCSI   Z58Z  /dev/st1     [3:0:3:0]    tape    HP       Ultrium 5-SCSI   Z58Z  /dev/st2     [3:0:3:1]    mediumx QUANTUM  Scalar i40-i80   135G  -      I am using this set of modules :               scsi_mod              199641  15 mpt2sas,scsi_transport_sas,sg,be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2,scsi_transport_iscsi2,scsi_dh,st,libata,aacraid,sd_mod      My kernel version is : 2.6.18-308.el5 I need help. Thanks


IO Error in rsync while doing everyday backup

I have a sample NAS server (QNAP TS-210), with very limited Linux on-board (although a bit reinforced with Optware/IPKG). I'm a Linux newbie. After digging through Internet I was able to write my own backup script, using rsync for syncing files between NAS hard drive and external USB drives, and with CRON for running this script periodically. Everything was fine until few days before. E-mails generated by backup script started containing information `IO error encountered -- skipping file deletion` for many resources (folders) being backed up. When I run the very same script via SSH I got a lot of error lines saying "`cannot send file with empty name in...`", followed by "`rsync error: some files/attrs were not transferred (see previous errors)`". 100% of content I'm backing-up comes from Windows (I use NAS only to backup my own computers). This system does not allows to create a file with empty name. This problem exists for only few days and I was not modyfing my backups for over a few weeks (vacation). So this has to be Linux (on-board my NAS) issue. Question is: what can cause files to appear with empty names? How can I get rid of them (when I `cd` to folder mentioned in rsync report, and do `ls -ls`, I see nothing like "file with an empty name"), so next rsync pass would end up without such errors. And finally -- how to avoid getting such files in future?


Show PATH in a human-readable way

I want to show my PATH environment variable in a more human-readable way.               $ echo $PATH     /Users/arturo/.rvm/gems/ruby-1.9.3-p392/bin:/Users/arturo/.rvm/gems/ruby-1.9.3-p392@global/bin:/Users/arturo/.rvm/rubies/ruby-1.9.3-p392/bin:/Users/arturo/.rvm/bin:/usr/local/git/bin:/Users/arturo/.gvm/groovy/current/bin:/Users/arturo/.gvm/grails/current/bin:/Users/arturo/.gvm/griffon/current/bin:/Users/arturo/.gvm/gradle/current/bin:/Users/arturo/.gvm/lazybones/current/bin:/Users/arturo/.gvm/vertx/current/bin:/Users/arturo/.gvm/bin:/Users/arturo/.gvm/ext:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin      I'm thinking in something like this:               $ echo $PATH | some cut and awk magic     /Users/arturo/.rvm/gems/ruby-1.9.3-p392/bin     /Users/arturo/.rvm/gems/ruby-1.9.3-p392@global/bin     /Users/arturo/.rvm/rubies/ruby-1.9.3-p392/bin     /Users/arturo/.rvm/bin     ...


Disable the configuration tool in Zsh

When there is no `.zshrc` file in a user's home directory and `zsh` is started, an interactive configuration utility is run instead of directly giving access to the shell prompt. I set up `zsh` to be the default shell on my Debian Wheezy systems. Therefore every newly created user gets `zsh` as login shell if I do not change that manually. Also there is a default `.zshrc` in `/etc/skel`, so all regular users on my system have a copy of the file in their home directory. This is not the case for system users. When I now change into a system user (for example the user for a specific network daemon) via `sudo` or `sh` I run into the configuration tool, because these users have no `.zshrc` in their home directories. It doesn't feel right to place a `.zshrc` into each and every daemon's home directory, which also would be a pain to setup and maintain on a lot of systems. But I still wouldn't want to downgrade to a less comfortable `bash` for these users. Is there a way to disable the `zsh` configuration tool without having to create a `.zshrc` file in the user's home directory? Additionally a way to setup a single file to be the system-wide default `.zshrc` for all users which don't have one would be nice too.


D-Link usb dongle detection problem [ Debian Wheezy ]

according to this topic,I was upgrade kernel from 3.2 to 3.12 (using .deb backport),But at installation process I get some error message like this :               # dpkg -Ri kernel3.12     Selecting previously unselected package firmware-realtek.     (Reading database ... 88145 files and directories currently installed.)     Unpacking firmware-realtek (from .../firmware-realtek_0.36+wheezy.1_all.deb) ...     Preparing to replace initramfs-tools 0.115 (using .../initramfs-tools_0.115_all.deb) ...     Unpacking replacement initramfs-tools ...     Selecting previously unselected package libjim0debian2:amd64.     Unpacking libjim0debian2:amd64 (from .../libjim0debian2_0.73-3_amd64.deb) ...     Selecting previously unselected package linux-image-3.12-0.bpo.1-amd64.     Unpacking linux-image-3.12-0.bpo.1-amd64 (from .../linux-image-3.12-0.bpo.1-amd64_3.12.9-1~bpo70+1_amd64.deb) ...     Setting up firmware-realtek (0.36+wheezy.1) ...     update-initramfs: deferring update (trigger activated)     Setting up initramfs-tools (0.115) ...     update-initramfs: deferring update (trigger activated)     Setting up libjim0debian2:amd64 (0.73-3) ...     Processing triggers for man-db ...     Setting up linux-image-3.12-0.bpo.1-amd64 (3.12.9-1~bpo70+1) ...     /etc/kernel/postinst.d/initramfs-tools:     update-initramfs: Generating /boot/initrd.img-3.12-0.bpo.1-amd64     **W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-3.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-1.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-1.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8402-1.fw for module r8169**     /etc/kernel/postinst.d/zz-update-grub:     Generating grub.cfg ...     Found background image: /usr/share/images/desktop-base/desktop-grub.png     Found linux image: /boot/vmlinuz-3.12-0.bpo.1-amd64     Found initrd image: /boot/initrd.img-3.12-0.bpo.1-amd64     Found linux image: /boot/vmlinuz-3.2.0-4-amd64     Found initrd image: /boot/initrd.img-3.2.0-4-amd64     Found Windows 8 (loader) on /dev/sda1     Found Windows 7 (loader) on /dev/sda2     done     Processing triggers for initramfs-tools ...     update-initramfs: Generating /boot/initrd.img-3.12-0.bpo.1-amd64     **W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-3.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-1.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-2.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-1.fw for module r8169     W: Possible missing firmware /lib/firmware/rtl_nic/rtl8402-1.fw for module r8169**      Also my Modem(D-Link DWM 156) still undetected! How can I fix this issue and is kernel upgrade is real way to my aim ? NOTICE : I was install both of usb-modeswitch & usb-modeswitch-data properly.


Wi-Fi working on and off, mostly off on a HP laptop - take two

I have a HP laptop with Intel Centrino 2230 N card. The system is Xubuntu 13. Wi-Fi works on and off. When it's down, it still connects to the network and obtains an IP address, but ping to the gateway doesn't work. The network has WPA2. Setting `wlan0` down and up doesn't help. Windows Wi-Fi on the same laptop works fine, so it's an issue with the Linux configuration. Also, the access point (TP-Link) works fine with a Mac. EDIT: N mode is disabled because it was slow. Any idea on how to fix it? Here's some diagnostic output:               $ iwconfig     eth0      no wireless extensions.          lo        no wireless extensions.          wlan0     IEEE 802.11bg  ESSID:"xxxxx"                 Mode:Managed  Frequency:2.437 GHz  Access Point: D8:5D:4C:xx:xx:xx                  Bit Rate=2 Mb/s   Tx-Power=16 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:on               Link Quality=58/70  Signal level=-52 dBm                 Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:28   Missed beacon:0               $ ip addr sh     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo            valid_lft forever preferred_lft forever     2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000         link/ether a0:b3:cc:49:e3:50 brd ff:ff:ff:ff:ff:ff     3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 84:a6:c8:82:3c:ff brd ff:ff:ff:ff:ff:ff         inet 192.168.1.100/24 brd 192.168.1.255 scope global wlan0            valid_lft forever preferred_lft forever               $ ip link sh     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000         link/ether a0:b3:cc:49:e3:50 brd ff:ff:ff:ff:ff:ff     3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000         link/ether 84:a6:c8:82:3c:ff brd ff:ff:ff:ff:ff:ff


having trouble using sshfs for multiple simultaneous reads/writes

I am using `sshfs` to export my file system to a remote which I use for computations. I don't want edit the `/etc/fstab` on the server so I can't use `nfs`. On the server I import my folder by               sshfs user@mybox:/myfolder ~/remotes      When I try to run computations using `openmpi` :               mpirun -np 64 myprogram -parallel      I get file not found errors even though the files are displayed when i do an `ls`. The problem seems to be related to multiple simultaneous reads, since it works flawless when doing single core computations.


csh: Is there a prompt outside of $prompt?

Consider this c-shell grab:               [<my-user>@<my-host> ~]>echo $SHELL     /bin/csh     \033]30;<my-host-name>\007\c     [<my-user>@<my-host> ~]>set | grep prompt     prompt  [%n@%m %~]%#     prompt2 %R?      prompt3 CORRECT>%R (y|n|e|a)?      \033]30;<my-host-name>\007\c     [<my-user>@<my-host> ~]>     \033]30;<my-host-name>\007\c      (the identity of the user and host is masked to protect the innocent) I can't figure out where the `\033]30;<my-host-name>\007\c` after each line comes from, and how to make it go away. unsetting the $prompt* variables, googleing, and grepping in the .csh* files yielded no answer. Any ideas?


slow down of mpi by Torque

I'm running Torque with Open MPI on a cluster with 30 nodes and 360 cores. I have found that the wall time of `mpirun -np N ~./myjob` and `qsub -l nodes=1:ppn=N mpirun -np N ~./myjob` differs many times. For small jobs it grows from 1.2 s to 20 s, from 2 s to 37 s and so on.   For larger jobs the difference becomes important. How to overcome it?


How do I switch to the Oxygen GTK feature in KDE?

I want to try the new oxygen to gtk port for kde 4.6. But I'm not sure how to enable it. I currently use qtcurve for gtk.


Cannot access network on the command line in Ubuntu 10.04

I am having an issue which I am unable to diagnose. I am unable to access outside the local network from the command line. Strangely, ftp works from the command line. But ping, links, traceroute, wget or other utilities are unable to connect. The network works fine from graphical browsers like firefox. We have a network proxy at the workplace which I set using environment variables http_proxy and so on. Any ideas on how could I diagnose this? Thanks.


Arch Linux + Gnome: Wine going berserk on "open with" menu

First of all, when I installed Wine on my system, it decided to automatically associate its "notepad" application with all types of text and image files. This was annoying enough, but on top of that, whenever I choose the "open with" dialog, I find that Wine has filled it with hundreds of duplicate entries. Most of them are just labeled "A Wine application" with no icon, but any time I install another program with Wine, it adds 5-10 entries for that application as well. How do I fix or disable this?


Are there distros that still ship GTK+ 1?

GTK+ 1 has been deprecated some years ago, and I'm curious if there's still anyone shipping it and/or apps using it. Also, are there still actively- developed apps using it?


Launch a GNOME session from terminal

I'm sshing into my friends machine and I'm wondering how would i launch a GNOME session over SSH? I need to open a web browser on his machine to view something which can only be done from his hostname. What's the easiest way to achieve this via SSH?


How to create yaboot partition using a ppc Mac

My computer g4 1.5 ghz PowerBook ppc I need to use this computer to make a yaboot partition on a USB stick. Here is documentation for making a yaboot partition with a Linux machine: http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/index.en.shtml but how do I do this with Mac OS 10.5?


What is a program I can use to mess up a GNU/Linux system in an automated way?

I once ran across a program that, when run on a GNU/Linux system, would automatically screw up something about the system. Maybe it would corrupt the users database. Maybe it would mess with the boot files. You wouldn't know. (Obviously, it was supposed to be run in a VM.) Then you (the sysadmin) would have to fix the box for practice. I've lost the link to this program. Does anyone know what it's called?


Mailing output of cron

I have this script which I run once a month, and I want to get the output sent to my email. If I run it manually like so, then the standard output is sent to my email.               ./monthly_mail.sh | mail -s "Mail purged" email@email.com      But when I added the following line to my `crontab`, I just get a blank email. Why isn't the stdoutput of the script piped to `mail`?               * * 2 * * /var/mail/monthly_mail.sh | /usr/bin/mail -s "Mail purged" email@example.com


Run shell scripts through a website

I have been reading and searching on what is the **best** way to run my shell scripts through a website. My goals are as follows:   * Browse a folder   * Select folder or contents   * onclick will run script   * Files will be modified and output results inside a `.txt` file I have searched mostly for CGI but I know there maybe other alternatives. Also, I am using a Linux hosting server from a 3rd party company. I did run across these helpful sites for others to read: CGI Security & YoLinux


How can I responsibly run updates automatically on Arch Linux?

I'm a bit of a newcomer to Arch Linux and still getting used to some of its paradigms. I come with a lot of habits from another distro that was quite a bit more structured and in some ways predictable. One thing I would like to do with a few systems¹ is enable a cron job to do automatic updates of all system packages. This seems like it would be pretty easy except I also want some meaningful feedback from the system telling me how things went that was not so verbose that I end up ignoring it until I discover the system is acting up.   * The full output of `pacman` is unnecessary. I don't care how long the downloads took or that it is on update 46 of 53.   * For the most part I don't care about successes.   * I do care about errors. If an update run fails I want to know about it and any specific error messages should be patched through.   * I do care about the "notices" given off during install. For example today's systemd update said: > >     :: coredumps are no longer sent to the journal by default. To re- > enable:   >     echo >/etc/sysctl.d/50-coredump.conf \   >         "kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s > %t %e" >   Or filesystem produced this: > >     warning: /etc/group installed as /etc/group.pacnew   >     warning: /etc/passwd installed as /etc/passwd.pacnew   >     warning: /etc/shadow installed as /etc/shadow.pacnew >   This last category is actually what prompted me to ask this question because it seems these are very inconsistent across the package set. Some of these seem to be generated by `post_upgrade()`, others by `install()`, etc. Sometimes they are written to stdout, sometimes to stderr. The format of the messages varies widely: sometimes a whole block is prefixed on indented in some way, other times there is just a bare echoed string. I want to know about things that may require my intervention on a system but not be bothered otherwise. Is there a tool out there that intelligently manages this data and simplifies the system administration? Is there any way to get the output generated by packages separately from the pacman process installing them? Or am I on my own to write some kind of parser that filters out benign stuff from the install log? ¹ Before you jump all over how stupid this is please note that I'm smart enough to not do this on production servers and not without snapshot based full system backups that would make recovery easy in the event of a catastrophe.


How to set a directory's permissions for group read/execute access

I am running Arch and have just install XAMPP. I have change changed my document root to /srv which is a separate EXT4 partition. I have set the Apache HTTP server to use a group called "http". I have added my user to the http group. I want every file created in the /srv folder to assigned to the HTTP group and for all the files to have group read and execute access. I have ran the following commands:               sudo chgrp -R http /srv/     sudo chmod -R g+rwxs /srv/      And set the umask at the bottom of my ~/.bashrc to: > umask 002 However I notice 2 things:   1. When I extract a zip file that is owned by the http group, the group of the immediate folder that is created by my archive application is owned by http but all the subdirectories and files are still owned by the default "user" group.   2. Creating a new file with nano gives me a different permission (-rw-rw----) than creating one with Gedit (-rw-r--r--). What umask should I be using to force `user - all`, `group - read/execute`, `others - none`? How do I force all files to be owned by http regardless of what program creates them there?


Convert every pdf in the current directory to png

I want to write a `bash` script to convert every .pdf file in the current directory into a .png file. For example:               $ls .     a.pdf b.pdf     $./pdf2png.sh     Converting pdfs to pngs     a.pdf -> a.png     b.pdf -> b.png      This is my best attempt:               #!/bin/bash     convert -verbose -density 500 -resize '800' a.pdf a.png     convert -verbose -density 500 -resize '800' b.pdf b.png


Find if the file is compressed or not

I need to find whether the file is compressed or not in script.If it is compressed I need to `uncompress` and send as `attachement`. My find command results in two files `sum12.pdf.Z` and `sum23.pdf.Z` My script is               dir=/home/as1234/bills     cd $dir     for file in `find . -ctime -1 -type f -name "Sum*pdf*"`     do     if [ ${file: -1} == "Z" ]; then     echo "$file is Zipped"     uncompress $file     uuencode $file     fi     done     uuencode $file $file | mailx -s "subject" abc@gmail.com      when I ran this script I got error like                ${file: -1}: 0403-011 The specified substitution is not valid for this command.      I am using `ksh`. Please help me what is wrong in this.


Why can't I connect to a hidden SSID in Edubuntu?

I'm running a godforsaken version of Edubuntu and I'm trying to get it to connect to a wifi with a hidden SSID. I've scoured the internet for the past hour or so, trying to find anything similar and the closest I could find was mention of Kubuntu and an issue with KDE, but that solution doesn't work for me. Adding the network manually does seem to locate the network, but every time I type the password to connect to it, it literally does nothing. Is there a way to do it manually or am I locked out of the internet forever? I'm not really proficient in all things Linux, so I'd appreciate a lengthy answer on how things are set up, as well as how to "fix" it.


Gem.e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT?

The u-boot prints these before launching the kernel               Gem.e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !     BOOTP broadcast 1     BOOTP broadcast 2     BOOTP broadcast 3     BOOTP broadcast 4     BOOTP broadcast 5     Retry count exceeded;       Is there any way I can bypass this auto negotiation ? The bootdelay is 0, so I will not have any access in a running system,so I will like to modify this in a the source code.


VSFTPD Configuration with Shared folder in Oracle Linux 6.5

I'm trying to configure VSFTPD, for each user to have a PublicFTP directory, since all users are chrooted, but they still need a central FTP dir. I've created this directory in each of the local system users, and created the shared directory in `/var/www/public_ftp` with an ownership of "Developers" group and chmodded to 775. Next step was to add the entries in `/etc/fstab`. I even restarted the server and the vsftpd service. When I login to a user from Developers group and create a file in their PublicFTP directory the file is created and shows up under `/var/www/public_ftp`; just like as in any other user's PublicFTP directory. Now, if I login via FTP and try to upload a file to the PublicFTP folder, I get permission denied message.               drwxrwxr-x.  2 root    Developers 4096 Mar 28 10:49 PublicFTP    /home/<user>/PublicFTP     drwxrwxr-x.  2 root    Developers 4096 Mar 28 10:49 public_ftp   /var/www/public_ftp      groupmems -g Developers --list > the list contains the . _/etc/vsftpd/vsftpd.conf:_               anonymous_enable=NO     local_enable=YES     write_enable=YES     local_umask=022     dirmessage_enable=YES     xferlog_enable=YES     xferlog_std_format=YES     connect_from_port_20=YES     ascii_upload_enable=YES     ascii_download_enable=YES     ls_recurse_enable=YES     listen=YES     pam_service_name=vsftpd     userlist_anble=YES     tcp_wrappers=YES     use_localtime=YES     chroot_local_user=YES      _/etc/fstab:_               /var/www/public_ftp    /home/<user>/PublicFTP    none    bind    0 0      ### Sample Scenario   1. Login to the server and touch a file.              $ cd /home/<user>/PublicFTP     $ touch Hi.txt     $ ls -la     -rw-r--r--.  1 <user> users 0 Mar 28 11:05 Hi.txt        2. Confirm on the server side.              $ cd /var/www/public_ftp     $ ls -la     -rw-r--r--.  1 <user> users 0 Mar 28 11:05 Hi.txt        3. Open some FTP application from a client machine and connect to the FTP server and login.   4. Navigate to PublicFTP directory is empty. Kinda funny since on the server it's clearly visible.   5. Try to copy a file. An error occurred copying a file to the FTP Server. Make sure you have permission to put files on the server.              Details:     200 Switching to binary mode.     227 Entering Passive mode (10,232,118,108,90,133).     553 Could not create file.        6. The contents of the log file:              Mon Mar 31 09:52:07 2014 [pid 17629] [<user>] OK LOGIN: Client "xxx.xxx.xxx.xxx"     Mon Mar 31 09:52:07 2014 [pid 17634] [<user>] FAIL DELETE: Client "xxx.xxx.xxx.xxx", "/PublicFTP/proxy.txt"


Is there something like closures for zsh?

I just decided to try zsh (through oh-my-zsh), and am now playing with `precmd` to emulate a two-line prompt that has right prompts in more than just the last line. So I clone the default theme, and inspired by this post (that I'm using to learn a lot too), i do somehting like this (I'll add colors later):               function precmd {         local cwd="${(%):-[%~]}"         local who_where="${(%):-%n@%m}"         local git_info=${(%)$(git_prompt_info)}         local right_prompt="     $git_info [$who_where]"         local left_prompt="${(r:(($COLUMNS - ${#${right_prompt}})):: :)cwd}"              echo "$left_prompt$right_prompt"     }      And it works. But I can't help but wonder: is zsh defining all those variables every time precmd is called? I've been googling for closures, scope and namespacing in relation to zsh, looking to attach the local vars as data to precmd, so it doesn't need to redefine the variables every time, but I have found nothing. Is there some way to do what I'm trying, or should I just drop it? As a side note, and only if it is related, what does "to have a function loaded" mean?


How to know the path to a specific file in a zip archive, without extracting it?

I only know the filename but not its exact location. I would like to extract only that file from the archive. And I need to know its location in the archive.


What does -fnoninteractive mean in a call to debconf-communicate?

My title is the question. I'm looking at a script which makes a popen call to debconf-communicate with a cli argument -fnoninteractive. What does the -fnoninteractive do?


Emptying a file without disrupting the pipe writing to it

I have a program whose output I redirect to a log file:               ./my_app > log      I would like to clear (i.e. empty) the log from time to time (on demand) and tried various things like               cat "" > log      However it always seems that the original pipe is then disrupted and the program doesn't redirect its output to the log file anymore. Is there some way to do that? **Update** Note that I cannot modify the application producing the output. It just spits it out to stdout and I want to save it in a log so that I can inspect it when I need it, and clear it when I want. However I shouldn't need to restart the application.


Problem with xmobar

I'm setting up an xmonad window manager and I came across following problem - when I try to configure xmobar and run it it shows:               xmobar: .xmobarrc: configuration file contains errors!     Usage: xmobar [OPTION...] [FILE]     Options:       -h, -?        --help               This help       -V            --version            Show version information       -f font name  --font=font name     The font name       -B bg color   --bgcolor=bg color   The background color. Default black       -F fg color   --fgcolor=fg color   The foreground color. Default grey       -o            --top                Place xmobar at the top of the screen       -b            --bottom             Place xmobar at the bottom of the screen       -a alignsep   --alignsep=alignsep  Separators for left, center and right text                                          alignment. Default: '}{'       -s char       --sepchar=char       The character used to separate commands in                                          the output template. Default '%'       -t template   --template=template  The output template       -c commands   --commands=commands  The list of commands to be executed          Mail bug reports and suggestions to <andrea.rossato@unitn.it>      My configuration file               Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"            , bgColor = "black"            , fgColor = "grey"            , position = Top            , commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000                         , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10                         , Run Memory ["-t","Mem: <usedratio>%"] 10                         , Run Swap [] 10                         , Run Date "%a %b %_d %l:%M" "date" 10                         , Run StdinReader                         ]            , sepChar = "%"            , alignSep = "}{"            , template = "%StdinReader% }{ %cpu% | %memory% * %swap%    <fc=#ee9a00>%date%</fc> | %EGPF%"            }      Configuration copied from haskell wiki. My version of xmobar is 0.9.2.


How to change Fedora 14 dual-monitor default behavior (No clone)

I am running F14 on my laptop, and I use it either with or without an external screen.               [nbarraille@barraille ~]$ xrandr | grep " connected "     LVDS1 connected 1280x800+1280+0 (normal left inverted right x axis y axis) 304mm x 190mm     VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm      When the VGA screen is plugged in, everytime I reboot the system sets it up so that VGA1 is a clone of LVDS1 and I have to do a:               xrandr --output VGA1 --left-of LVDS1      How can I change it to be the default behavior? Thanks!


Understanding ps elapsed time format for long running processes

I'm using a `ps` command as part of an exercise to identify processes running longer than a given threshold. I'm using the following template to get the elapsed time for a know process command: `ps -eo etime,command | grep <something to identify a process> | grep -v grep | awk '{print $1}'` I notice with short-running processes, the etime (elapsed time) value takes the format `minutes:seconds` and from this I can easily determine how long a process has been running. For very long running processes (days long), I don't understand the format. I have a MySQL server process that `htop` shows as running for 126 hours. Executing `ps -eo etime,command | grep mysql | grep -v grep | awk '{print $1}'` gives me a value of `9-03:35:32`. My best guess is that this means 9 something, 3 hours, 35 minutes, 32 seconds. I can't figure out what the units are for the 9. The process in question has been running 126 hours, about 5.25 days. This suggests that the 9 in the above output does not represent days. They can't be half days either as (9 * 12) hours + 3 hours + 35 minutes + 32 seconds is less than 5 days. How do I interpret the elapsed time value I am seeing for long-running processes? What units accompany the 9 in the above output?


Setting a default todo list in KOrganizer

I've been using KOrganizer's calendar for awhile now, synching it with my Android phone's calendar using Google's calendar. Now I want to start using the todo list. Synching it with my phone using Google tasks was easy(cause I've already done most of the work when I did it for the calendar), and I can create tasks via my computer and check them via my phone. Now, the input line at the bottom of the todo list in KOrganizer is supposed to allow me to easily type tasks for my todo list, but when I type the task and press Enter, KOrganizer opens a dialog, prompting me to choose between my Google tasks list and the local todo list. Is there a way to disable this dialog, sending all new tasks created via this input line to Google tasks by default?


backup / on ntfs filesystem encrypted

I was about to backup my archlinux, following this guide to my FritzBox, (which enforces a NTFS system that I mounted via samba) as I remembered, that NTFS is not capable to keep permissions and other stuff like symlinks. There is also no encryption available which is really bad because it would break the idea to encrypt my laptop :) So I was wondering if there is a method which can do incremental backups like rsync but creates something like an encrypted tarball 'on the fly'?


Mystifying command not found at login

I've just set up Arch Linux (not my first time). Everything installed correctly but when I login (X isn't installed yet) I see:               Arch Linux 3.8.4-1-ARCH (tty1)          mgoszcz2 login: root     Password:     Last login: Thu Mar 28 21:47:57 on tty1     -bash: en_IE.UTF-8: command not found     [root@mgoszcz2 ~]#      Anyone knows what's causing this? Any way to fix this?


BUG: soft lockup - CPU# stuck for x seconds

I've seen a few bug reports and questions (on stackexchange and elsewhere) regarding a nagging `"BUG: soft lockup - CPU#<n> stuck for <dt>s!"`. So far, I haven't found any clue as to **what to do or try** (rather, the clues I've found and followed haven't stopped this from happening). I am further concerned about this because:   1. the frequency of these events seems to have been slowly on the rise lately (over 700 per month),   2. `yum update` and reboot slowed it down a bit for a while but I have seen some lockups starting to happen again,   3. several processes (if not the whole host, it's hard to tell), certainly including all my interactive shells are frozen for some amount of time when it happens,   4. I'm not sure whether it is related, but I see lots of log/messages related to ntpd not being able to update the clock. The following is an excerpt of `$(grep 'soft lockup' /var/log/messages*)`:               Mar 22 10:02:35 localhost kernel: BUG: soft lockup - CPU#15 stuck for 10s! [kjournald:1048]     Mar 22 10:02:36 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]     Mar 22 10:02:36 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]     Mar 22 10:02:37 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]     Mar 22 10:02:37 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]     Mar 22 10:02:38 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]     Mar 22 10:02:38 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]     Mar 22 10:02:39 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]     Mar 22 10:02:39 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]     Mar 22 10:02:40 localhost kernel: BUG: soft lockup - CPU#15 stuck for 25s! [swapper:0]     Mar 22 15:42:16 localhost kernel: BUG: soft lockup - CPU#8 stuck for 25s! [kjournald:1048]     Mar 22 18:22:13 localhost kernel: BUG: soft lockup - CPU#15 stuck for 10s! [postgres:21356]     Mar 22 18:22:20 localhost kernel: BUG: soft lockup - CPU#7 stuck for 10s! [java:8653]     Mar 22 18:22:20 localhost kernel: BUG: soft lockup - CPU#8 stuck for 72s! [kjournald:1048]     Mar 22 21:21:37 localhost kernel: BUG: soft lockup - CPU#12 stuck for 29s! [kjournald:1048]     Mar 22 21:22:07 localhost kernel: BUG: soft lockup - CPU#12 stuck for 27s! [kjournald:1048]     Mar 23 02:01:47 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [kblockd/8:276]     Mar 23 02:02:22 localhost kernel: BUG: soft lockup - CPU#8 stuck for 34s! [kblockd/8:276]      This happens to random processes, and seems fairly well distributed over the 16 "cores" of that virtual host. The host is an AWS EC2 "cc1.4xlarge" instance, with an AMI named "EC2 CentOS 5.5 GPU HVM AMI (Driver 260.19.29) (ami-42a2532b)". It seems to be virtualized with Xen. `cat /etc/redhat-release` yields `CentOS release 5.9 (Final)`. `'free'` reports 21G of RAM. The head of `dmesg` is:               Linux version 2.6.18-348.3.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Mon Mar 11 19:39:25 EDT 2013     Command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet console=tty0 console=ttyS0,115200n8     BIOS-provided physical RAM map:      BIOS-e820: 0000000000010000 - 000000000009fc00 (usable)      BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)      BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)      BIOS-e820: 0000000000100000 - 00000000c0000000 (usable)      BIOS-e820: 00000000fc000000 - 0000000100000000 (reserved)      BIOS-e820: 0000000100000000 - 00000005dd800000 (usable)     DMI 2.4 present.     DMI: Xen HVM domU, BIOS 3.4.3-2.6.18 08/29/2012     ACPI: RSDP (v002    Xen                                ) @ 0x00000000000ea020     ACPI: XSDT (v001    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc0062b0     ACPI: FADT (v004    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc005ee0     ACPI: MADT (v002    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc005fe0     ACPI: SRAT (v001    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc0060c0     ACPI: SLIT (v001    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc006240     ACPI: HPET (v001    Xen      HVM 0x00000000 HVML 0x00000000) @ 0x00000000fc006270     ACPI: DSDT (v002    Xen      HVM 0x00000000 INTL 0x20090220) @ 0x(null)      The following shows a cumulative count of these "soft lockups" over recent time (the redline is when I did the last `yum update` followed by `reboot`): ![cumul count of soft lockups](http://i.stack.imgur.com/zqkka.png). The following shows the histogram of duration (how long is the host stuck): ![duration histogram](http://i.stack.imgur.com/iqNZj.png).


different loopback mounted volumes exported through NFS are seen as 1 by the client

I have a rather peculiar problem. I'm running `3.2.0-58-generic #88-Ubuntu` (Ubuntu 12.04) and I have mouonted the following loopback devices:               cat /proc/mounts | grep loop         /dev/loop0 /work/kernel/AEL/fpga-filesystem ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0         /dev/loop1 /work/kernel/AEL/model-filesystem ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0          sudo losetup -a     /dev/loop0: [fc02]:4990567 (/work/kernel/AEL/openembed-fpga.img), offset 54525952     /dev/loop1: [fc02]:4990564 (/work/kernel/AEL/vexpress64-openembedded_minimal-armv8-gcc-4.8_20140222-611.img), offset 54525952      The 2 .img files are completely separate files and not symlinks:               ls -li /work/kernel/AEL/           2 drwxr-xr-x 21 root     root           4096 Mar 26 20:14 fpga-filesystem           2 drwxr-xr-x 21 root     root           4096 Mar 26 20:05 model-filesystem     4990567 -rw-r-----  1 nikbor01 nikbor01 3221225472 Mar 27 09:47 openembed-fpga.img     4990564 -rw-r-----  1 nikbor01 nikbor01 3221225472 Mar 26 20:06 vexpress64-openembedded_minimal-armv8-gcc-4.8_20140222-611.img      The reason why the 2 directories have the same INODE number is that the images are the same (as in have the same content) but are clearly mounted under a different loop device. And finally I export the 2 directories where the images are mounted via nfs:               /work/kernel/AEL/fpga-filesystem *(rw,sync,no_subtree_check,no_root_squash,insecure)     /work/kernel/AEL/model-filesystem *(rw,sync,crossmnt,no_subtree_check,no_root_squash,insecure)      And now the pinnacle of everything - when I mount fpga-filesystem on client1 and model-filesystem on client2 they both see the same filesystem (e.g. the one under fpga-filesystem). Here is the mount on client1:               10.1.209.36:/work/kernel/AEL/fpga-filesystem / nfs rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.1.209.36,mountvers=3,mountproto=tcp,local_lock=all,addr=10.1.209.36 0 0      And on client2:               10.1.209.36:/work/kernel/AEL/model-filesystem / nfs rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.1.209.36,mountvers=3,mountproto=tcp,local_lock=all,addr=10.1.209.36 0 0      However, when I do `ls /` on both clients I see the conents of only the fpga- filesystem directory, which makes absolutely no sense. Any ideas how i might be able to debug the issue.


How do I get the menu bar to reappear

This sound like a really simple thing, but it has me stumped. I was using Thunar file manager on my Xfce desktop and I wanted to try it without the menu bar at the top (the one with File, Edit, View and so on), so I disabled it through View > Menu Bar (or something similar). After realising how much I use and rely on it, I wanted it back, but could not find an option anywhere to re-enable it. I tried using the Alt key and the file manager preferences, but couldn't find anything. Surely there's an option _somewhere_.


How to copy access.log lines by time?

I have a huge webserver access.log in CentOS. I access it over remote VPN so I cant copy the file or read it directly. I know the specific time in the logs I want to copy, but it is too far back too easily copy a tail of the log to a text file. Here is what a line of the log looks like.               10.255.16.203 - - [26/Mar/2014:16:35:13 +0000]      _So my question is_ : **How can I copy a specific section of a very large log if I know the time strings I want to find?**


CRON Permission Denied

I have a Debian 7. 3 Server with WebMin installed. I configured a cron job to run every minute as root user, so I run the command crontab -l when I'm logged in as root it shows:               * * * * * /usr/bin/php -q /home/myfolder/cron.php      The permissions of that file are the following:               -rwxr--r-- 1 root root 1617 Jan 18 15:17 /home/myfolder/cron.php      When I go to the cron.log file in /var/log folder I see this error repeated every minute:               Apr 16 12:25:01 ns3313699 CRON[25370]: Permission denied      the result of the command ls -ld /usr/bin/php /home/myfolder is:               drwxrwxr-x 20 myfolder www-data 4096 Apr 16 11:43 /home/myfolder     lrwxrwxrwx 1 root root 21 Jan 18 11:05 /usr/bin/php -> /etc/alternatives/php


How to use gnu sort to sort lines with field delimiter present only on some lines

In my .vimrc I list my vundle bundles like so:               cat ~/.vimrc          ...     Bundle 'Raimondi/delimitMate'     Bundle 'kien/ctrlp.vim'     Bundle 'matchit.zip'     Bundle 'upAndDown'     Bundle 'rking/ag.vim'     ...      Now, I would like to quickly sort my Bundle list by the bundles name, which works for lines where `/` is present, like so:               cat ~/.vimrc | sort -t "/" -k2,2          ...     Bundle 'matchit.zip'     Bundle 'upAndDown'     Bundle 'rking/ag.vim'     Bundle 'kien/ctrlp.vim'     Bundle 'Raimondi/delimitMate'     ...      How would I sort lines where there is no`foo/` prepended to the bundles name, as is the case e.g. for `Bundle 'matchit.zip'`?


wlan on Elastix (unix)

I have Elastix server on a Vmware virtual machine (nat). I want to connect the Elastix server to a wifi network in order to access the server from another client (machine) in the same network.The problem is that server does not detect my wifi wireless card. How to install the wireless device in Elastix?


login 'authentication failure' by non-root user, can login only by root

In my CentOS 6.0 system, working since months, suddenly stop authenticating non-root users, in graphical mode.   * I have checked necessary `/etc/pam.d/*` files, but those are unchanged.    * SELinux is disabled.    * I have also tried configuring autologin, but the cursor starts rotating in wait state and nothing is happening beyond that.    * I have also changed Graphical Display Manager from GDM to KDE, but the problem is same.    * The problem is same after creating new user and trying to login with that.    * There also problem login remotely by ssh for the same non-root users.    * I am also getting 'system is going to halt in 1 min' message along with 'authentication failure' message, when entering password for any user.  There is no problem with root user. And there is no problem login to any user from terminal. Any suggestion?


Why u-boot starts so late after I give power

Running petalinux from sd card on ARM cortex A9 based zynq zc702 board. Zynq is an SoC with ARM and FPGA. Before the log messages (corresponding to u-boot) start printing, the screen (serail console)is blank, but power is already given. So there is conciderable time delay (acually around 10 seconds) between the point I give power and the u-boot log messages come on the screen. 1- What is happening during this time ? 2- How to minimize this time? 3- How to print log messages of this duration? My Uboot is in BOOT.BIn file, which has three components: 1- First Stage Boot loader (FSBL) 2- download.bit (FPGA configuration file) 3- Uboot I have noticed that if I skip download.bit file, teh resulting BOTT.BIN file is 500k. But If I keep download.bit file the resulting BOOT.BIN file is 4.2 MB. Is this (i.e download.bit)the reason of delay? **Log messages**               Power was give at approximately 14:32 and you can see u-boot is starting after 10 seconds.           [Tue Apr 08 14:42:30.650 2014]      [Tue Apr 08 14:42:30.650 2014]      [Tue Apr 08 14:42:30.650 2014] U-Boot 2013.07 (Apr 07 2014 - 13:23:59)     [Tue Apr 08 14:42:30.650 2014]      [Tue Apr 08 14:42:30.650 2014] Memory: ECC disabled     [Tue Apr 08 14:42:30.650 2014] DRAM:  1 GiB     [Tue Apr 08 14:42:30.662 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB     [Tue Apr 08 14:42:30.683 2014] In:    serial     [Tue Apr 08 14:42:30.683 2014] Out:   serial     [Tue Apr 08 14:42:30.683 2014] Err:   serial


kdm theme not working as expected after a resolution change

Using kdm, I am triggering a script in Xsetup which is assigning resoltuions to the screens. Somehow the kdm theme does not like this, the elements seem to be aligned for a larger resolution. Is there a way to tell kdm to pull the current display setting when setting up the greeter?


Change 4 mirrored HDDs to RAID 10

My boss has a large computer (12-core, 4 HDD computer that we use for scientific computing) and he has all of the HDDs mirrored. Is it possible to change this to RAID 10 without data loss and without needing to copy all of the data to a temporary HDD? OS: Mac OSX Mountain Lion. I can find out other details as necessary when I have access to the computer (unless there is useful information I can obtain by ssh'ing in and using the terminal).


Is it possbile to mount Windows filesystems without using the root account?

As we all know, the intervention of root is necessary to mount a filesystem on Linux. But is it possible to do this without access to the root account? Because I don't know the password of root.


Fast incremental searching of files from shell

I like the `command-t` script in vim editor that is able to intelligently and incrementally search for files. Is there some similar program that is able to search from shell? It would be great if it would support tagging mode, so that I could search based on tags. e.g.                 $ fnd -t pictures,cars         gives me the list of possibilities and I can type tab and shift-tab and select the picture I want   p1.jpg   p2.jpg   p3.jpg   p4.jpg   `$ fnd -t pictures,cars,porsche`   p2.jpg   p3.jpg   one tag added will narrow the results   I will summarize it : The application should support effective searching. Effective means it supports advanced features as as `incremental`, `search in content`, `tagging` or other clever technique. thank you for suggestions


How do I start my service at boot-time?

I'm trying to run a CherryPy app on my NetBSD 5.1 box. To have it start automatically, I've added this line to my `/etc/rc.local`:               /bin/httpd &      When I boot the machine, some of the output of the Webserver starting is visible, right after the `Starting sshd.` message. None the less, I can't connect to my web-server. I can log into the machine, and when I start the web-server by typing `httpd`, it all works well. What am I doing wrong? What is the correct way to have my program start on boot-time?


User can't touch -t

When SCP'ing to my Fedora server, a user keeps getting errors about not being able to modify file timestamps ("set time: operation not permitted"). The user is not the owner of the file, but we cannot `chown` files to this user for security reasons. The user can `sudo`, but since this is happening via an SCP/FTP client, there's no way to do that either. And finally, we don't want to have to give this user root access, just to allow him to use a synchronization like rsync or WinSCP that needs to set timestamps. The user is part of a group with full `rw` permissions on all relevant files and dirs. Any thoughts on how to grant user permission to `touch -t` these specific files without `chown`ing them to him? **Further Info** This all has to do with enabling PHP development in a single- developer scenario (ie: without SCM). I'm trying to work with Eclipse or NetBeans to work on a local copy of the PHP-based (WordPress) site, while allowing the user to "instantly" preview his changes on the development server. The user will be working remotely. So far, all attempts at automatic synchronization have failed - even using WinSCP in "watch folder" mode, where it monitors a local folder and attempts to upload any changes up to the remote directory error out because it always tries to set the date/timestamp. The user does have sudo access, but I have been told that it's really not a good idea to work under 'root', so I have been unwilling to just log in as root to do this work. Besides, it ought not to be necessary. I would want some other, non-superuser to be able to do the same thing - using their account information, establish an FTP connection and be able to work remotely via sync. So the solution needs to work for someone without root access. What staggers me is how much difficulty I'm having. All these softwares (NetBeans, Eclipse, WinSCP) are designed to allow synchronization, and they all try to write the timestamp. So it must be possible. WinSCP has the option to turn off "set timestamp", but this option becomes unavailable (always "on") when you select monitor/synchronize folder. So it's _got_ to be something that is fairly standard. Given that I'm a complete idiot when it comes to Linux, and I'm the dev "server admin" I can only assume it's something idiotic that I'm doing or that I have (mis)configured. **Summary** In a nutshell, I want any users that have group r/w access to a directory, to be able to change the timestamp on files in that directory via SCP.


Different Desktop for Different Users

How do I (if possible) set different default desktop environments for different users in linux? e.g. when user X login, Gnome Shell starts, when user Y login, Gnome starts. (I'm using ubuntu if it matters).


NVIDIA card fan spins faster when not in use

In my system I have an NVIDIA video card (GeForce 450 GTS) as an extra card (video output via motherboard ATI) for bitcoin mining. If I start mining, the fan speeds up a little, but the weird thing is, if I stop mining the fan starts to spin much much faster (generating lots of noise). And it doesn't stop doing that. What could be the cause? And how can I fix that?


Resize Disk on Linux

df     Filesystem                    1K-blocks    Used  Available Use% Mounted on     /dev/mapper/vg_cloud-lv_root   51606140 9985252   38999448  21% /     tmpfs                            515252       0     515252   0% /dev/shm     /dev/sda1                        495844   50675     419569  11% /boot     /dev/mapper/vg_cloud-lv_home 2059640248  203016 1954813516   1% /home      I have own cloud setup but it installs by default at /var/www/html/owncloud. Did not think the default partitioning would make /home the biggest. Is there a way to shift all of /home to the main root / mount?


How to get the latest GNOME shell in Fedora?

I want to try gnome-shell 3.5 but I dont see it in the repos, I'm using Fedora 17, is there any way adding gnome-shell 3.5 to my repos? Regards **Update:** Please note the question was asked on Aug 2012. Now i'm using Fedora 18 with gnome-shell 3.6 as on 29th jan 2013. what I meant was how to install the latest from gnome-development. I see that as of today GNOME shell 3.7 something is the latest but Fedora has 3.6 in its repos. Thats what my question is about, how to get the latest.


How to list and filter Samba users that need a password change?

Apparently, I can find out whether a Samba user needs a password change or not with the following command:               pdbedit -v -u userid | grep "Password must change"      I also see I can list all the Samba users with the command:               pdbedit -L -v      Which outputs about 10MB of data formatted like this:               ---------------     Unix username:        egbjt005$     NT username:          egbjt005$     ...     Password must change: Thu, 16 Aug 2012 07:33:58 NZST     ...     ---------------     Unix username:        eghwj001$     NT username:          eghwj001$     ...     Password must change: Fri, 20 Jul 2012 14:42:46 NZST     ...      The ... indicates several lines of data that's not of interest. The date will be in the past if the password is overdue to be changed. What I really want is a list of userids starting with a particular 2 character prefix (let's use "eg" as an example) that need a password change. How can I do this?


graph TCP connection performance based on `ss -i`

A nearby question has brought to my attention the `ss` utility on Linux, `another utility to investigate sockets`. It would appear that it may be a great tool to monitor the performance of, say, an ssh session over a portable mobile hotspot, where using ping would be fruitless.               # sh -c 'date; while(true); do echo -n `date +%H%M%S`" "; ss -i |fgrep -A1 :ssh |fgrep rtt |cut -d" " -f3- ;sleep 10;done'     Tue Feb 11 09:16:08 PST 2014     091608 wscale:2,7 rto:603.333 rtt:230.833/93.333 ato:63.333 cwnd:9 ssthresh:6 send 436.7Kbps rcv_rtt:104953 rcv_space:779096     091618 wscale:2,7 rto:626.666 rtt:228.75/100 ato:63.333 cwnd:9 ssthresh:6 send 440.7Kbps rcv_rtt:104953 rcv_space:779096     091628 wscale:2,7 rto:676.666 rtt:244.166/105.833 ato:63.333 cwnd:5 ssthresh:6 send 229.4Kbps rcv_rtt:104953 rcv_space:779096     091638 wscale:2,7 rto:663.333 rtt:232.5/103.333 ato:63.333 cwnd:6 ssthresh:6 send 289.0Kbps rcv_rtt:104953 rcv_space:779096     091648 wscale:2,7 rto:643.333 rtt:226.666/89.166 ato:63.333 cwnd:6 ssthresh:6 send 296.5Kbps rcv_rtt:104953 rcv_space:779096     091658 wscale:2,7 rto:736.666 rtt:249.166/122.5 ato:40 cwnd:6 ssthresh:6 send 269.7Kbps rcv_rtt:104953 rcv_space:779096     091708 wscale:2,7 rto:693.333 rtt:232.083/106.666 ato:40 cwnd:7 ssthresh:6 send 337.8Kbps rcv_rtt:104953 rcv_space:779096     091718 wscale:2,7 rto:683.333 rtt:228.75/86.666 ato:40 cwnd:7 ssthresh:6 send 342.7Kbps rcv_rtt:104953 rcv_space:779096     091728 wscale:2,7 rto:680 rtt:242.916/110 ato:40 cwnd:8 ssthresh:6 send 368.9Kbps rcv_rtt:104953 rcv_space:779096     091738 wscale:2,7 rto:503.333 rtt:183.333/12.5 ato:40 cwnd:40 ssthresh:9 send 2.4Mbps rcv_rtt:104953 rcv_space:779096     091748 wscale:2,7 rto:823.333 rtt:269.583/80 ato:43.333 cwnd:40 ssthresh:45 send 1.7Mbps rcv_rtt:104953 rcv_space:779096     ^C      My understanding is that `rtt` is probably the most interesting parameter here. Is there a way to monitor these parameters through some kind of non-pull-based API, or get even more info about the doings of an individual connection?


'iwlist' -> interface doesn't support scanning (Ubuntu LTS 10.04)

I am using Ubuntu 10.04 (LTS) on a Samsung N150+ netbook. I cannot scan wifi networks using `iwlist` and I would like to do so. Here is the output from some tests:               alex@alex-laptop:~/Desktop/GoogleCode$ iwlist eth1 scan     eth1      Interface doesn't support scanning.               alex@alex-laptop:~/Desktop/GoogleCode$ iwlist scan     lo        Interface doesn't support scanning.          eth0      Interface doesn't support scanning.          eth1      Interface doesn't support scanning.          pan0      Interface doesn't support scanning.      So I try `iwconfig`               alex@alex-laptop:~/Desktop/GoogleCode$ iwconfig     lo        no wireless extensions.          eth0      no wireless extensions.          eth1      IEEE 802.11  Access Point: Not-Associated              Link Quality:5  Signal level:207  Noise level:168           Rx invalid nwid:0  invalid crypt:0  invalid misc:0          pan0      no wireless extensions.      I have a `05:00.0 Network controller: Broadcom Corporation Device 4727 (rev 01)` from using `lspci`. Any hints?


How to make a folder private?

I'm using Ubuntu with several users and I want to make folders viewable just for a specific user. Any idea how to do it?


CUPS libusbx-devel is needed error when trying to build cups-1.7.1 from source

I have been trying to build CUPS 1.7.1 on RHEL 5.6 using               $ sudo rpmbuild -ta ./cups-1.7.1-source.tar.bz2      and was getting:               error: Failed build dependencies:             libusbx-devel is needed by cups-1.7.1-1.x86_64      I've since found this CUPS STR 4336 (https://www.cups.org/str.php?L4336) that described the same issue, with the comment on it to use `\--without-libusb1` build option. So I tried running:               sudo rpmbuild -ta ./cups-1.7.1-source.tar.bz2 --without-libusb1      but now getting:               --without-libusb1: unknown option      Any ideas how to get it to build and/or what I'm doing wrong here?


In what shared library is read()?

I'm a Linux rookie and want to know where the system call `read()` is. Which shared library is linked when I call read()?


Do I really need an antivirus on Debian 7?

I use Debian 7 and I visit unknown and different websites. I want to know that people say that we get virus form internet and those virus hack our Bank accounts. Do I really need any antivirus? I have 512 MB RAM. Also, I do not install software from our sources except repository. My RAM is 47% used. I have also installed Wine.


Can Xorg use non-square pixels? [or can we fake widescreen in a non-widescreen resolution?]

I have an older PC connected to an HD television over VGA. The set of screen resolutions available for me to use are all 4:3 aspect ratio (or there abouts). Output from `xrandr`:               $ xrandr     xrandr: Failed to get size of gamma for output default     Screen 0: minimum 320 x 240, current 1280 x 960, maximum 1360 x 1024     default connected 1280x960+0+0 0mm x 0mm        1280x1024      50.0     54.0          1024x768       51.0     57.0     58.0          800x600        52.0     60.0     61.0     62.0          640x480        53.0     65.0     66.0     67.0          1280x960       55.0*         1152x864       56.0          832x624        59.0          640x512        63.0     64.0          576x432        68.0          512x384        69.0     70.0     71.0          416x312        72.0          400x300        73.0     74.0     75.0          320x240        76.0     77.0     78.0        Is there any way to use one of these resolutions, but treat the pixels as non- square? In much the same way as widescreen SD television image is stored at 720x576 (I'm in a PAL region) but anamorphically stretched to 1024x576; can I treat a resolution of 1280x960 anamorphically as ~1706x960? Note: at present, the image is displayed in widescreen ratio, but this is a fake stretch. A drawing of a circle will display as an ellipse; I would like to utilise the full screen width, but retain the correct proportions for any images on display. In case it affects any possible solutions, I am running Fedora 18, using an nVidia Geforce 5500 FX, Toshiba 37" 1080p LCD tv.


Equivalent of these commands in the following distros

These commands:               dpkg -i     apt-get install     apt-get update     apt-get remove     apt-get dist-upgrade     apt-get purge      in these distros: Opensuse, Fedora, Gentoo, Arch, Slackware.


SMTP Issue: did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

We had a urgent requirement for creating a mail server to send mail for our Portal application using Liferay. The mail account will be an administrative account to maintain the portal. I was able to send mail successfully using sendmail. But when sending mail through Liferay, mails are not sent and could see the following error in the mail log file with `grep ': r5R5jcf9031963: ' /var/log/maillog`:               Jun 27 11:15:38 testser sendmail[31963]: r5R5jcf9031963: [192.168.12.12]  did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA      Some system information:               $ rpm -q sendmail     sendmail-8.13.8-8.el5     $ cat /etc/redhat-release     CentOS release 5.5 (Final)      For configuring mail in Liferay, I entered the following information: SMTP Server, SMTP port, username and password. But if I keep "Username and Password" blank in the Liferay portal settings, mails are sent successfully. In that case mails are sent from the default `test` Liferay user. But I want the mail to be sent from the user which I configured using sendmail rather than from the default Liferay user.


How to set default editor/viewer for Midnight Commander to Sublime

The question is quite straightforward, so no further description is needed according to me. I just add that I am running Ubuntu 13.04. Any help is welcomed.


How to detect if the FreeBSD disklabel is on the first sector of the disk?

I have attached a FreeBSD disk to my Linux machine. How to detect if the _disklabel_ (aka _bsdlabel_ ) is on the first sector of the disk or the PC MBR is on the first sector of the disk and _disklabel_ is nested inside the primary partition of the PC MBR? _fdisk_ tells following:               T42 ~ # fdisk -lu /dev/sdc     This disk has both DOS and BSD magic.     Give the 'b' command to go to BSD mode.          Disk /dev/sdc: 256 MB, 256901120 bytes     8 heads, 32 sectors/track, 1960 cylinders, total 501760 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1   *          32      187903       93936   a5  FreeBSD     T42 ~ #       First 512 bytes of the disk can be seen below:               T42 ~ # dd if=/dev/sdc count=1 | hexdump -C     00000000  fc 31 c0 8e c0 8e d8 8e  d0 bc 00 7c be 1a 7c bf  |.1.........|..|.|     00000010  1a 06 b9 e6 01 f3 a4 e9  00 8a 31 f6 bb be 07 b1  |..........1.....|     00000020  04 38 2f 74 08 7f 78 85  f6 75 74 89 de 80 c3 10  |.8/t..x..ut.....|     00000030  e2 ef 85 f6 75 02 cd 18  80 fa 80 72 0b 8a 36 75  |....u......r..6u|     00000040  04 80 c6 80 38 f2 72 02  8a 14 89 e7 8a 74 01 8b  |....8.r......t..|     00000050  4c 02 bb 00 7c 80 fe ff  75 32 83 f9 ff 75 2d 51  |L...|...u2...u-Q|     00000060  53 bb aa 55 b4 41 cd 13  72 20 81 fb 55 aa 75 1a  |S..U.A..r ..U.u.|     00000070  f6 c1 01 74 15 5b 66 6a  00 66 ff 74 08 06 53 6a  |...t.[fj.f.t..Sj|     00000080  01 6a 10 89 e6 b8 00 42  eb 05 5b 59 b8 01 02 cd  |.j.....B..[Y....|     00000090  13 89 fc 72 0f 81 bf fe  01 55 aa 75 0c ff e3 be  |...r.....U.u....|     000000a0  bc 06 eb 11 be d4 06 eb  0c be f3 06 eb 07 bb 07  |................|     000000b0  00 b4 0e cd 10 ac 84 c0  75 f4 eb fe 49 6e 76 61  |........u...Inva|     000000c0  6c 69 64 20 70 61 72 74  69 74 69 6f 6e 20 74 61  |lid partition ta|     000000d0  62 6c 65 00 45 72 72 6f  72 20 6c 6f 61 64 69 6e  |ble.Error loadin|     000000e0  67 20 6f 70 65 72 61 74  69 6e 67 20 73 79 73 74  |g operating syst|     000000f0  65 6d 00 4d 69 73 73 69  6e 67 20 6f 70 65 72 61  |em.Missing opera|     00000100  74 69 6e 67 20 73 79 73  74 65 6d 00 00 00 00 00  |ting system.....|     00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     000001b0  00 00 00 00 00 00 00 00  00 00 00 00 55 aa 80 01  |............U...|     000001c0  01 00 a5 07 a0 dd 20 00  00 00 e0 dd 02 00 00 00  |...... .........|     000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|     1+0 records in     1+0 records out     512 bytes (512 B) copied, 0.0160705 s, 31.9 kB/s     00000200     T42 ~ #


What call before a fork?

A long while ago I went to a job interview with a thoroughly weird company in London who claimed to be expert Unix consultants. Anyway these people were complete nutters and not surprisingly the company doesn't seem to be there any more, but at the interview they asked me the following question: > What is the first call you make to start a new process? So I answered that the first call is `fork`. The two people interviewing me said (very insistently, as if I'd missed something utterly obvious) > What call do you do **before** you do the fork? Now, I have no idea about this question, and I have to say these people convinced me they were unmitigated idiots for reasons completely unrelated to this question, but for some reason this question still bugs me even now. Is there some call which is made before a fork? Is there some subtlety I missed out on?


KDE starting without anything else (no panels, no window manager/decorator)

So, I've installed KDE in Arch Linux using the `kde` package, as well as `phonon-xine` from pacman. Maybe it's because I had GNOME before, maybe it's because I did something wrong, but when I log in from KDM, all I get is a small white terminal in the bottom right corner. Now, from this terminal, I can launch `plasma-desktop`, and from the actual launcher I can get a konsole session open, and then I can start KWin or compiz and KDE4-Window-Decorator and have a usable desktop environment. I don't think this is expected behavior, though. How do I get it to launch all this stuff properly (and anything else I'm forgetting) when I log in from KDM? Also, since I've installed KDE, GNOME is all messed up - but one thing at a time, and if I like KDE enough I'll uninstall GNOME anyway.


Any funny *nix one-liners?

> This question is left open because it was historically allowed, but it is > not considered a good, on-topic question for this site and would be closed > if asked today. > > More info: http://unix.stackexchange.com/faq I saw a t-shirt reading 'anything you say gets piped to /dev/null', not incredibly funny but amusing at least. Does anyone else have any good one-liner *nix jokes?


How do I increase my root volume

I have a server using software RAID (raid1) and I need to increase my volume on my root partition. I've been googling around with no luck of finding out how I can do this. I have 2x1TB RAID1. My df -h:               Filesystem      Size  Used Avail Use% Mounted on     rootfs           20G   20G     0 100% /     /dev/root        20G   20G     0 100% /,     devtmpfs        3.9G  4.0K  3.9G   1% /dev     none            4.0K     0  4.0K   0% /sys/fs/cgroup     none            788M  256K  788M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            3.9G     0  3.9G   0% /run/shm     none            100M     0  100M   0% /run/user     overflow        1.0M  4.0K 1020K   1% /tmp     /dev/md3        898G   72M  852G   1% /home      My fdisk -l:               Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x000e1568          Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *        4096    40962047    20478976   fd  Linux RAID autodetect     /dev/sdb2        40962048    42008575      523264   82  Linux swap / Solaris     /dev/sdb3        42008576  1953517567   955754496   fd  Linux RAID autodetect          Disk /dev/sda: 1000.2 GB, 1000204886016 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x000a0d60          Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        4096    40962047    20478976   fd  Linux RAID autodetect     /dev/sda2        40962048    42008575      523264   82  Linux swap / Solaris     /dev/sda3        42008576  1953517567   955754496   fd  Linux RAID autodetect          Disk /dev/md3: 978.7 GB, 978692538368 bytes     2 heads, 4 sectors/track, 238938608 cylinders, total 1911508864 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x00000000          Disk /dev/md3 doesn't contain a valid partition table          Disk /dev/md1: 21.0 GB, 20970405888 bytes     2 heads, 4 sectors/track, 5119728 cylinders, total 40957824 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x00000000          Disk /dev/md1 doesn't contain a valid partition table      I hope someone can help out here because I really need this to happen fast! PS: This has to be done trough SSH connection.


linux static compilation issue

I am building testdisk as static and when i run > make static i am getting the following error > /usr/bin/ld: cannot find -luuid > > collect2: ld returned 1 exit status what's the problem? in the makefile i have the following line > LIBS = -lz -lntfs -luuid -lcrypto -lext2fs -lcom_err and i am getting error on all the floowing flags > -luuid -lcrypto -lext2fs -lcom_err


Recover single file in the $HOME directory

I accidentally run `rm -r /home/xralf` and quickly killed it with `Ctrl`+`C`. It seemed that everything is OK, but I noticed that my `.vimrc`, which is importent for me, is missing. I tried the command:               $ extundelete /dev/sda5 --restore-file /home/xralf/.vimrc     extundelete: failed to read-only open device "/dev/sda5": Error code 13      To recover the file, but there seems to be a problem, I need to unmount the device. It's mounted here: `/dev/sda5 on /home type ext4 (rw)`   * Is there some possibility to recover the file `.vimrc`?   * How would you remount it? There is a problem I need `$HOME` directory. I can't use `LiveCD`, because it's missing on my laptop now. Booting from `USB` is not supported on my laptop as well. Running the command with `sudo`:               sudo extundelete /dev/sda5 --restore-file /home/xralf/.vimrc     WARNING: Extended attributes are not restored.     WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.     The partition should be unmounted to undelete any files without further data loss.     If the partition is not currently mounted, this message indicates      it was improperly unmounted, and you should run fsck before continuing.     If you decide to continue, extundelete may overwrite some of the deleted     files and make recovering those files impossible.  You should unmount the     file system and check it with fsck before using extundelete.     Would you like to continue? (y/n)


VNC on elementary os

I installed elementary OS on my laptop and tried to install VNC server. First I installed `vnc4server`, opened and logged from phone. On screen I saw:               failed to load session gnome      How do I need to configure it to run under elementary OS? I am not interested in installing GNOME.


Backup LUKS (cryptsetup Command) partition or volume

Can you create a file container/volume in LUKS in the same way that you could do with Truecrypt? Otherwise, how can you backup a LUKS partition? Do you have to clone it, for example with dd? or backup each file inside the partition into another encrypted partition? Is there any way of treating the output of luks as a file, for backup purposes?


"tcpdump" to capture the last packets

I am monitoring a certain port, because my application uses that port, it seems that the connection drops at random times, I want to see what are the last packets passing through before the connection drops: I used this line                sudo tcpdump -XX -i eth0 port 3050 | tail  >> tcpamir.txt      but for it to work I have to start another terminal and issue               sudo killall tcpdump      is there a better approach? EDIT1: it is important to capture only the last packets since I don't want the file to balloon, since there is enough traffic to fill the disk space quickly .


How do I find the NetBSD release for CentOS 6.5?

I want to find the NetBSD rump package used for CentOS 6.5. The list is present here. I want to get the rump package for CentOS and after searching, I found this version of `netbsd-rump` used in CentOS 6: This does not indicate the NetBSD package. How do I find this information?


tar: "No space left on device"

I'm a Debian user. While I was trying `apt-get install <package>` I got this:               tar: ./es_DO/LC_ADDRESS: Cannot write: No space left on device     tar: ./es_DO/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./es_DO/LC_MONETARY: Cannot write: No space left on device     tar: ./es_DO/LC_TELEPHONE: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_ADDRESS: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_MESSAGES/SYS_LC_MESSAGES: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_MONETARY: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_TIME: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_COLLATE: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_TELEPHONE: Cannot write: No space left on device     tar: ./zh_CN.gbk/LC_NAME: Cannot write: No space left on device     tar: ./es_CO.utf8/LC_ADDRESS: Cannot write: No space left on device     tar: ./es_CO.utf8/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./es_CO.utf8/LC_MONETARY: Cannot write: No space left on device     tar: ./es_CO.utf8/LC_TELEPHONE: Cannot write: No space left on device     tar: ./my_MM/LC_ADDRESS: Cannot write: No space left on device     tar: ./my_MM/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./my_MM/LC_MESSAGES/SYS_LC_MESSAGES: Cannot write: No space left on device     tar: ./my_MM/LC_MONETARY: Cannot write: No space left on device     tar: ./my_MM/LC_CTYPE: Cannot write: No space left on device     tar: ./my_MM/LC_TIME: Cannot write: No space left on device     tar: ./my_MM/LC_TELEPHONE: Cannot write: No space left on device     tar: ./my_MM/LC_NAME: Cannot write: No space left on device     tar: ./br_FR@euro/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./br_FR@euro/LC_TIME: Cannot write: No space left on device     tar: ./nl_NL@euro/LC_ADDRESS: Cannot write: No space left on device     tar: ./nl_NL@euro/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./nl_NL@euro/LC_MONETARY: Cannot write: No space left on device     tar: ./nl_NL@euro/LC_TIME: Cannot write: No space left on device     tar: ./nl_NL@euro/LC_TELEPHONE: Cannot write: No space left on device     tar: ./aa_DJ.utf8/LC_ADDRESS: Cannot write: No space left on device     tar: ./aa_DJ.utf8/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./aa_DJ.utf8/LC_MESSAGES/SYS_LC_MESSAGES: Cannot write: No space left on device     tar: ./aa_DJ.utf8/LC_TIME: Cannot write: No space left on device     tar: ./zh_TW.utf8/LC_ADDRESS: Cannot write: No space left on device     tar: ./zh_TW.utf8/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./zh_TW.utf8/LC_TIME: Cannot write: No space left on device     tar: ./fur_IT/LC_IDENTIFICATION: Cannot write: No space left on device     tar: ./fur_IT/LC_TIME: Cannot write: No space left on device     tar: Exiting with failure status due to previous errors     dpkg: error processing locales-all (--configure):      subprocess installed post-installation script returned error exit status 2     configured to not write apport reports                                           Errors were encountered while processing:      locales-all     E: Sub-process /usr/bin/dpkg returned an error code (1)


Grepping several lines from Nmap output

I apologize in advance as this is a simple question. So I'm attempting to scan a Class C to identify all mail servers by IP. The vast majority of IPs aren't mail servers. I'm trying to filter out the ones that are. I've tried the following but they haven't returned what I wanted.               nmap -p 25 192.168.15.1-254 | grep report && grep open       and               nmap -p 192.168.15.1-254 (grep report | grep open)      Is there a different utility that I should use? Or is it a problem with my syntax?


How to include program which only works with in/out files into a pipeline?

I need to process image with several tools in a pipeline `tool1 | tool2 | tool3 | ...`. It appeared though that one of the tools isn't designed to work in a pipeline and only works in format of `user@computer:/~# bad_tool infile.png outfile.png`. Is there any way to include it into pipeline? I really want to avoid creating files for this only program and then removing them, etc.


Control source address for whois queries

is it possible to execute the command "whois" and choose the outgoing ip for the query? I have mounted several IP's on my network interface "/etc/network/interfaces" for ssl porpuses, but would be great to use them also for querying. And would be this possible also with IPv6? I patched now the kernel with NAT66, but still don't know how I can set up querying through ipv6? Thank you very much!


Why is bash completion of a symlink different than a directory?

I usually do a `find` with an environment variable as the path when searching for source code. Recently I replaced my environment variable with a symbolic link, and it broke Bash's shell completion. When I do a `find` using the symlink it doesn't work, but if I use the actual path that the symlink points to, it works find.               ln -s /some/source/dir /the/source     export SYMLINK=/the/source     export DIR=/some/source/dir          find $SYMLINK -name file.c        // doesn't find anything     find $DIR -name file.c            // works as expected      In this example $SYMLINK is a symbolic link for $DIR's value. So, why does bash handle symlink environment variables differently?


Make all files under a directory read-only without changing permissions?

First, some background:   * /dev/md1 is a RAID-0 array serving as primary file store. It is mounted to /var/smb.   * /dev/md2 is another RAID-0 array storing backup snapshots taken from /dev/md1. It is mounted to /var/smb/snapshots.   * Three directories are made available via Samba: /var/smb/files (publicly-shared files), /var/smb/private (private files), and /var/smb/snapshots (providing read-only access to backup snapshots). Only users in the smbusers group are allowed to access the files and snapshots shares; similarly, only users in the smbprivate group are allowed to access the files in private. Additionally, Linux permissions prohibit users not in the respective groups from accessing the files and private directories, both on the local system and within the snapshots Samba share. This is great, because it means that we have a fully functional file server with a self-help "restore from backup" option (users can simply access the snapshots share and retrieve the file(s) they want to restore themselves), but so far I lack one key ingredient: Non-root access on the local system to the /var/smb/snapshots directory. The snapshots _must_ be strictly read-only to all regular users, however of course the file system must be mounted read-write to allow the backup operation to take place. The permissions on these directories are currently:               root@odin:/var/smb# ll     total 40     drwxrwxr-x  7 root   root        4096 2011-04-11 15:18 ./     drwxr-xr-x 14 root   root        4096 2011-04-10 19:07 ../     drwxrwx--- 15 kromey smbusers    4096 2010-12-07 13:09 files/     drwxrwx---  7 kromey smbprivate  4096 2010-04-07 07:08 private/     drwxrwx---  3 root   root        4096 2011-04-11 15:16 snapshots/      Now, what I want is to provide access to the snapshots directory to non-root users, but in a strictly read-only fashion. I can't mount /dev/md2 read-only, though, because I have to have it read-write to run backups; I can't simply re-mount it read-write for a backup and then re-mount it back to read-only, because that provides a window of time when the backups could be written to by another user. Previously I did this by making my snapshots directory a read-only NFS export (only to localhost) and mounting that locally (the original secured under a directory lacking traversal rights for non-root users), but this feels like a hack and there seems like there should be a better way to accomplish this. I did try the `mount --bind` option, but it seems to lack the ability to have different access levels (i.e. read-only versus read-write) on the two directories (unless I'm missing something: `mount -r --bind dir1 dir2`). Any ideas how I can accomplish this without NFS, or is that my best option? **TL;DR:** How can I make the contents of a file system available read-write to a select user, but strictly read-only to everyone else, while maintaining original permissions and ownerships on the files backed up to this file system?


Use find to execute series of commands

I want to examine a directory and execute a command for each matching folder. The following `find` correctly returns the list I'm looking for.               find . -maxdepth 1 -name "*.bitbucket"      For each item returned, I want to execute the command:               hg pull --update --repository [FIND_RESULT_HERE]      Is there a simply way to do this using find and xargs? If not, what's the best alternative.


Distrowatch mistake?

Why does Distrowatch state that Red Hat is Fedora based and Fedora is independent when Fedora's history page indicates that's not the case? Am I misunderstanding, or is Distrowatch wrong?


ls -a not showing folder "system", but echo * shows it

When I create a folder named system in my home folder, or in /tmp (can't try other locations as I am not root, but owner confirmed same problem even on root), ls -a will not show it. Also tried /bin/ls -a, same deal. Otherwise the folder "works" fine, I can cd into it, pwd shows the right location and everything. I can even rename it to something else and ls will show it then. But if I rename it back to system, ls will not show it anymore. Please note even if I remove the folder completely, or create it in a location where it previously didn't exist, with "mkdir system", it will not be shown by ls unless I rename it to something else. "echo *" shows the system folder. dir behaves same as ls (doesn't show the folder). Other folders with different names work fine and show up. Distro is CentOS 5.6. I have another box with CentOS 5.5 and I DO NOT have this issue there. I don't think it's distro-related. I do not have root access but owner confirmed the problem on root as well. Info about mount point from /etc/mtab: /dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0


How do Linux drivers work and where do I find them? (esp. NIC driver)

I am wondering how a driver functions under Linux. Are drivers a single file that can be edited? Is there a list of current drivers in use or is there a different place to find them for each device? I am especially interested in learning about my network adapter's driver. If you know where some good documentation is, I would love to read that too.


diff within a line

I have some sql dumps that I am looking at the differences between. `diff` can obviously show me the difference between two lines, but I'm driving myself nuts trying to find which values in the long list of comma-separated values are actually the ones causing the lines to be different. What tool can I use to point out the exact character differences between two lines in certain files?


How can move a LUKS container from the middle of a partition to the beginning?

For the tl;dr, skip to the bottom. I have a dual-boot setup with Mac OS X at the beginning of my drive and three GNU/Linux partitions at the end of the drive. I don't have the relevant machine on hand to give an `fdisk` dump, but here's a rough overview of the original disk layout:               /dev/sda1: EFI System Partition     /dev/sda2: Macintosh HD (main OS X partition)     /dev/sda3: Recovery HD (part of OS X's recovery system)     /dev/sda4: /     /dev/sda5: /home inside a LUKS container     /dev/sda6: swapspace inside a LUKS container      I'm reinstalling GNU/Linux on this system and as a part of that, I want to make `/` encrypted. However, that requires a separate `/boot`. In order to create that partition, I resized Macintosh HD and moved Recovery HD back to the end of Macintosh HD. I also took the opportunity to make my `/` larger. So the end result is a disk that looks like this:               /dev/sda1: EFI System Partition     /dev/sda2: Macintosh HD (main OS X partition) (smaller than before)     /dev/sda3: Recovery HD (part of OS X's recovery system)     /dev/sda4: /boot     /dev/sda5: / (larger than before, and now inside a LUKS container)     /dev/sda6: /home inside a LUKS container     /dev/sda7: swapspace inside a LUKS container      **tl;dr** : Here's the problem: due to the order in which I configured things, I now have a `cryptsetup`-created LUKS container in the middle of `/dev/sda5`. Because it's in the middle, nothing can find it to unlock/mount/recover it. How can I move my cryptcontainer to the beginning of the partition? Probably this involves two distinct steps (actually _finding_ the thing on disk, then using that information to move it), but I'm not sure. Googling's turned up nothing.


Easy way to restore your MANPATH

I was attempting to add the man pages for my texlive distribution today when I accidentally did this:               $ MANPATH=MANPATH:/usr/local/texlive/2011/texmf/doc/man     $ export MANPATH      ...when I meant this:               $ MANPATH=$MANPATH:/usr/local/texlive/2011/texmf/doc/man     $ export MANPATH      The result is that I have a very unhelpful `$MANPATH that looks like this:               $ echo $MANPATH     $ MANPATH:/usr/local/texlive/2011/texmf/doc/man      Is there a quick way of adding all man pages back into the `$MANPATH`?