title: How can I get grep to work with "->" as the pattern?

text: I have this text in a file called `temp`:               -rw-r--r-- 1 root root  15776 Oct 15  2010 dnd-copy     -rw-r--r-- 1 root root  15776 Oct 15  2010 dnd-link     -rw-r--r-- 1 root root  15776 Oct 15  2010 dnd-move     -rw-r--r-- 1 root root  15776 Oct 15  2010 dnd-none     -rw-r--r-- 1 root root  15776 Oct 15  2010 dotbox     lrwxrwxrwx 1 root root      5 Oct  8  2012 cross_reverse -> cross     lrwxrwxrwx 1 root root      5 Oct  8  2012 diamond_cross -> cross     lrwxrwxrwx 1 root root      6 Oct  8  2012 dot_box_mask -> dotbox     lrwxrwxrwx 1 root root     17 Oct  8  2012 double_arrow -> sb_v_double_arrow     lrwxrwxrwx 1 root root      9 Oct  8  2012 draft_large -> right_ptr      If I run `egrep -v 'lrwx' temp`, the last five lines are eliminated. I expected that running `egrep -v '->' temp`, would eliminate the same five lines because `lrwx` and `->` occur on the same lines. However, I get this error:               [09:43 PM] ~/Desktop $ egrep -v '->' temp     egrep: invalid option -- '>'     Usage: egrep [OPTION]... PATTERN [FILE]...     Try 'egrep --help' for more information.      Trying `egrep -v '-\>' temp` doesn't help either:               [09:46 PM] ~/Desktop $ egrep -v '-\>' temp     egrep: invalid option -- '\'     Usage: egrep [OPTION]... PATTERN [FILE]...     Try 'egrep --help' for more information.      (I get the same results with `egrep` or `grep -E`.)


title: How can I trigger the screensaver's locking feature using D-BUS from the command line?

text: How can I trigger the screen saver manually from the command line? I'm using GNOME 3.8.4 on Fedora 19, but the solution should not necessarily be specific to this distro.


title: Why does my 3G key blocks my eth0 interface and how to solve this?

text: I have a linux PC (Debian Squeeze) which is located into a room in another town (I cannot physically access to this PC from where I am) This PC is linked to internet using an internet box. I can connect to this PC using ssh through port 22 (actually I have a NAT from remote box port XXXX to PC's port 22). One of my collegue connects a 3G key. I then use sakis script to connect this PC to 3G network, and then my ssh connection is hanged (Broken pipe). My collegue can still access to the PC from his local network using ssh; I can't. What are the reasons why 3G connection stops the external ssh connection ? How can I solve this issue (keeping my ssh connection opened while 3G connection is made) ? **Edit: additional information** I connect using the NAT, before 3G script is launched IP does not change for eth0 (the interface I use to connect) A new interface is added after 3G connection :`ppp0 Link encap:Point-to-Point Protocol` ip route (before 3G connection)               172.16.210.0/24 dev br0  proto kernel  scope link  src 172.16.210.254      192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.50      default via 192.168.0.254 dev eth0       ip route (after 3G connection)               10.64.64.64 dev ppp0  proto kernel  scope link  src 10.99.122.183      172.16.210.0/24 dev br0  proto kernel  scope link  src 172.16.210.254      192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.50      default via 10.64.64.64 dev ppp0


title: Mystery of a small 1K hard disk partition, and is it safe or malware on Ubuntu 12.04.02LTS Amd64 generic

text: Look at my bizarre sda4 partition. It is just 1K in size! Be mindful that this is not cluster size, this is partition size. I did not knowingly install this sda4 super small partition. This is not my boot partition, it's some other thing. I can't seem to find anyone else with the same tiny partition. For what reason did this small sda4 partition get created? Is it safe or malware? This is a fresh installation of Ubuntu 12.04.02LTS for Amd64. The computer has just one physical hard disk and one DVD device at this time. This is not a multiboot computer at this time, only one OS at this time. Here is the output from program lsblk:               ga@moonentity:~$ lsblk          NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 465.8G  0 disk      ├─sda1   8:1    0   300M  0 part /boot     ├─sda2   8:2    0  48.8G  0 part /     ├─sda3   8:3    0   5.9G  0 part [SWAP]     ├─sda4   8:4    0     1K  0 part      └─sda5   8:5    0   9.3G  0 part /home     sr0     11:0    1  1024M  0 rom


title: how to know IPs available on a server?

text: I think there used to be a command to do that but I forget. Something like ipconfig in windows. My server has 10 available IPs and I want to know them all.


title: Read umask for a user

text: Plenty of examples on how to **set** `umask` for a user... but how do you read (or uncover) the default `umask` for a given user (say the logged in user)


title: volume hot keys in Crunchbang don't work

text: I've spent 2 hours on this and still can't figure this out. It's driving me insane. Please save my sanity. When I press `mute`, the `pnmixer` control in the top right shows that I've pressed `mute`, but the sound is not muted. A graphic also appears on my screen with a volume bar to show that the volume has been muted. When I press `mute` again, the `pnmixer` control shows that I have pressed the key, and **three** graphics appear on my screen in a row to show that I've pressed it. This doesn't make sense. No change in sound. With the `volume up` and `volume down` keys, the graphic changes accordingly but again no change in sound. I've tried editing rf.xml with the following:               <!-- Keybindings for volume keys -->        <keybind key="XF86AudioRaiseVolume">       <action name="Execute">         <execute>amixer set -q Master,0 5%+</execute>       </action>     </keybind>      <keybind key="XF86AudioLowerVolume">       <action name="Execute">         <execute>amixer set -q Master,0 5%-</execute>       </action>     </keybind>     <keybind key="XFAudioMute">       <action name="Execute">         <execute>amixer set -q Master,0 toggle</execute>       </action>     </keybind>      I used `xev` to get the names of the key bindings. After reconfiguring or restarting openbox, or restarting my computer, this change in the script had no effect at all. Btw, `uname -a` gives me: `Linux KGBXCrunch 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux`


title: How to stop the find command after first match?

text: Is there a way to force the `find` command to stop right after finding the first match?


title: How do I use MEncoder to encode all png files (in the current directory) as an avi file in order of date modification?

text: So I want MEncoder to encode all png files as an avi file from the earliest date modified to the last date modified, and I'd like each frame to be spaced out by 3 seconds.


title: lightdm doesn't work after installing lightdm-unity-greeter on arch

text: I was using `lightdm` with the `lightdm-gtk-greeter` just fine, however I tried to install the unity greeter and now it shows me a black screen with a blinking cursor (I have to ctr+alt+1 and login through the shell to get in) I'm not sure why it doesn't work, the installation completed without any issues, can anyone point me in the right direction? Let me know if I should post anything that'd help debug the problem. UPDATE: I just tried installing the pantheon greeter and got the same error, webkit greeter works fine though


title: How do I pass the contents of a file as a command line parameter

text: I am storing a file path in a file and need to pass the _contents_ of that file as an argument to a shell script, specifically Maven, something like so:               mvn -Dvar_name=(contents of file)      Would this work:               mvn -Dvar_name=(cat /path/to/file)      ?


title: How does a package like ATLAS know which fortran compiler to use?

text: How does a package like ATLAS know which compilers I have installed on my system? For example, say that I install a local version of gfortran, how do I "register it" in the system so that a package like ATLAS knows that I have it?


title: How to include directory tree for back-up using cpio?

text: I am backing up files including directories from 1 partition to other using `cpio`. `cpio` works perfect for backing but I am unable to backup directory tree. I am in a partition mounted on the directory as shown below. In that partition, I am in the directory `/b/c`. It contains 3 files 'd, e & f'. Also it contains a directory named g which in turn includes files 'h & j'. Please see below.               ravbholua@ravbholua-Aspire-5315:/media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c$ ls *     d  e  f          g:     h  j      Now I want to back up all these files (d, e, f, h & j) including directory structure on to a different partition. I have created file (or archive in this case) named 'mark'. Please see below. Using `cpio` I am transferring to archive named 'mark'.               ravbholua@ravbholua-Aspire-5315:/media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c$ ls -R /med*/ravb*/*36/b/c/* | cpio -ov > /med*/ravb*/*9f/mark     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/d     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/e     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/f     cpio: blank line ignored     cpio: /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/g:: Cannot stat: No such file or directory     cpio: h: Cannot stat: No such file or directory     cpio: j: Cannot stat: No such file or directory     1 block     ravbholua@ravbholua-Aspire-5315:/media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c$      `cpio` perfectly transferred the immediate files (d, e & f) in the directory. Problem comes for the directory g and the subdirectory files. It's apparent that `cpio` requires regular files and doesn't entertain directory. So, now so that the tool `cpio` includes the directory tree, anyhow I have to give cpio the subdirectory files 'h & j' under directory 'g'. How to do that. `ls, ls -R, etc.` can't provide only the files in their output, they include directory also. So, please tell me is there any option to ls or any other command that will output **_only_** the files in the directory tree. Have a look below:               $ (command that will output the below)          /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/d     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/e     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/f     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/g/h     /media/ravbholua/c09fb098-0402-418a-b1e5-8888848a5636/b/c/g/j      > EDIT I'm editing my Q with some correction so that any viewer of this thread would get clear and right information. I mentioned that `cpio` doesn't accept directories based on what I felt from the output of `ls` command. But its wrong. `cpio` accepts directories even. So, `cpio` to me seems to be a very great tool for backing up selected files or complete partition/disk.


title: error while loading shared libraries: lib3ds-1so.3

text: I've downloaded a meshconverter binary file and i've tried executing it using `./binary_name` but, it gives the following error:               ./meshconv: error while loading shared libraries: lib3ds-1.so.3: cannot open shared object file: No such file or directory.


title: Automate installation of VirtualBox Guest Additions via command-line

text: How can I install VirtualBox Guest Additions from a Bash script, in a unattended way? Whenever I run `apt-get -y install dkms virtualbox-guest-dkms` from the terminal I'm presented with a interactive dialog, is there any way to safely bypass or pre-select the dialog choices?


title: Copy text from one tmux pane to another (using vim)

text: I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another. How can I accomplish this not using the mouse's `Copy` -> `Paste` ?


title: How many commands can be queued up with control operators?

text: I have been reading up on control operators, and I was wondering if there was a limit to how many commands you could line up with control operators, such as `||`, `&&` and `;`. In addition, is there a configuration file somewhere where this can be regulated? PS: I am not entirely sure how to tag this.


title: Find a directory created today

text: How can I find a directory whose name starts with `cy` and that was created today?


title: grub2 Windows doesn't boot anymore

text: Hi. I had a Windows/Ubuntu 11.04 dual-boot setup and suddenly Windows stopped booting. I mean it doesn't even appear on the boot list. The files look fine and Ubuntu boots fine. I was trying to write a bootable SD card and I think I did `dd` on the wrong device. Here is my results made with the boot info script                                     Boot Info Script 0.60    from 17 May 2011               ============================= Boot Info Summary: ===============================           => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of          the same hard drive for core.img. core.img is at this location and looks          for (,msdos5)/boot/grub on this drive.      => Windows is installed in the MBR of /dev/sdc.          sda1: __________________________________________________________________________              File system:                Boot sector type:  -         Boot sector info:           Mounting failed:   mount: tipo de sistema de ficheros '' desconocido          sda2: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows Vista/7         Boot sector info:   No errors found in the Boot Parameter Block.         Operating System:  Windows 7         Boot files:        /Windows/System32/winload.exe          sda3: __________________________________________________________________________              File system:       Extended Partition         Boot sector type:  -         Boot sector info:            sda5: __________________________________________________________________________              File system:       ext4         Boot sector type:  -         Boot sector info:           Operating System:  Ubuntu 11.04         Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img          sda6: __________________________________________________________________________              File system:       swap         Boot sector type:  -         Boot sector info:            sda4: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows Vista/7         Boot sector info:   No errors found in the Boot Parameter Block.         Operating System:           Boot files:        /bootmgr /boot/bcd          sdc1: __________________________________________________________________________              File system:       vfat         Boot sector type:  MSWIN4.1: FAT32         Boot sector info:   No errors found in the Boot Parameter Block.         Operating System:           Boot files:                  ============================ Drive/Partition Info: =============================          Drive: sda _____________________________________________________________________          Disco /dev/sda: 500.1 GB, 500107862016 bytes     255 cabezas, 63 sectores/pista, 60801 cilindros, 976773168 sectores en total     Unidades = sectores de 1 * 512 = 512 bytes     Tamaño de sector (lógico / físico): 512 bytes / 512 bytes          Partition  Boot  Start Sector    End Sector  # of Sectors  Id System          /dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS     /dev/sda2             206,848   507,270,071   507,063,224   7 NTFS / exFAT / HPFS     /dev/sda3         507,271,166   947,263,487   439,992,322   5 Extended     /dev/sda5         507,271,168   929,343,487   422,072,320  83 Linux     /dev/sda6         929,345,536   947,263,487    17,917,952  82 Linux swap / Solaris     /dev/sda4         947,263,488   976,771,071    29,507,584   7 NTFS / exFAT / HPFS               Drive: sdc _____________________________________________________________________          Disco /dev/sdc: 3980 MB, 3980394496 bytes     9 cabezas, 9 sectores/pista, 95977 cilindros, 7774208 sectores en total     Unidades = sectores de 1 * 512 = 512 bytes     Tamaño de sector (lógico / físico): 512 bytes / 512 bytes          Partition  Boot  Start Sector    End Sector  # of Sectors  Id System          /dev/sdc1    *          8,064     7,774,207     7,766,144   c W95 FAT32 (LBA)               "blkid" output: ________________________________________________________________          Device           UUID                                   TYPE       LABEL          /dev/loop0                                              squashfs        /dev/sda2        CCE8A9EEE8A9D6CC                       ntfs       OS     /dev/sda4        6C881B1A881AE1FE                       ntfs       HP_RECOVERY     /dev/sda5        450c3618-b8f1-4c80-b767-6018e086e409   ext4            /dev/sda6        ec2f0f7b-769f-46db-8957-f8e8b7f7de35   swap            /dev/sdc1        B805-7488                              vfat       KINGSTON          ================================ Mount points: =================================          Device           Mount_Point              Type       Options          /dev/loop0       /rofs                    squashfs   (ro,noatime)     /dev/sdc1        /media/KINGSTON          vfat       (rw,nosuid,nodev,uhelper=udisks,uid=999,gid=999,shortname=mixed,dmask=0077,utf8=1,showexec,flush)     /dev/sr0         /cdrom                   iso9660    (ro,noatime)               =========================== sda5/boot/grub/grub.cfg: ===========================          --------------------------------------------------------------------------------         #         # DO NOT EDIT THIS FILE         #         # It is automatically generated by grub-mkconfig using templates         # from /etc/grub.d and settings from /etc/default/grub         #              ### BEGIN /etc/grub.d/00_header ###         if [ -s $prefix/grubenv ]; then           set have_grubenv=true           load_env         fi         set default="5"         if [ "${prev_saved_entry}" ]; then           set saved_entry="${prev_saved_entry}"           save_env saved_entry           set prev_saved_entry=           save_env prev_saved_entry           set boot_once=true         fi              function savedefault {           if [ -z "${boot_once}" ]; then             saved_entry="${chosen}"             save_env saved_entry           fi         }              function recordfail {           set recordfail=1           if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ];           then   save_env    recordfail; fi; fi         }              function load_video {           insmod vbe           insmod vga           insmod video_bochs           insmod video_cirrus         }              insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         if loadfont /usr/share/grub/unicode.pf2 ; then          set gfxmode=auto           load_video          insmod gfxterm          fi          terminal_output gfxterm          insmod part_msdos          insmod ext2          set root='(/dev/sda,msdos5)'          search --no-floppy --fs-uuid --set=root           450c3618-b8f1-4c80-     b767-6018e086e409          set locale_dir=($root)/boot/grub/locale          set lang=fr_FR          insmod gettext          if [ "${recordfail}" = 1 ]; then            set timeout=-1          else           set timeout=20         fi         ### END /etc/grub.d/00_header ###              ### BEGIN /etc/grub.d/05_debian_theme ###         set menu_color_normal=white/black         set menu_color_highlight=black/light-gray         if background_color 44,0,30; then           clear         fi         ### END /etc/grub.d/05_debian_theme ###              ### BEGIN /etc/grub.d/10_linux ###         if [ ${recordfail} != 1 ]; then           if [ -e ${prefix}/gfxblacklist.txt ]; then            if hwmatch ${prefix}/gfxblacklist.txt 3; then              if [ ${match} = 0 ]; then                set linux_gfx_mode=keep           else             set linux_gfx_mode=text           fi         else           set linux_gfx_mode=text         fi       else         set linux_gfx_mode=keep       fi     else       set linux_gfx_mode=text     fi     export linux_gfx_mode     if [ "$linux_gfx_mode" != "text" ]; then load_video; fi     menuentry 'Ubuntu, avec Linux 2.6.38-11-generic' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro   quiet splash vt.handoff=7         initrd  /boot/initrd.img-2.6.38-11-generic     }     menuentry 'Ubuntu, avec Linux 2.6.38-11-generic (mode de dépannage)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         echo    'Loading Linux 2.6.38-11-generic ...'         linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro single          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.38-11-generic     }     submenu "Previous Linux versions" {     menuentry 'Ubuntu, avec Linux 2.6.38-10-generic' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux   /boot/vmlinuz-2.6.38-10-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro   quiet splash vt.handoff=7         initrd  /boot/initrd.img-2.6.38-10-generic     }     menuentry 'Ubuntu, avec Linux 2.6.38-10-generic (mode de dépannage)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         echo    'Loading Linux 2.6.38-10-generic ...'         linux   /boot/vmlinuz-2.6.38-10-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro single          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.38-10-generic     }     menuentry 'Ubuntu, avec Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux   /boot/vmlinuz-2.6.38-8-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro   quiet splash vt.handoff=7         initrd  /boot/initrd.img-2.6.38-8-generic     }     menuentry 'Ubuntu, avec Linux 2.6.38-8-generic (mode de dépannage)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         echo    'Loading Linux 2.6.38-8-generic ...'         linux   /boot/vmlinuz-2.6.38-8-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro single          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.38-8-generic     }     menuentry 'Ubuntu, avec Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro   quiet splash vt.handoff=7         initrd  /boot/initrd.img-2.6.35-28-generic     }     menuentry 'Ubuntu, avec Linux 2.6.35-28-generic (mode de dépannage)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         set gfxpayload=$linux_gfx_mode         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         echo    'Loading Linux 2.6.35-28-generic ...'         linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=450c3618-b8f1-4c80-b767-6018e086e409 ro single          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.35-28-generic     }     }     ### END /etc/grub.d/10_linux ###          ### BEGIN /etc/grub.d/20_linux_xen ###     ### END /etc/grub.d/20_linux_xen ###          ### BEGIN /etc/grub.d/20_memtest86+ ###     menuentry "Memory test (memtest86+)" {         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux16 /boot/memtest86+.bin     }     menuentry "Memory test (memtest86+, serial console 115200)" {         insmod part_msdos         insmod ext2         set root='(/dev/sda,msdos5)'         search --no-floppy --fs-uuid --set=root 450c3618-b8f1-4c80-b767-6018e086e409         linux16 /boot/memtest86+.bin console=ttyS0,115200n8     }     ### END /etc/grub.d/20_memtest86+ ###          ### BEGIN /etc/grub.d/30_os-prober ###     menuentry "Windows Recovery Environment (loader) (on /dev/sda4)" --class windows --class os {         insmod part_msdos         insmod ntfs         set root='(/dev/sda,msdos4)'         search --no-floppy --fs-uuid --set=root 6C881B1A881AE1FE         drivemap -s (hd0) ${root}         chainloader +1     }     ### END /etc/grub.d/30_os-prober ###          ### BEGIN /etc/grub.d/40_custom ###     # This file provides an easy way to add custom menu entries.  Simply type the     # menu entries you want to add after this comment.  Be careful not to change     # the 'exec tail' line above.     ### END /etc/grub.d/40_custom ###          ### BEGIN /etc/grub.d/41_custom ###     if [ -f  $prefix/custom.cfg ]; then       source $prefix/custom.cfg;     fi     ### END /etc/grub.d/41_custom ###     --------------------------------------------------------------------------------          =============================== sda5/etc/fstab: ================================          --------------------------------------------------------------------------------     # /etc/fstab: static file system information.     #     # Use 'blkid -o value -s UUID' to print the universally unique identifier     # for a device; this may be used with UUID= as a more robust way to name     # devices that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     # / was on /dev/sda5 during installation     # Commented out by Dropbox     # UUID=450c3618-b8f1-4c80-b767-6018e086e409 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sda6 during installation     UUID=ec2f0f7b-769f-46db-8957-f8e8b7f7de35 none            swap    sw              0       0     UUID=450c3618-b8f1-4c80-b767-6018e086e409 / ext4 errors=remount-ro,user_xattr 0 1     --------------------------------------------------------------------------------          =================== sda5: Location of files loaded by Grub: ====================                     GiB - GB             File                                 Fragment(s)           414.013969421 = 444.544114688  boot/grub/core.img                             1      280.472400665 = 301.154947072  boot/grub/grub.cfg                             1      242.948242188 = 260.863688704  boot/initrd.img-2.6.35-28-generic              2      244.554271698 = 262.588149760  boot/initrd.img-2.6.38-10-generic              2      374.640209198 = 402.266861568  boot/initrd.img-2.6.38-11-generic              2      243.640205383 = 261.606678528  boot/initrd.img-2.6.38-8-generic               2      242.479492188 = 260.360372224  boot/vmlinuz-2.6.35-28-generic                 2      243.815742493 = 261.795160064  boot/vmlinuz-2.6.38-10-generic                 1      374.550117493 = 402.170126336  boot/vmlinuz-2.6.38-11-generic                 1      248.460269928 = 266.782183424  boot/vmlinuz-2.6.38-8-generic                  1      374.640209198 = 402.266861568  initrd.img                                     2      244.554271698 = 262.588149760  initrd.img.old                                 2      374.550117493 = 402.170126336  vmlinuz                                        1      243.815742493 = 261.795160064  vmlinuz.old                                    1          ========= Devices which don't seem to have a corresponding hard drive: =========          sdb           =============================== StdErr Messages: ===============================          unlzma: Decoder error      Is there anything I can do instead of reinstalling everything?


title: Temporarily freeze a process upon shell interaction

text: Let's say on a single console I have tail -F running, showing the output of many log files in realtime. Sometimes I need to run commands there too, however, and examine their output briefly, without getting sprinkled over by the bursts of tail output. What might be a nifty way to `killall -STOP tail` (or otherwise _temporarily_ suspend _automatically_ ) upon some interaction with the console (or at least pressing ENTER, which invokes the PROMPT command, etc.), and delay the `killall -CONT tail` by 90 seconds _after_ the latest shell interaction? Previously, I had been doing manually:               fg  # to tail process      # manually press CTRL Z               run my command,see output          bg  # to tail process


title: How do you install/upgrade Intel graphics drivers on Mint?

text: I have only recently begun using Linux as my primary OS on my laptop. I previously ran Windows 7 on it, which generally had decent performance in 3D applications. However, I've noticed a considerable slow down in their native Linux counterparts, so I've started poking around for updated drivers. Is there any surefire way to ensure that I get the upgrades? Google-ing around leads to suggestions of adding external repositories, occasionally accompanied by stories of ruining their builds in various ways. Also, I've checked under Preferences->Software Sources->Additional Drivers, which reveals an empty list. Any idea where I might go from here?


title: Listing files greater than particular timestamp in file name?

text: I have a directory in **linux** which has a list of log files where log files get auto generated if some job runs. Each log file gets appended with the timestamp like " **JobName_TimeStamp** " **UPDATED:**               job_2014-05-28_15:05:26.log     job_2014-05-28_15:06:58.log     job_2014-05-28_15:07:02.log     job_2014-05-28_15:07:57.log     job_2014-05-28_15:08:00.log     job_2014-05-28_15:08:01.log     job_2014-05-28_15:08:09.log     job_2014-05-28_15:08:10.log     job_2014-05-28_15:08:11.log     job_2014-05-28_15:08:12.log     job_2014-05-28_15:08:13.log     job_2014-05-28_15:08:14.log     job_2014-05-28_15:08:22.log          job1_2014-05-28_15:08:11.log     job1_2014-05-28_15:08:12.log     job1_2014-05-28_15:08:13.log     job1_2014-05-28_15:08:14.log     job1_2014-05-28_15:08:22.log      I wanted to run a linux command to list all files greater than a particular timestamp? **For Example 1** : I will pass two parameters , If the **TimeStamp** given is " **2014-05-28_15:08:00** " and **Job Name** is " **job** " I should get the list as               job_2014-05-28_15:08:01.log     job_2014-05-28_15:08:09.log     job_2014-05-28_15:08:10.log     job_2014-05-28_15:08:11.log     job_2014-05-28_15:08:12.log     job_2014-05-28_15:08:13.log     job_2014-05-28_15:08:14.log     job_2014-05-28_15:08:22.log      **Example 2** : I will pass two parameters , If the **TimeStamp** given is "`2014-05-28_15:08:11`" and **Job Name** is " **job1** " I should get the list as               job1_2014-05-28_15:08:12.log     job1_2014-05-28_15:08:13.log     job1_2014-05-28_15:08:14.log     job1_2014-05-28_15:08:22.log      Any solutions?


title: SSH using diff and still not working

text: I have 2 file, `a.txt` and `b.txt` and I want to compare them. `a.txt` contains:               abc     jkl < jkl     mno > mno     pqr <> pqr      `b.txt` contains:               abc     jkl < jkl     mno > mno     pqr <> pqrs     stu      I'm using this script:               $ diff a.txt b.txt | grep "> " | cut -c3- > c.txt      Which results in `c.txt`:               pqr <> pqr     pqr <> pqrs     stu      Why is `pqr <> pqr` being included in the results? How can I resolve this?


title: How do i get the latest file from a list of files in a particular directory

text: I need to get the latest file from a list of files in a particular directory. When I run the script the first time I've copied the list of files in a particular directory to another directory. From the second run I need to get the latest files from a list of files in same directory to copy those files into the other directory. Here in the first run I'm capturing the last file's creation date into a variable, when the script runs a second time, files that are greater than the last file creation date in the first run; these files need to be copied to the other directory. Please could anyone help me out to get the latest files?


title: Why won't my Linux install boot?

text: It's my first time compiling a Linux kernel. Everything went well until I hit this problem. After I edit my `/etc/fstab`: ![/etc/fstab screenshot](http://i.stack.imgur.com/7eGG1.jpg) and edit `etc/lilo.conf`: ![/etc/lilo.conf screenshot](http://i.stack.imgur.com/5Mx4q.jpg) I want to set the info about crux in `lilo`, so I run `lilo` and the system prompt: ![lilo screenshot](http://i.stack.imgur.com/X23Ph.jpg) Then I run:               modprobe dm-mode      Things seem fine, but when I reboot the OS I get: ![boot screenshot](http://i.stack.imgur.com/tDCLk.jpg) I have no idea how to fix the problem; the next time I use the ISO to reboot, I get the same problem: ![boot screenshot](http://i.stack.imgur.com/X23Ph.jpg) **Update** I set the root read-write in the `lilo.conf`, it seems that I can login, but the system still prompts that the `/` item is not found in the `fstab`. But I have already set it. And here is the prompt: ![enter image description here](http://i.stack.imgur.com/zD3oe.jpg) And what's more, when I reboot it, I can already login to the OS, but it still prompts the same error. And, when I open the `/etc/fstab`, I can find the `/` item in it. So, I wonder if I should notice the system about the change in the `/etc/fstab` -- but after long time searching the Internet, I found nothing about it.


title: Why are POSIX Find Parameters Different from Other Program styles?

text: Why is a parameter in the POSIX `find` command added with a single hyphen for multi-character parameter names, while most other programs use single hyphen to indicate multiple single-character flags, and double-hyphens to indicate single parameter names with multiple characters? This seems inconsistent, and I'm curious as to A. why it's really not inconsistent, or   B. the history of that decision.


title: since which version does linux kernel support multi touch screen?

text: I'm having a Linux 2.6.37 kernel on hand and I'd like to know if it support multi-touch screen.   If so, I'd like to know since which version does Linux starts to support multi-touch and to what extend, also which multi-touch protocol does the kernel support.   I tried to find the information on the internet but cannot obtain a satisfying conclusion.


title: Locating and Installing a program (Heroku Toolbelt)

text: I'm new to Linux and Heroku. I downloaded the Heroku Toolbelt into my CentOS/VirtualBox setup using the following command:               wget -qO- https://toolbelt.heroku.com/install.sh | sh      However, according to the man pages, wget just downloads files, it does not install (is this correct?). I double checked to see if Heroku Toolbelt was installed with this command:               heroku login      but I got a `command not found` error. I also do not know the name of the Heroku Toolbelt file that I downloaded, but I assumed it was `install.sh` but all I see in my current directory is: `install.log` and `install.log.syslog` I also did this command               which heroku      but I got `no Heroku in ...` message My question is: how do I install the Heroku Toolbelt? What commands do I use? How do I identify the file that was downloaded in the first place? Any assistance will be appreciated.


title: Why is the kernel boot failing?

text: I am trying to boot from 3.11.1 kernel image on my system having Ubuntu 12.04 (kernel 3.2.0-53) I used `make defconfig` and then compiled, placed the image in `/boot`, updated GRUB, and then rebooted. On rebooting, I am getting the following messages :               EXT4-fs (sda1) : couldnt mount as ext3 due to feature incompatibilities     EXT4-fs (sda1) : couldnt mount as ext2 due to feature incompatibilities     init : unable to create device: /dev/kmsg     Root filesystem check failed      What went wrong? If the kernel knows the filesystem is ext4 which I think it does because of the `EXT4-fs (sda1)`, why is it being mounted as ext3/2 ? * * * `/etc/fstab` :               # /etc/fstab: static file system information.     #     # Use 'blkid' to print the universally unique identifier for a     # device; this may be used with UUID= as a more robust way to name devices     # that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     # / was on /dev/sda1 during installation     UUID=7be51edc-99ae-4e6e-b863-2bef9e4adb22 /               ext4    errors=remount-ro 0       1     # /home was on /dev/sda4 during installation     UUID=e4b936e5-e1c5-4146-9710-03b0d6dfdea2 /home           ext4    defaults        0       2     # swap was on /dev/sda3 during installation     UUID=10d012d1-bbba-43f4-8e8a-8aa493435acb none            swap    sw              0       0          # Move /tmp to RAM     tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0      * * * `grub.cfg` entry for image:               menuentry 'Ubuntu, with Linux 3.11.1' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         gfxmode $linux_gfx_mode         insmod gzio         insmod part_msdos         insmod ext2         set root='(hd0,msdos1)'         search --no-floppy --fs-uuid --set=root 7be51edc-99ae-4e6e-b863-2bef9e4adb22         linux   /boot/vmlinuz-3.11.1 root=/dev/sda1 ro   quiet splash $vt_handoff     }     menuentry 'Ubuntu, with Linux 3.11.1 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         insmod gzio         insmod part_msdos         insmod ext2         set root='(hd0,msdos1)'         search --no-floppy --fs-uuid --set=root 7be51edc-99ae-4e6e-b863-2bef9e4adb22         echo    'Loading Linux 3.11.1 ...'         linux   /boot/vmlinuz-3.11.1 root=/dev/sda1 ro recovery nomodeset      }


title: Startup script doesn't work

text: I have the following start script.               #!/bin/bash     # MyApp     #     # description: bla bla          case $1 in         start)             /bin/bash /javaprog/serport-start.sh         ;;         stop)             /bin/bash /javaprog/serport-stop.sh         ;;         restart)             /bin/bash /javaprog/serport-stop.sh             /bin/bash /javaprog/serport-start.sh         ;;     esac     exit 0      The problem is it doesn't start automatically (Webmin tells me that it should be, in the column "at boot?" it's marked as "yes"). If I start the script in Webmin by clicking on "start now" it works and the script starts. Does someone know what the problem can be?


title: Create a file as a different user and group

text: I have a bash script with downloads some files, and then needs to set the owner to apache, and the group to a particular user group (that apache is not a member of). Is there a way to create those files with those ownerships as their being downloaded, rather than having to go through and change them? I have to do this for multiple user groups, so I shouldn't be adding apache to these groups, and certainly can't make all of them the default group. I've tried using runuser, but I'm unable to set the group (presumably because apache doesn't belong to the group).


title: Fedora 19 install hard drives not visible

text: (Asking here as I haven't had a response to a post on Ask Fedora) I'm trying to install Fedora 19 Gnome as a dual boot system on my HP Envy laptop (hardware specifications HP ENVY 6-1202sa, although I think the hard drive is a hybrid drive with possibly an SSD cache [unsure]) I have successfully created a USB live disc which I can boot up and run the live disc with no problems, but when I choose the option to install to hard drive none of my hard drives are available? As per the suggestion in the linked post I've deleted the recovery partition (from the HP recovery utility in Windows) but this didn't solve the problem, the drives are still not visible to the installer.               [liveuser@localhost ~]$ lsblk     NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda                8:0    0 465.8G  0 disk      ├─sda1             8:1    0   400M  0 part      ├─sda2             8:2    0   260M  0 part      ├─sda3             8:3    0   128M  0 part      └─sda4             8:4    0   465G  0 part      sdb                8:16   0  29.8G  0 disk      └─sdb1             8:17   0     8G  0 part      sdc                8:32   1  14.9G  0 disk      └─sdc1             8:33   1  14.9G  0 part /run/initramfs/live     loop0              7:0    0    12K  1 loop      loop1              7:1    0   2.2M  1 loop      └─live-osimg-min 253:1    0     8G  1 dm        loop2              7:2    0 887.4M  1 loop      loop3              7:3    0     8G  1 loop      ├─live-rw        253:0    0     8G  0 dm   /     └─live-osimg-min 253:1    0     8G  1 dm        loop4              7:4    0   512M  0 loop      └─live-rw        253:0    0     8G  0 dm   /      and also:               [liveuser@localhost ~]$ sudo fdisk -l          Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 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 label type: dos     Disk identifier: 0x712f758b             Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1   976766975   488383487+  ee  GPT     Partition 1 does not start on physical sector boundary.          Disk /dev/sdb: 32.0 GB, 32017047552 bytes, 62533296 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 label type: dos     Disk identifier: 0x2f7c2cab             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1  4294967295  2147483647+  ee  GPT          Disk /dev/sdc: 16.0 GB, 16008609792 bytes, 31266816 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 label type: dos     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1   *          32    31266815    15633392    c  W95 FAT32 (LBA)          Disk /dev/mapper/live-rw: 8589 MB, 8589934592 bytes, 16777216 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 /dev/mapper/live-osimg-min: 8589 MB, 8589934592 bytes, 16777216 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      I've also been trying other live distributions and I get the following error when I attempt to browse to the "OS" disk on a Linux Mint live disc (I haven't checked to see whether I get the same error on the Fedora live disc):               Error mounting /dev/sda4 at /media/mint/OS: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999,dmask=0077,fmask=0177" "/dev/sda4" "/media/mint/OS"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).     Metadata kept in Windows cache, refused to mount.     Failed to mount '/dev/sda4': Operation not permitted     The NTFS partition is in an unsafe state. Please resume and shutdown     Windows fully (no hibernation or fast restarting), or mount the volume     read-only with the 'ro' mount option.      If it helps, this is how the disk manager looks in Windows 8: ![enter image description here](http://i.stack.imgur.com/sbI9M.png) Any suggestions? This may be related.


title: How to check if a partition is mounted as 'noexec'?

text: Currently, I'm using `grep '\s/location/\s.*noexec' /proc/mounts`.   (Is that a right way of checking this?)


title: Provide sftp read/write access to folder and subfolders, restrict all else

text: I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. However, just creating a user and enabling ssh access is too generous - the user then can log on via ssh and see whatever there is that is viewable by everybody. I need the user to find themselves in a specific directory after login, and, according to their privileges, read/write files, as well as create folders where permitted. No access to any file or directory above the user's "root" folder. What would be the suggested method to achieve this? Is there some very restricted shell type for this? I tried with               $ usermod -s /bin/false <username>      But that does not let the user to cd into subfolders of their base folder.


title: Alert when a process exits

text: I often download files using `wget` and `cURL`. Is there anyway I can make my Linux box give a visual alert when either of those processes exit ( _i.e: the download completes_ ) PS : I am using Ubuntu _oneiric ocelot_ x86 and I switch between Unity and Gnome Shell.


title: Unable to build pygobject with jhbuild

text: I was trying to build `gtk+` and `pygobject` with `jhbuild` (on ubuntu 11.04), but it gives the following error while building `gnome-doc-utils` :               checking whether /opt/tarball-gnome2/bin/python version >= 2.4...     configure: error: too old     ** Error during phase configure of gnome-doc-utils: ########## Error running ./autogen.sh --prefix /opt/tarball-gnome2 --libdir '/opt/tarball-gnome2/lib'  --disable-static --disable-gtk-doc  *** [8/8]      Please help!


title: Network interface information on AIX

text: I want to get all the information about the network interfaces available on the AIX. Like on linux, we can get it from `/sys/class/net` files. Is there any files on AIX where I can find relevant information? I am also trying to access it using "/dev/kmem" file. Which structure should I use to capture the information of network interface like in case of system information we use struct sysinfo. I am trying to get information for "ifnet" symbol. Can I get information like MTU, hardware address of the network interface from here?


title: How to create a sudo user that cannot delete me?

text: I'm sudoer on a remote linux machine and would like to create another user with the maximum privileges, except the privilege of managing my account. I'm assuming a sudoer can delete or change the password of another sudoer.


title: Perl Script to Display Pork Offline Message

text: I use pork 0.99.8.1 on openSuse 11.4 for my AIM account when I don't want to use irssi + bitlbee. The only problem I have encountered so far is that offline messages are not displayed. I just get a notification that the offline message was sent to me, but the message itself is not displayed. I don't know if it's possible to write a perl script for that.


title: Editing INI-like files with a script

text: I'm writing a script to automate setting up Puppet agent configuration files in Docker. Basically, I need to ensure that the following section is in `/etc/puppet/puppet.conf`:               [agent]     server=$PUPPETMASTER_HOSTNAME     masterport=$PUPPETMASTER_PORT      What I've been doing so far in my Puppet agent runit script is this:               function write_puppet_config () {         read -d '' puppet_config <<EOF     [agent]     server=$1     masterport=$2     EOF              echo -e "$puppet_config" >> /etc/puppet/puppet.conf     }          # default puppet master port is 8410     test -z "$PUPPET_MASTER_TCP_PORT" && export PUPPET_MASTER_TCP_PORT="8410"          # if there is a puppet master host defined, rewrite the config to match     if [ ! -z "$PUPPET_MASTER_TCP_HOST" ]; then          write_puppet_config "$PUPPET_MASTER_TCP_HOST" "$PUPPET_MASTER_TCP_PORT"     fi      The problem should be pretty apparent. If the Puppet configuration already specifies the configuration, I'm just appending another `[agent]` section, which is bad. I could just switch on conditional logic (ie: grep if it's there and then rewrite it with sed if it is), but is there a way to do an edit from the command line? I'd like to basically run a command which says "if there isn't an agent section, add it, and then make sure that server and masterport are set to the right values in that section." I know that structured tools like this exist for XML, but what about INI-style files?


title: What user-friendly distro uses same commands used in Kali Linux?

text: I want to use a distro that uses same terminal commands as Kali. I see that Kali is based on Debian, Debian is generally a base and not an end-user OS, so I want some distribution that I can run as my daily driver so I can transition from Windows 8 to Linux (while training on Kali Linux and getting familiar with a distro that's similar to it.) PS. I looked at Mint and I see it's based on Debian, then looked at the website and found it uses Ubuntu releases which, in my limited experience, is different than Kali in terms of commands and app management but still based on Debian from my read. ( _confused_ )


title: Why is the 'foreign address' not IP address but something like this?

text: I never learned network programming and this kind of stuff properly. Only know very basic stuff like IP address and just a vague concept of what ports and TCP/IP are. Here, I connected to my lab's server: ![enter image description here](http://i.stack.imgur.com/NMwxV.png) and I just got curious about this whole network stuff and tried command `netstat` I understand that these are lists of all ports that are on/off on the server. One thing I don't get is why the 'foreign address' part are shown as 'localhost:xxxxx' and not something like '101.239.49.1' for the ports that are 'ESTABLISHED' Also could you explain what the 'x11-ssh-offset' means? I'm guessing that this port is used for ssh communication with other computers. why on earth is it called 'offset'? P.S. Would be great if you could give me some keywords that would help me get in the right direction to study such issues.


title: ICMP timestamp requests

text: Is there a way to disable ICMP timestamp requests without using `iptables` on our RedHat 5 and 6 servers? We are not using `iptables` because we use a hardware-based firewall. Is there any setting (say, under `/proc/sys/net/ipv4`) that'll disable replying to ICMP timestamp requests?


title: Is there a way to undo VGA adapter modesetting in Linux

text: I'm looking for a way to reset the graphics adapter to textmode after it has been set to some sort of graphical mode by the kernel on bootup, and possibly used by an X server. Is there any code to do this in the Kernel or the X Server? I figure there must have been such code, because before the introduciton of KMS, the X server used to set the VGA adapter back to text mode when switching to a linux console (e.g. Ctrl+Alt+F1) I also figure that this is highly adapter-specific. My graphics adapter is controlled by i915. I've been looking at places in the X source code where I assumed the code would reside, but have been unable to find anything. So the precise thing I am asking of you would be, in this priority,   * A kernel interface that allows returning to textmode   * An existing utility   * An ugly hack that might involve directly writing to the kernel memory or invoking the VGA bios to do the initialization   * Hints at where (version-wise, repository-wise and sourcefile-wise) in the pre-KMS X or kernel sources I might find such code I have found a utility called `restoretextmode`, but all it did was crash my VGA adapter. It appears to come from ancient times, and not to be designed to handle these kinds of situations at all (but I might be in error). For those of you who are curious _why_ I require this functionality, it is related to running all kinds of low-level utilities such as `memtest86` or a boot loader directly via `kexec`. These utilities require the graphics adapter to be in textmode.


title: Is it possible to disable file permissions on a ext3 or ext4 file-system?

text: Is it possible to disable file permissions on an ext3/4 file-system? Just wondering if it's possible to completely disable or ignore file permissions on a ext3 or ext4 file system. Perhaps a mounting option? I'm not concerned about the security implications as I would be doing this for testing and with removable media.


title: Connecting to host by SSH client in Linux by proxy

text: I am really struggling with this. > My host (A) is behind a proxy/firewall (PF) and needs to connect to host H. The proxy has HTTP/FTP/SOCK proxy configured and I have no issue to configure in web browser, wget etc. But when I use...               ssh H //to connect my host       I have no success to pass over the proxy. It seems to try to connect directly instead of going via the PF. I am using Ubuntu 12.10.


title: Do I need a desktop to run a GUI?

text: I am setting up a lightweight VM, following the guide in the Ubuntu Documentation What I want to be able to do is ssh into the VM and then launch a GUI application. I don't need / want a desktop. First I installed xorg. But I can't launch a gui. The next step in the documentation is to install a "Window Manager", but it is not clear why this is necessary. What is the smallest program that will run a gui? I asked this on ubuntu.SE, but all of the answers required installing a window manager, all of which provide a desktop. The best answer was to go ahead and install a window manager and then limit what startx does with the .xintrc file. Installing openbox increased the size of my original VM from 0.9 to 2.2GB. I want to minimize the size of my VM. What is the smallest group of programs that will allow me to launch a GUI?


title: Convert all text from uppercase to lowercase and vice versa?

text: My question is how can I convert all text from uppercase to lowercase and vice versa? That is to change the cases of all the letters. It has to be done with a `sed` replacement somehow.


title: Help with assigning output of grep to a variable

text: I hope someone can help me here. I'm trying to assign the output of a grep command to a variable in a bash script and the variable comes up empty. When I run the following:               el_value=$(grep '<$2>.*<$2>' $1 | sed -e 's/^.*<$2/<$2/' | cut -f2 -d'>'| cut -f1 -d':')     echo "DEBUG: The value of el_value is '$el_value'"      The output is:               DEBUG: The value of el_value is ''      If I run the grep command outside of the script (and substitute the variables for real values) I get the output I'm expecting. * * * Sorry, I guess you need a little more information than that. Here is a snippet of script. Use this script and add the values listed above.               #!/bin/bash          if [ $# -ne 3 ]; then     echo 1>&2 'This script replaces xml element’s value with the one provided as a command parameter \n\n\tUsage: $0 <xml filename> <element name> <new value>'     exit 127     fi          el_value=`grep "<$2>.*<$2>" $1 | sed -e "s/^.*<$2/<$2/" | cut -f2 -d'>'| cut -f1 -d':'`     echo "DEBUG: The value of el_value is '$el_value'"


title: Combination of ls, xargs and zcat leads to duplicate file name suffixes?

text: _**Disclaimer** : Yes, finding files in a script with `ls` is bad, but `find` can't sort by modification date._ Using `ls` and `xargs` with `echo` everything is fine:               $ ls -t1 ssl-access*.gz | xargs -n 1 echo     ssl-access.log.2.gz     ssl-access.log.3.gz     ssl-access.log.4.gz     [...]      Changing `echo` to `zcat`:               $ ls -t1 ssl-access*.gz | xargs -n 1 zcat     gzip: ssl-access.log.2.gz.gz: No such file or directory     gzip: ssl-access.log.3.gz.gz: No such file or directory     gzip: ssl-access.log.4.gz.gz: No such file or directory     [...]      Duplicate file suffixes?! What is going on here? * * * **UPDATE:** OS is Debian 5. `zcat` is a shell script at `/bin/zcat`:               #!/bin/sh     PATH=${GZIP_BINDIR-'/bin'}:$PATH     exec gzip -cd "$@"


title: How to disable anti-aliasing in git-gui and gitk

text: After an upgrade to Tcl/Tk 8.5, `git-gui` and `gitk` are using anti-aliased fonts which look ugly on my display. I can select different fonts in the preferences dialog, but the fonts I was using before (Helvetica and Courier bitmap fonts) don't seem to appear in the list. How do I restore the previous fonts?


title: How to mount a dd-image which was created via fmem (memory dump tool)

text: I'm quite new to Linux. I've used the tool `fmem` for creating a memory dump dd-file. That works fine. But how can I access this image? I've tried it with `mount` but it says I have to specify a filesystem. But non of the given possibilities works (ext4, vfat etc). What did I miss?


title: usr/bin/xterm Xt error: Can't open display: /usr/bin/xterm: DISPLAY is not set?

text: I'm trying to submit a job to a school server (HPC) with:               #!/bin/bash          #$ -S /bin/bash     #$ -cwd     #$ -o ./out_$JOB_ID.txt     #$ -e ./err_$JOB_ID.txt     #$ -notify          #$ -pe orte 1          date     pwd          ##################################     RESULT_DIR=~/Results     SCRIPT_FILE=sample_job     ##################################          . /etc/profile     . /etc/bashrc          module load packages/comsol/4.4     module load packages/matlab/r2012b          comsol server matlab "sample_job, exit" -nodesktop -mlnosplash          /bin/uname -a          mkdir $RESULT_DIR/$name     cp *.csv $RESULT_DIR/$name      The job aborts saying:               Sun Jun  8 14:20:21 EDT 2014     COMSOL 4.4 (Build: 150) started listening on port 2036     Use the console command 'close' to exit the program     /usr/bin/xterm Xt error: Can't open display:      /usr/bin/xterm:  DISPLAY is not set     Program_did_not_exit_normally     Exception:         com.comsol.util.exceptions.FlException: Program did not exit normally     Messages:         Program did not exit normally          Stack trace:         at com.comsol.mli.application.a.a(Unknown Source)         at com.comsol.mli.application.MatlabApplication.doStart(Unknown Source)         at com.comsol.util.application.ComsolApplication.doStart(Unknown Source)         at com.comsol.util.application.ComsolApplication.doRun(Unknown Source)         at com.comsol.bridge.Bridge$2.run(Unknown Source)         at java.lang.Thread.run(Unknown Source)          ERROR: Could not start COMSOL Application. See log file: /home/.comsol/v44/logs/server2.log     java.lang.IllegalStateException: Shutdown in progress         at java.lang.ApplicationShutdownHooks.add(Unknown Source)         at java.lang.Runtime.addShutdownHook(Unknown Source)         at org.apache.catalina.startup.Catalina.start(Catalina.java:699)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at java.lang.reflect.Method.invoke(Unknown Source)         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at java.lang.reflect.Method.invoke(Unknown Source)         at com.comsol.util.application.ServerApplication.a(Unknown Source)         at com.comsol.util.application.ServerApplication.a(Unknown Source)         at com.comsol.util.application.ServerApplication.a(Unknown Source)         at com.comsol.util.application.ServerApplication.main(Unknown Source)      What might be the reason and how should I fix it?


title: How long will Debian be supporting Gnome 2?

text: I'm choosing a new distro, and I'm trying to avoid Gnome 3 (and Unity). Debian is using Gnome 2.3, but I'm not sure for how long -- I don't want to install it and be forced to update to Gnome 3 in a couple months. How long does Debian plan to support Gnome 2?


title: How to write a script that effectively determines distro name?

text: I saw this post on all the different ways to find out what distro is installed, so I'm trying to write a script that tries them all. The possible commands include:               $ cat /etc/lsb-release      $ cat /etc/issue      $ dmesg | head -1     $ cat /proc/version      $ cat /etc/slackware-version      $ cat/etc/debian-verion       I tried writing something like this (I speak Spanish normally, so it's in Spanish):               function Nombre_SO()     {              DistroName="Linux"         if [ $DistroName = Linux ] ;         then          # Debian         debian=`cat /etc/debian_version | cut -d " " -f01 | tr '[:upper:]' '[:lower:]'`         if [ "$debian" = "debian" || "squeeze/sid" || "lenny" ];              then             DistroName="debian"             else             echo "Esto no es debian"         fi          # Slackware         slackware=`cat /etc/slackware-version | cut -d " " -f01` | tr '[:upper:]' '[:lower:]'`         if [ "$slackware" = "slackware" || "slackware-x86_64" ];         then             DistroName="slackware"          else         echo "Esto no es Slackware"     }      Can someone help me incorporate all the other ways to get a distro's name?


title: How do pwd and . determine the current path differently?

text: Is it mainly because `pwd` is not a builtin, while `.` is builtin to the bash shell? For example, they differ in the following example:               /tmp/ttt$ mv ../ttt ../tttt     /tmp/ttt$ pwd     /tmp/ttt     /tmp/ttt$ cd .     /tmp/tttt$


title: How to install adobe flash tar?

text: I have a problem getting Flash working in Mint13 XFCE. Now I have downloaded the tar file, but I don't understand what I have to do to get this installed. I have this file: install_flash_player_11_linux.i386.tar downloaded from here: http://get.adobe.com/nl/flashplayer/?no_redirect How do I install this?


title: Problems with SIG WINCH

text: When I run this command in a Linux terminal (konsole) and change then the windows size nothing happens. I have a second Linux in a virtual machine. There it works as expected.               trap -- 'echo changed size' SIGWINCH      What could be the reason that `SIGWINCH` doesn't work any more? __ Example: when I run this script on a normal Linux it outputs "SIGWINCH!" and dies as soon as the windows is resized. On the problem Linux resizing the windows has no effect - the script keeps running.               #!/usr/bin/env perl     use strict;     use warnings;          $SIG{WINCH} = sub { die 'SIGWINCH!!!' };          my $sum;     for my $i ( 1 .. 10_000_000 ) {         printf "%0.3f\n",  $i / 31;     }      * * * SIGWINCH is working again. I don't know why.


title: Running python script from Linux Terminal

text: I have downloaded this script named, pyAES.py and put it in a folder name codes, inside a Desktop directory of my Linux, According to this example, http://brandon.sternefamily.net/2007/06/aes- tutorial-python-implementation/ When I type,               ./pyAES.py -e testfile.txt -o testfile_encrypted.txt      the file pyAES.py should be executed. but I am getting this error,               pi@raspberrypi ~/Desktop/Codes $ pyAES.py     -bash: pyAES.py: command not found      the output of `ls -l` command is,               pi@raspberrypi ~/Desktop/Codes $ ls -l     total 16     -rw-r--r-- 1 pi pi 14536 Oct  8 10:44 pyAES.py      Here is the output after `chmod +x`               pi@raspberrypi ~/Desktop/Codes $ chmod +x pyAES.py                              pi@raspberrypi ~/Desktop/Codes $     pi@raspberrypi ~/Desktop/Codes $ pyAES.py     -bash: pyAES.py: command not found     pi@raspberrypi ~/Desktop/Codes $      and the command, `chmod +x pyAES.py && ./pyAES.py` gives the following error,               -bash: ./pyAES.py: /usr/bin/python2: bad interpreter: No such file or directory      I have also tried moving the file in `/usr/bin` directory and then executing it,               pi@raspberrypi /usr/bin $ pyAES.py     -bash: /usr/bin/pyAES.py: /usr/bin/python2: bad interpreter: No such file or directory     pi@raspberrypi /usr/bin $      I can see the file is present in /usr/bin directory but it is still giving an error that No such file or directory. I want to know why the Linux terminal is not executing the python script ?


title: Unplug AC causes anacron to stop. No resumumption if cron.daily had already started?

text: Anacron is started/stopped by a number of means, one of which is when AC power is plugged/unplugged, as can be seen by examining `/etc/apm/event.d/anacron` and `/usr/lib/pm-utils/power.d/anacron`. You can also see in `var/log/syslog` that anacron stops/starts when you unplug and replug the laptop. This a power saving feature. When anacron runs the `cron.daily` batch of jobs, initially `0anacron` is called, and it updates the `/var/spool/anacron/cron.daily` time stamp (`anacron -u cron.daily`) to the current date, before anacron goes on to process the remainder of the scripts (alphabetically, I believe). All well and good, but let's say we have the scenario where the `cron.daily` batch begins to run, the time stamp gets updated for `cron.daily`, but then sometime before completion the user unplugged the AC stopping anacron. What now? If the user replugs in (either after or before rebooting), anacron will relaunch, but upon checking the timestamp for `cron.daily` it will see it as newer than one day old, and deem the batch complete for the day. Can someone confirm if this really is the case? It would seem to explain why my backup script has not run some days, but ran fine on others. Then if so, why is the timestamp updated before the jobs run and not after all have completed?


title: Wireshark or MC installation wants to remove gnome and more

text: I want to install wireshark or mc (Midnight Commander) with `apt-get` or `synaptic`, but I get a message that "this installation will remove a lot of actually installed packages".   There are for example `gdebi`, `gedit`, `gnome`, `vino`, etc. I don't understand. Of course I need these packages. Transcript of `apt-get install mc`:               apt-get install mc     Reading package lists... Done     Building dependency tree                 Retrieving state information ... Done     The following packages were automatically installed and are no longer needed:       aptdaemon cheese-common empathy-common evolution-common gir1.2-gck-1 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-ibus-1.0       gir1.2-javascriptcoregtk-3.0 gir1.2-rest-0.7 gir1.2-tracker-0.16 gnome-panel-data gnome-session-common gnome-themes-standard-data       gstreamer1.0-nice gstreamer1.0-plugins-good gstreamer1.0-pulseaudio libavcodec54 libavformat54 libcamel-1.2-43 libcaribou-common       libchromaprint0 libcrack2 libebackend-1.2-6 libebook-1.2-14 libebook-contacts-1.2-0 libecal-1.2-15 libedata-book-1.2-17       libedata-cal-1.2-20 libedataserver-1.2-17 libelf1 libfluidsynth1 libgcr-base-3-1 libgexiv2-2 libgoa-1.0-common libgrilo-0.2-1       libgstreamer-plugins-bad1.0-0 libibus-1.0-5 libimobiledevice4 libmpg123-0 libmx-common libnm-gtk-common libopencv-core2.4       libopencv-flann2.4 libopencv-imgproc2.4 libopencv-ml2.4 libopencv-video2.4 libpackagekit-glib2-16 libpwquality-common libpwquality1       libraw9 libsbc1 libsecret-1-0 libsecret-common libsrtp0 libsystemd-journal0 libtbb2 libusbmuxd2 libwebp4 libx264-133 libytnef0       metacity-common python-aptdaemon python-defer python3-apt python3-aptdaemon python3-dbus python3-defer python3-gi python3-pkg-resources       python3-software-properties     To remove them, use the "apt-get autoremove".     Install the following extra packages:       accountsservice aptdaemon cheese-common colord empathy-common evince-common evolution-common evolution-data-server-common folks-common       gdebi-core gir1.2-freedesktop gir1.2-gck-1 gir1.2-glib-2.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-ibus-1.0       gir1.2-javascriptcoregtk-3.0 gir1.2-soup-2.4 gir1.2-telepathylogger-0.2 gir1.2-tracker-0.16 glib-networking glib-networking-common       glib-networking-services gnome-control-center-data gnome-menus gnome-packagekit-data gnome-panel-data gnome-session-common       gnome-themes-standard-data gsettings-desktop-schemas gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-pulseaudio       init-system-helpers libaccountsservice0 libapt-inst1.5 libapt-pkg4.12 libarchive13 libasn1-8-heimdal libatk1.0-0 libatk1.0-data       libatspi2.0-0 libavcodec54 libavformat54 libavutil52 libcairo2 libcamel-1.2-43 libcaribou-common libcolord1 libcolorhug1 libcrack2       libcups2 libcupsfilters1 libcupsimage2 libdjvulibre-text libdjvulibre21 libebackend-1.2-6 libebook-1.2-14 libebook-contacts-1.2-0       libecal-1.2-15 libedata-book-1.2-17 libedata-cal-1.2-20 libedataserver-1.2-17 libegl1-mesa libelfg0 libflac8 libfolks-telepathy25       libfolks25 libgbm1 libgcr-base-3-1 libgcrypt11 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgee-0.8-2 libgeocode-glib0 libgexiv2-2       libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglibmm-2.4-1c2a libgnomekbd-common libgoa-1.0-common libgrilo-0.2-1 libgsf-1-114       libgsf-1-common libgssapi3-heimdal libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-common libgweather-common       libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libibus-1.0-5 libicu52       libimobiledevice4 libjavascriptcoregtk-3.0-0 libkrb5-26-heimdal libldb1 libllvm3.3 libmx-common libnm-glib4 libnm-gtk-common libnm-util2       libntdb1 libopus0 liborc-0.4-0 libpackagekit-glib2-16 libpixman-1-0 libproxy1 libpwquality-common libpwquality1 libraw9       libroken18-heimdal libsecret-1-0 libsecret-common libsmbclient libsoundtouch0 libsoup-gnome2.4-1 libsoup2.4-1 libswscale2       libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 libtasn1-3 libtelepathy-glib0 libtelepathy-logger3 libtevent0 libtiff5       libtracker-extract-0.16-0 libtracker-miner-0.16-0 libtracker-sparql-0.16-0 libudev1 libusbmuxd2 libva1 libvpx1 libwacom-common libwacom2       libwayland-client0 libwayland-server0 libwbclient0 libwebkitgtk-3.0-common libwebp4 libwind0-heimdal libx11-6 libx264-133 libxcb-xfixes0       libxi6 libxml2 libytnef0 libzeitgeist-1.0-1 mc-data metacity-common nautilus-data python-aptdaemon python-gi python-gi-cairo       python-talloc python3-apt python3-aptdaemon python3-dbus python3-defer python3-gi python3-pkg-resources python3-software-properties       samba-libs tracker tracker-extract tracker-miner-fs tracker-utils     Navrhované balíky:       lrzip cups-common rng-tools grilo-plugins-0.2 gstreamer-codec-install gnome-codec-install gstreamer1.0-tools opus-tools arj catdvi       texlive-binaries dbview djvulibre-bin genisoimage gv odt2txt poppler-utils python-boto python-tz python3-apt-dbg python-apt-doc       python-dbus-doc python3-dbus-dbg python3-setuptools     Odporúčané balíky:       lintian gstreamer1.0-x cracklib-runtime libegl1-mesa-drivers     The following packages will be REMOVED:       aisleriot alacarte baobab brasero caribou caribou-antler cheese dconf-tools empathy eog evince evolution evolution-data-server       evolution-plugins evolution-webcal file-roller gcalctool gcr gdebi gdm3 gedit gedit-plugins gir1.2-caribou-1.0 gir1.2-clutter-1.0       gir1.2-clutter-gst-1.0 gir1.2-evince-3.0 gir1.2-gcr-3 gir1.2-gkbd-3.0 gir1.2-gnomebluetooth-1.0 gir1.2-goa-1.0 gir1.2-gtk-3.0       gir1.2-gtkclutter-1.0 gir1.2-gtksource-3.0 gir1.2-gucharmap-2.90 gir1.2-mutter-3.0 gir1.2-panelapplet-4.0 gir1.2-peas-1.0 gir1.2-rb-3.0       gir1.2-totem-1.0 gir1.2-vte-2.90 gir1.2-webkit-3.0 gir1.2-wnck-3.0 gkbd-capplet glchess glines gnect gnibbles gnobots2 gnome       gnome-applets gnome-bluetooth gnome-color-manager gnome-contacts gnome-control-center gnome-core gnome-dictionary gnome-disk-utility       gnome-documents gnome-font-viewer gnome-games gnome-icon-theme gnome-icon-theme-extras gnome-icon-theme-symbolic gnome-keyring       gnome-media gnome-nettool gnome-online-accounts gnome-orca gnome-packagekit gnome-panel gnome-power-manager gnome-screensaver       gnome-screenshot gnome-session gnome-session-bin gnome-session-fallback gnome-settings-daemon gnome-shell gnome-shell-extensions       gnome-sudoku gnome-sushi gnome-system-log gnome-system-monitor gnome-terminal gnome-themes-standard gnome-tweak-tool gnome-user-guide       gnome-user-share gnomine gnotravex gnotski gtali gucharmap iagno libavahi-ui-gtk3-0 libbrasero-media3-1 libcanberra-gtk3-0       libcanberra-gtk3-module libcaribou-gtk3-module libcaribou0 libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcheese-gtk21 libcheese3       libclutter-1.0-0 libclutter-gst-1.0-0 libclutter-gtk-1.0-0 libclutter-imcontext-0.1-0 libclutter-imcontext-0.1-bin       libcluttergesture-0.0.2-0 libedata-book-1.2-13 libedataserverui-3.0-1 libepc-ui-1.0-3 libevdocument3-4 libevolution libevview3-3       libfolks-eds25 libgail-3-0 libgcr-3-1 libgdict-1.0-6 libgdu-gtk0 libgnome-bluetooth10 libgnome-desktop-3-2 libgnome-media-profiles-3.0-0       libgnomekbd7 libgoa-1.0-0 libgtk-3-0 libgtk-3-bin libgtk-vnc-2.0-0 libgtkhtml-4.0-0 libgtkhtml-4.0-common libgtkhtml-editor-4.0-0       libgtkmm-3.0-1 libgtksourceview-3.0-0 libgucharmap-2-90-7 libgweather-3-0 libmetacity-private0a libmutter0 libmx-1.0-2       libnautilus-extension1a libnm-gtk0 libpanel-applet-4-0 libpeas-1.0-0 librhythmbox-core6 libseed-gtk3-0 libtotem0 libunique-3.0-0       libvte-2.90-9 libwebkitgtk-3.0-0 libwnck-3-0 libyelp0 lightsoff mahjongg metacity mousetweaks nautilus nautilus-sendto       nautilus-sendto-empathy network-manager-gnome notification-daemon policykit-1-gnome python-aptdaemon.gtk3widgets quadrapassel rhythmbox       rhythmbox-plugin-cdrecorder rhythmbox-plugins rygel-preferences seahorse shotwell simple-scan software-properties-gtk sound-juicer       swell-foop task-gnome-desktop totem totem-plugins tracker-gui transmission-gtk vinagre vino xdg-user-dirs-gtk yelp zenity     Install the following NEW packages:       gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-ibus-1.0 gir1.2-tracker-0.16 gstreamer1.0-plugins-base gstreamer1.0-plugins-good       gstreamer1.0-pulseaudio init-system-helpers libarchive13 libasn1-8-heimdal libavcodec54 libavformat54 libavutil52 libcamel-1.2-43       libcolorhug1 libcrack2 libcupsfilters1 libebackend-1.2-6 libebook-1.2-14 libebook-contacts-1.2-0 libecal-1.2-15 libedata-book-1.2-17       libedata-cal-1.2-20 libedataserver-1.2-17 libegl1-mesa libelfg0 libgbm1 libgcr-base-3-1 libgee-0.8-2 libgexiv2-2 libgrilo-0.2-1       libgssapi3-heimdal libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal       libheimntlm0-heimdal libhx509-5-heimdal libibus-1.0-5 libicu52 libimobiledevice4 libkrb5-26-heimdal libldb1 libllvm3.3 libntdb1       libpackagekit-glib2-16 libproxy1 libpwquality-common libpwquality1 libraw9 libroken18-heimdal libsecret-1-0 libsecret-common       libsystemd-journal0 libtelepathy-logger3 libtevent0 libtiff5 libtracker-extract-0.16-0 libtracker-miner-0.16-0 libtracker-sparql-0.16-0       libudev1 libusbmuxd2 libwayland-client0 libwayland-server0 libwebp4 libwind0-heimdal libx264-133 libxcb-xfixes0 libytnef0       libzeitgeist-1.0-1 mc mc-data python-talloc python3-apt python3-aptdaemon python3-dbus python3-defer python3-gi python3-pkg-resources       python3-software-properties samba-libs     Nasledovné balíky sa aktualizujú:       accountsservice aptdaemon cheese-common colord empathy-common evince-common evolution-common evolution-data-server-common folks-common       gdebi-core gir1.2-freedesktop gir1.2-gck-1 gir1.2-glib-2.0 gir1.2-javascriptcoregtk-3.0 gir1.2-soup-2.4 gir1.2-telepathylogger-0.2       glib-networking glib-networking-common glib-networking-services gnome-control-center-data gnome-menus gnome-packagekit-data       gnome-panel-data gnome-session-common gnome-themes-standard-data gsettings-desktop-schemas libaccountsservice0 libapt-inst1.5       libapt-pkg4.12 libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo2 libcaribou-common libcolord1 libcups2 libcupsimage2 libdjvulibre-text       libdjvulibre21 libflac8 libfolks-telepathy25 libfolks25 libgcrypt11 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgeocode-glib0       libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglibmm-2.4-1c2a libgnomekbd-common libgoa-1.0-common libgsf-1-114 libgsf-1-common       libgtk-3-common libgweather-common libjavascriptcoregtk-3.0-0 libmx-common libnm-glib4 libnm-gtk-common libnm-util2 libopus0       liborc-0.4-0 libpixman-1-0 libsmbclient libsoundtouch0 libsoup-gnome2.4-1 libsoup2.4-1 libswscale2 libsystemd-daemon0 libsystemd-login0       libtasn1-3 libtelepathy-glib0 libva1 libvpx1 libwacom-common libwacom2 libwbclient0 libwebkitgtk-3.0-common libx11-6 libxi6 libxml2       metacity-common nautilus-data python-aptdaemon python-gi python-gi-cairo tracker tracker-extract tracker-miner-fs tracker-utils     91 upgraded, 82 newly installed, 183 to remove and 919 not upgraded.     You need to download 118 megabytes of archives.     After this operation, the disk space 235 megabytes     Do you want to continue [Y / n]?      Content of `/etc/apt/sources.list` (`/etc/apt/sources.list.d` is empty):               # deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 NETINST Binary-1 20131012-14:04]/ wheezy main          # deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 NETINST Binary-1 20131012-14:04]/ wheezy main          deb http://ftp.sk.debian.org/debian/ wheezy main contrib non-free     deb-src http://ftp.sk.debian.org/debian/ wheezy main contrib non-free          deb http://security.debian.org/ wheezy/updates main contrib non-free     deb-src http://security.debian.org/ wheezy/updates main contrib non-free          # wheezy-updates, previously known as 'volatile'     deb http://ftp.sk.debian.org/debian/ wheezy-updates main contrib non-free     deb-src http://ftp.sk.debian.org/debian/ wheezy-updates main contrib non-free          deb http://download.virtualbox.org/virtualbox/debian saucy contrib     deb http://download.virtualbox.org/virtualbox/debian raring contrib     deb http://download.virtualbox.org/virtualbox/debian quantal contrib     deb http://download.virtualbox.org/virtualbox/debian precise contrib     deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free     deb http://download.virtualbox.org/virtualbox/debian wheezy contrib     deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free          deb http://ftp.debian.org/debian experimental main     deb http://ftp.debian.org/debian testing main      Output of `apt-cache policy`:               apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://ftp.debian.org/debian/ testing/main Translation-sk      500 http://ftp.debian.org/debian/ testing/main Translation-en      500 http://ftp.debian.org/debian/ testing/main amd64 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=main          origin ftp.debian.org      500 http://ftp.debian.org/debian/ experimental/main Translation-en        1 http://ftp.debian.org/debian/ experimental/main amd64 Packages          release o=Debian,a=experimental,n=experimental,l=Debian,c=main          origin ftp.debian.org      500 http://download.virtualbox.org/virtualbox/debian/ squeeze/non-free amd64 Packages          release o=Oracle Corporation,n=squeeze,l=Oracle Corporation,c=non-free          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ squeeze/contrib amd64 Packages          release o=Oracle Corporation,n=squeeze,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ wheezy/contrib amd64 Packages          release o=Oracle Corporation,n=wheezy,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ lucid/non-free amd64 Packages          release o=Oracle Corporation,n=lucid,l=Oracle Corporation,c=non-free          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ lucid/contrib amd64 Packages          release o=Oracle Corporation,n=lucid,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ precise/contrib amd64 Packages          release o=Oracle Corporation,n=precise,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ quantal/contrib amd64 Packages          release o=Oracle Corporation,n=quantal,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ raring/contrib amd64 Packages          release o=Oracle Corporation,n=raring,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://download.virtualbox.org/virtualbox/debian/ saucy/contrib amd64 Packages          release o=Oracle Corporation,n=saucy,l=Oracle Corporation,c=contrib          origin download.virtualbox.org      500 http://ftp.sk.debian.org/debian/ wheezy-updates/non-free Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy-updates/main Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy-updates/contrib Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy-updates/non-free amd64 Packages          release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=non-free          origin ftp.sk.debian.org      500 http://ftp.sk.debian.org/debian/ wheezy-updates/contrib amd64 Packages          release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=contrib          origin ftp.sk.debian.org      500 http://ftp.sk.debian.org/debian/ wheezy-updates/main amd64 Packages          release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=main          origin ftp.sk.debian.org      500 http://security.debian.org/ wheezy/updates/non-free Translation-en      500 http://security.debian.org/ wheezy/updates/main Translation-en      500 http://security.debian.org/ wheezy/updates/contrib Translation-en      500 http://security.debian.org/ wheezy/updates/non-free amd64 Packages          release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=non-free          origin security.debian.org      500 http://security.debian.org/ wheezy/updates/contrib amd64 Packages          release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=contrib          origin security.debian.org      500 http://security.debian.org/ wheezy/updates/main amd64 Packages          release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main          origin security.debian.org      500 http://ftp.sk.debian.org/debian/ wheezy/non-free Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy/main Translation-sk      500 http://ftp.sk.debian.org/debian/ wheezy/main Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy/contrib Translation-en      500 http://ftp.sk.debian.org/debian/ wheezy/non-free amd64 Packages          release v=7.3,o=Debian,a=stable,n=wheezy,l=Debian,c=non-free          origin ftp.sk.debian.org      500 http://ftp.sk.debian.org/debian/ wheezy/contrib amd64 Packages          release v=7.3,o=Debian,a=stable,n=wheezy,l=Debian,c=contrib          origin ftp.sk.debian.org      500 http://ftp.sk.debian.org/debian/ wheezy/main amd64 Packages          release v=7.3,o=Debian,a=stable,n=wheezy,l=Debian,c=main          origin ftp.sk.debian.org      I have used Debian 7 Wheezy - 3.2.0-4-amd64 SMP Debian 3.2.51-1 x86_64 GNU/Linux. Have you any solution for non-conflicting installation?


title: Open port 80 in CentOS 6.5

text: I'm trying to open the Port 80 in my CentOS 6.5, on my virtual machine, so I can access the apache from my desktop's browser. ![enter image description here](http://i.stack.imgur.com/vw3zn.jpg) If you take a look at the screenshot above.... I've added the line before the blue arrow, as is written on http://www.cyberciti.biz/faq/linux-iptables- firewall-open-port-80/ Now I do get the apache test page when entering the IP- address in my browser, but still when restarting the iptables, I get a "FAILED" when CentOS tries to apply the new rule. Does anyone know a solution for this? Or do I need to ignore the failure?


title: What's the origin of rc, rc.d, share, proc in Linux?

text: I don't think I am a newbie at all, but I still can't figure out many abbreviations' origin like `rc`, `rc.d`, `share`, `proc`... I've heard someone says `rc` is "run command", `.d` is directory, but I'm not sure that's true. Is there a table explaining what their source is?


title: How do I redirect output from a command line app (howie AIML interpreter) to another command line app (espeak)?

text: I'd like to interact with an AIML interpreter that runs on the command line (Howie) using standard input and have the output played using espeak. I've tried: > ./runme.py | espeak --stdin No success yet.


title: How to start tailing a file that has not been yet created

text: I use `tail` to monitor the progress of jobs that I know will write their progress to disk. Almost always, I know which file they will create before they start running (the jobs are dispatched by a scheduler on a supercomputer) Is there a way to `tail` these files before they are created? I would like to do so while avoiding race conditions and/or making assumptions about how or when the jobs write to disk.


title: Obtain .avi file info from command line

text: What is the best way to obtain information as bitrate, framerate, width/height of an movie file (in my case .avi) from the command line? I am looking for a basic tool that works similarly as ImageMagicks identify. Running mplayer already gives this information (but also does a lot more): > VIDEO: [FMP4] 800x711 24bpp 25.000 fps 1320.9 kbps (161.2 kbyte/s) Is there a way to make mplayer only give this output (I did not find it in the man) or is there another standard bash-command to obtain the same information?


title: Print all lines not containing punctuation

text: I want a regex pattern which can print all lines not containing punctuation : **Input :**               .I am line 1     I am ! line 2     I am line (3)     I am line 4      **Output:** ( should be)               I am line 4      **What I've tried so far :**               grep '[^[:punct:]]' file.txt      But it shows all characters which is not punctuation.


title: How to expand tabs based on content?

text: I've got some tab-delimited data coming out of a Unix pipe. I'd like to format this data into a compact human-readable table. **How can I expand these tabs into spaces, and automatically set the tab stops based on the width of the field data?** For example, my hypothetical `generate_tsv` script might produce (I'm using `\t` to represent actual tab characters) —               alpha\t1\t0.21085026\tok     beta\t4096\t0.0\tok     gamma\t\t-1.0\tinvalid      Using `| expand -t 12`, I'd get:               alpha       1           0.21085026  ok     beta        4096        0.0         ok     gamma                   -1.0        invalid      But I'd like something more compact (so there are exactly two spaces separating columns), like this:               alpha  1     0.21085026  ok     beta   4096  0.0         ok     gamma        -1.0        invalid      * * * As suggested by @jw013, `| column -t -s $'\t'` is close, but not quite correct, as it collapses the empty cell:               alpha  1     0.21085026  ok     beta   4096  0.0         ok     gamma  -1.0  invalid


title: Subtracting Binary files

text: I have 2 Binary Files `FileA` and `FileC` Its is such that `FileC = FileA + FileB` using the `cat` utility How do I subtract `FileA` from `FileC` to get `FileB` ? _PS: I am using Ubuntu Oneiric_


title: Installing .package file in Arch Linux

text: I'm looking to install Yenka, the successor to Crocodile Clips (electronics simulation software). I was initially going to use WINE, but it seems they offer a linux option, too. However, the download is for a `.package` file, and I have absolutely no idea how it works. There seems to be very little about it on Google, and I'm not even sure if it's compatible with arch, so I'm not sure where to go from here. Any advice?


I am using CentOS in which i had removed libxml2 accidentally now it was showing the following error as follows: > There was a problem importing one of the Python modules required to run yum. > The error leading to this problem was: > > libxml2.so.2: cannot open shared object file: No such file or directory > > Please install a package which provides this module, or verify that the > module is installed correctly. > > It's possible that the above module doesn't match the current version of > Python, which is: 2.4.3 (#1, Jun 18 2012, 08:55:31) [GCC 4.1.2 20080704 (Red > Hat 4.1.2-52)] > > If you cannot solve this problem yourself, please go to the yum faq at: > http://wiki.linux.duke.edu/YumFaq


title: svn backup bash script errors

text: I have created bash script for create dump of svn repositories. I want to add such functionality that after dump of every repository script send it to remote server using rsync and delete from dump location and after that starts to make dump of next repository. I am using following script. script has some errors help me to improve it.               #!/bin/sh          # Record todays date     # --------------------     bakdate=$(date +%Y%m%d)     echo "--------------------------------"     echo "Running SVN backup $bakdate"     echo "--------------------------------\n"          # From where to backup repos?     # ---------------------------     svnrepos="/kk/svn/"     echo "\nGoing to backup all SVN repos located at: $svnrepos \n"          # Where to save the dump?     # ------------------------     bakdest="/save/"          # Location of remote server (to copy backup)     # ----------------------------------------     baktoremote="root@192.168.11.156:/kk"             cd $svnrepos               # Just make sure we have write access to backup-folder     if [ -d "$bakdest" ] && [ -w "$bakdest" ] ; then       # Now $repo has folder names = project names       for repo in *; do         # do svn dump for each project         echo "Taking backup/svndump for: $repo"         echo "Executing : svnadmin dump $repo >     $bakdest/$repo-$bakdate.dump \n"         # Now finally execute the backup         svnadmin dump $repo > $bakdest/$repo-$bakdate.dump               # Just make sure we have write access to backup-folder     if [ -d "$bakdest" ] && [ -w "$bakdest" ] ; then       # Now $repo has folder names = project names       for repo in *; do         # do svn dump for each project         echo "Taking backup/svndump for: $repo"         echo "Executing : svnadmin dump $repo >     $bakdest/$repo-$bakdate.svn.dump \n"         # Now finally execute the backup         svnadmin dump $repo > $bakdest/$repo-$bakdate.dump              # sent it to remote server            rsync -avP $bakdest/$repo-$bakdate.dump $baktoremote                      # delete repository after sending                rm -rf $repo-$bakdate.dump              fi


title: Unable to mount ext2 hard drive

text: I have been trying to mount an ext2 hard drive in ubuntu server, but when i run `sudo mount /dev/sdb /media/mynewdrive -t ext2` I get               wrong fs type, bad option, bad superblock on /dev/sdb1,     missing codepage or helper program, or other error     In some cases useful info is found in syslog - try     dmesg | tail  or so      I also ran fsck /dev/sdb and got               fsck from util-linux 2.20.1     e2fsck 1.42.5 (29-Jul-2012)     ext2fs_open2: Bad magic number in super-block     fsck.ext2: Superblock invalid, trying backup blocks...     fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb          The superblock could not be read or does not describe a correct ext2     filesystem.  If the device is valid and it really contains an ext2     filesystem (and not swap or ufs or something else), then the superblock     is corrupt, and you might try running e2fsck with an alternate superblock:         e2fsck -b 8193 <device>      Not sure where to go from here! Anyone have any ideas?


title: Massive, unpredictable I/O performance drop in Linux

text: I'm using Debian testing without any problems for ~6 years (I'm just regularly updating it), but recently it started to show a random behaviour that can be summarized as "Low I/O performance which persists until reboot". The problem is, suddenly all disk reads and writes slow down to ~5MB/sec which results in continuous read and writes. Since the rate is so low, disks are not mechanically challenged or stressed, but everything slows down until I reboot. I/O subsystem of the computer consists of one OCZ Vertex 3 SSD and two WD Caviar Black HDDs. SSD holds read-heavy part of the OS and a partition on the HDD holds the rest. To diagnose the problem I tried the following without success:   * `top` doesn't show any runaway activity neither in CPU nor I/O usage.   * `hdparm` returns normal performance ratings of the disks (I only checked `-t` though).   * `smartctl` doesn't show any performance problems in disks. Long tests showed that the disks are as good as new.  System has Z77 Chipset, 16GB of RAM and Intel i7 3770K CPU and the stats show no signs of saturation in RAM, I/O or CPU, but I'm not experienced to debug problems like this (esp. in kernel space). Any help will be appreciated. ### Update 1:   * I ran (forced) fsck on every partition as a precaution. All FS are clean.   * Incidentally I found a BIOS upgrade which came out a month ago & applied it.   * No partition is filled more than 50%. ### Update 2: The problem is not surfacing up for two days. Either `fsck` or the BIOS update cleaned some clogs in the system. I'm still monitoring the issue and will close the question with a post-mortem answer. ### Update 3: Problem just resurfaced and I did some more digging. Please see the answer.


title: cd to directory of a symbolically linked file

text: Before I write a script, anyone know an easy way to do the following:               $ pwd     /foo/bar     $ ls -l     lrwxr-xr-x  1 username  admin  48 Apr 17  2012 foo.sh -> /bar/foo.sh     $ cd /bar     $ ls     foo.sh      _i.e.,_ in the directory `/foo/bar`, I'd like to do something like `cdl` (cd link), which would take me to the directory of the linked file (or alternatively to the linked directory, if that happened to be the case—if it was I could type `cd -P /bar`).


title: Mint 16 Cinnamon, maximize window fully

text: I am using Linux Mint 16 Petra cinnamon. The problem I have is that when I drag a window to the top edge of the screen the window only maximizes to the top half of the screen instead of the the entire screen, just like when I hit the maximize button (plus button on the top right side of the screen). This is what I get. ![enter image description here](http://i.stack.imgur.com/mTPPG.png) This is what I want to happen. ![enter image description here](http://i.stack.imgur.com/1mRXP.png)


title: Solving a shared object linkage

text: I tried to run `icecat`.               [hibudevb@localhost icecat-24.0]$ ./icecat     XPCOMGlueLoad error for file /home/hibudevb/icecat-24.0/libxul.so:     libjpeg.so.8: cannot open shared object file: No such file or directory     Couldn't load XPCOM.      I found that /usr/lib64/libjpeg.so.62 existed, so did then:               # ln -s /usr/lib64/libjpeg.so.62 /usr/lib64/libjpeg.so.8      Repeating produced:               [hibudevb@localhost icecat-24.0]$ ./icecat     XPCOMGlueLoad error for file /home/hibudevb/icecat-24.0/libxul.so:     /lib64/libjpeg.so.8: version `LIBJPEG_8.0' not found (required by /home/hibudevb/     icecat-24.0/libxul.so)     Couldn't load XPCOM.      What are the fedora mechanics for retrieving/downloading/selecting/building that file? Shall I compile it myself?


title: What commands are available in the %pre section of a Kickstart file on CentOS?

text: Environment: CentOS 5.5 and 6.4 I have a request to analyze the hardware before installation to make sure our customers don't install our software on sub-standard server hardware. For example, examining memory, disk space, CPU, network card... So, the %pre section in my ks.cfg file seems like the perfect place to do this??? But, I can't get a command like free to work.... I would like to find out what commands are available in the %pre section and is this the right place to perform hardware analysis before the installation begins???.. If the %pre section of ks.cfg is NOT a good place to do this, then where?? Here is what I've tried so far and I get NO output: ks.cfg:               %pre       (echo "Analyzing Hardware...") >/dev/tty1       free >/dev/tty1       free_txt=`free -o`       (echo "$free_txt") >/dev/tty1     %end      I see 'Analyzing Hardware...' on the screen during the first part of the install but nothing after that.....