title: Booting a newly compiled linux kernel

text: I have started reading the book Essential Linux Device Drivers. I am following the process for compiling and booting into a new kernel. However I am unable to boot into the newly compiled kernel - I select the new kernel in grub and then ..nothing...the screen just stays the same. Here are the steps I am taking, as described in the book (I am using kernel 2.6.24 as that is what the book is based on):               cd /usr/src/linux-2.6.24 # the base dir of the kernel I downloaded     make clean     cp arch/x86/configs/i386_defconfig .config     make bzImage     cp arch/x86/boot/bzImage /boot/vmlinuz      The book says that: > You might need to alert your bootloader about the arrival of the new boot > image. If you are using the GRUB bootloader, it figures this out > automatically. Well it didn't figure it out automatically in my case as there was no option to select this kernel in GRUB. So I did it manually by typing update-grub in the terminal. And this didn't work either. However once I changed the filename from vmlinuz to vmlinuz-2.6.24 and type update-grub it picked it up. So on page 11 of the book there seems to already be multiple things left out... The book says to then reboot the machine. Anyway, I am now able to select this kernel in GRUB but as I said above it doesn't boot properly, the screen just goes blank and never changes. So am I missing something? I have followed the instructions in the book exactly. I am after spending €50 on this book and now I cannot go past page 11 because of this issue. Edit: I take it the fact that I am using Ubuntu on VirtualBox is not an issue? I just go into grub during the boot of the virtual machine Ubuntu and then select the newly compiled kernel, I cant see how that could be an issue.


title: HP-UX Boot from SAN

text: Does anybody knows how to make HP-UX boot from SAN? Any help would be highly appreciated. I'm totally disappointed by HP's lack of documentation. The server is RX8640 with HP-UX 11.31


title: How to put a background image on GRUB?

text: I found some images on the internet about some GRUBs with a background image, I would like to do something like that too, but how? **I have GRUB2**.


title: Interepreting WHOIS raw output

text: I am trying to interpret the WHOIS data which was output using a custom service. The data looks like this:               {       "rawText": "MarkMonitor is the Global Leader in Online Brand Protection.\r\n\r\nDomain Management\r\nMarkMonitor Brand Protection\u2122\r\nMarkMonitor AntiPiracy\u2122\r\nMarkMonitor AntiFraud\u2122\r\nP     rofessional and Managed Services\r\n\r\nVisit MarkMonitor at www.markmonitor.com\r\nContact us at 1 (800) 745-9229\r\nIn Europe, at +44 (0) 203 206 2220\r\n\r\nThe Data in MarkMonitor.com's WHOIS database      is provided by MarkMonitor.com\r\nfor information purposes, and to assist persons in obtaining information\r\nabout or related to a domain name registration record.  MarkMonitor.com\r\ndoes not guarantee i     ts accuracy.  By submitting a WHOIS query, you agree\r\nthat you will use this Data only for lawful purposes and that, under no\r\ncircumstances will you use this Data to: (1) allow, enable, or otherwise\r     \nsupport the transmission of mass unsolicited, commercial advertising or\r\nsolicitations via e-mail (spam); or  (2) enable high volume, automated,\r\nelectronic processes that apply to MarkMonitor.com (o     r its systems).\r\nMarkMonitor.com reserves the right to modify these terms at any time.\r\nBy submitting this query, you agree to abide by this policy.\r\n\r\nRegistrant:\r\n        Dns Admin\r\n        G     oogle Inc.\r\n        Please contact contact-admin@google.com 1600 Amphitheatre Parkway\r\n         Mountain View CA 94043\r\n        US\r\n        dns-admin@google.com +1.6502530000 Fax: +1.6506188571\r\n     \r\n    Domain Name: google.com\r\n\r\n        Registrar Name: Markmonitor.com\r\n        Registrar Whois: whois.markmonitor.com\r\n        Registrar Homepage: http://www.markmonitor.com\r\n\r\n    Adminis     trative Contact:\r\n        DNS Admin\r\n        Google Inc.\r\n        1600 Amphitheatre Parkway\r\n         Mountain View CA 94043\r\n        US\r\n        dns-admin@google.com +1.6506234000 Fax: +1.6506     188571\r\n    Technical Contact, Zone Contact:\r\n        DNS Admin\r\n        Google Inc.\r\n        2400 E. Bayshore Pkwy\r\n         Mountain View CA 94043\r\n        US\r\n        dns-admin@google.com      +1.6503300100 Fax: +1.6506181499\r\n\r\n    Created on..............: 1997-09-15.\r\n    Expires on..............: 2020-09-13.\r\n    Record last updated on..: 2012-01-29.\r\n\r\n    Domain servers in list     ed order:\r\n\r\n    ns2.google.com\r\n    ns1.google.com\r\n    ns3.google.com\r\n    ns4.google.com\r\n    \r\n\r\n\r\n\r\nMarkMonitor is the Global Leader in Online Brand Protection.\r\n\r\nDomain Manag     ement\r\nMarkMonitor Brand Protection\u2122\r\nMarkMonitor AntiPiracy\u2122\r\nMarkMonitor AntiFraud\u2122\r\nProfessional and Managed Services\r\n\r\nVisit MarkMonitor at www.markmonitor.com\r\nContact us      at 1 (800) 745-9229\r\nIn Europe, at +44 (0) 203 206 2220\r\n\r\n--",       "strippedText": "Registrant:\nDns Admin\nGoogle Inc.\nPlease contact contact-admin@google.com 1600 Amphitheatre Parkway\nMountain View CA 94043\nUS\ndns-admin@google.com +1.6502530000 Fax: +1.6506188571\     n\nDomain Name: google.com\n\nRegistrar Name: Markmonitor.com\nRegistrar Whois: whois.markmonitor.com\nRegistrar Homepage: http://www.markmonitor.com\n\nAdministrative Contact:\nDNS Admin\nGoogle Inc.\n160     0 Amphitheatre Parkway\nMountain View CA 94043\nUS\ndns-admin@google.com +1.6506234000 Fax: +1.6506188571\nTechnical Contact, Zone Contact:\nDNS Admin\nGoogle Inc.\n2400 E. Bayshore Pkwy\nMountain View CA      94043\nUS\ndns-admin@google.com +1.6503300100 Fax: +1.6506181499\n\nCreated on..............: 1997-09-15.\nExpires on..............: 2020-09-13.\nRecord last updated on..: 2012-01-29.\n\nDomain servers in      listed order:\nns2.google.com\nns1.google.com\nns3.google.com\nns4.google.com\n",       "domainNameExt": ".com",       "domainName": "google.com",       "audit": {         "updatedDate": {           "$": "2012-10-09 15:53:51.0",           "@class": "sql-timestamp"         },         "createdDate": {           "$": "2012-10-09 15:53:51.0",           "@class": "sql-timestamp"         }       },       "technicalContact": {         "rawText": "DNS Admin\nGoogle Inc.\n2400 E. Bayshore Pkwy\nMountain View CA 94043\nUS\ndns-admin@google.com +1.6503300100 Fax: +1.6506181499\n",         "city": "Mountain View",         "fax": "+1.6503300100 ",         "name": "DNS Admin",         "street1": "2400 E. Bayshore Pkwy",         "telephone": "+1.6503300100 ",       }     }      The data has been shortened for readability. I want to display this well on the command line so that is easier to read, meaning I should be able to interpret the special chars (\n,\r,\t). I tried using:               whoisout google.com | xargs -I LINE echo -e LINE      but this does not preserve the spaces before any line. Any idea how can I display this correctly?


title: How to run client script on on remote host and get results to the client

text: How to run script residing on the client on a remote host and get results back to the client in one go.


title: How to Link File URLs?

text: I am currently running WordPress/Woocommerce on an Apache server. I have files for sale on the server, located outside of the public path for security. I am attempting to link the downloadable files using `file:///srv/protected/book1.pdf`, but the site is serving a unique URL path (as expected) but returning `this page is not available`. Any ideas why these remote server files are not downloading? The "protected" directory is owned by Apache and within the Apache group. The files within the "protected" directory are owned by their uploaders, but also within the Apache group.


title: Send variable through tmux binding

text: I'm trying to setup a tmux (1.9) key-binding to swap to windows. Unfortunately, I can't seem to figure out a way to send a variable for the swap. For example, if you hit C-b . It will then prompt where to move the window to. How can I get the same behavior with swap? I have:               bind-key > swap-window -t {something else here...}


title: Print a string including single quotes and other special characters

text: How can I write this with an AIX script correctly? My requirement is to write this command in test.txt:               clock=$(prtconf -s | awk '{print $4,$5}')      I tried this command:               print 'clock=$(prtconf -s | awk '{print $4,$5}')' > test.txt      Output written in test.txt gives me:               clock=$(prtconf -s | awk {print ,})      If I use `" "` quotes:               print "clock=$(prtconf -s | awk '{print $4,$5}')"      It gives me directly to:               clock=3612 MHz      How can I solve this?


title: ssh into an account which has no home directory

text: As a follow up to my previous question, I have decided to create the local user accounts as below.               adduser --system --no-create-home USERNAME      Now, I would like the local users to be able to access the machines using `ssh`. As per my understanding, `ssh` works as below. Assuming I have 2 machines (say _alpha_ and _beta_ ).   * From _alpha_ machine: `ssh user@beta`   * _alpha's_ public key will be present under `~/.ssh/authorized_keys` in _beta_ machine.    * _alpha's_ private key will be present under `/~/.ssh` in the _alpha_ machine.  Now I have planned to implement **no home** for the users. So assuming I `adduser` into _beta_ machine without any home for any user, will I still be able to ssh into _beta_ from _alpha_?


title: aix ksh start weblogic server without nohup.out and return to underlying script

text: I am writing a ksh script, in which I want to start weblogic server in background and return to underlying script immediately(continue to execute the script) like this:               nohup path_to_domain_bin/startWebLogic.sh>/dev/null < /dev/null 2>&1      but my script hangs up after the nohup command, what's the right way to do what I want? please note, I want to get rid of nohup.out. I am running it on AIX 7.1


title: Script to turn off laptop keyboard if USB keyboard is present

text: My laptop keyboard is broke (`Esc` keeps randomly being pressed, can't fix it), so I've bought a USB keyboard instead. I want to write a script that will run at login which will check if my USB keyboard is connected, and disable my laptop keyboard if so. I want to use xinput to do this. for background, the correct command to disable device with ID 14 would be:               xinput set-int-prop 14 "Device Enabled" 8 0      I have what I thought was a reliable method of making sure that I am disabling the correct device by listing, grepping, cutting to get the ID number, and then using it in the correct command like so: `xinput --list | egrep "AT Translated" | cut -d "=" -f 2| cut -d "[" -f 1 | xargs -I {} xinput set-int-prop {} "Device Enabled" 8 0` However even this gives a fault:               unable to find device 14      I'm not sure why that is (first question), but I was wondering how I'd go about checking to see if the USB keyboard is there? I need an if function obviously, something which checks if **any** result is returned when I grep the string "USB USB Keykoard" [yes that spelling is wrong but what appears on my list] from `xinput --list`. So my second question is, how do I write that if function?


title: ACPI (Advanced Configuration And Power Configuration) not present on 2.6.38.8?

text: I need to disable some parts in **ACPI** , but it is simply not present in kernel **2.6.38.8** _(downloaded as a tar from net)_? I can see the option in kernel **2.6.34-12** (default on OpenSuse 11.3), but not in the other one. What's the point that I am missing? P.S. Screen shots are from kernel 2.6.38.8. ![enter image description here](http://i.stack.imgur.com/MldAn.png) ![enter image description here](http://i.stack.imgur.com/GbDU9.png) ![enter image description here](http://i.stack.imgur.com/iRalP.png)


title: buildroot/busybox: launch bootchartd on startup

text: I built a custom linux image using buildroot and busybox. To speed up the boot process I'd like to use bootchartd (built-in version of busybox) to profile the process. However bootchartd is not running, therefore no output file ( _/var/log/bootchart.tgz_ ) is generated. I appended each of these two lines to the kernel command line. Unfortunately, neither of them is working:               init=/sbin/bootchartd      Second version:               real_init=/sbin/bootchartd      Does anybody know why bootchartd isn't launched? Note: initramfs as a root filesystem


title: Debian, Windows domain and shared folder

text: I have linked many Debian PCs to a Windows domain. The logon process works well. Every users has a personal folder on the Windows server (and they can access these folders through their personal credential), and I want these folders to be automatically mounted when the users logon to the system (without asking the users to input their credentials again). I have tried to solve this with a script:               mount -t cifs //myserver /my/mount/point -o user=$USER      but my users don't have the permission to use the `mount` command (and if i'm using this method I have to ask the users to enter their passwords). Is there a way to solve this problem?


title: Accessing hidden partitions

text: I have two disks. They're both bootable and run Linux. When I physically mount the disks, I can see scsi devices get added. /dev/sdb and /dev/sdc. However the partitions are not detected. I can't see for example /dev/sdb1. It seems like someone has gone into a lot of effort to hide the partitons but I don't know how. I've tried using testdisk and it detects 2 partitons on each disk, but I know there are more than that. The partitions found are quite useless and I know there must be a boot partition. I've tried changing the disk geometry but this hasn't helped. How can I work out how they've been hidden and any suggestions on how to unhide them so that we can mount those other partitons? EDIT: During boot of one of the drives, this is what is displayed:               Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:0:0: [sda] 8388608 512-byte hardware sectors (4295 MB)     Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:0:0: [sda] Write Protect is off     Mar 27 12:44:11 (none) user.debug kernel: sd 0:0:0:0: [sda] Mode Sense: 61 00 00 00     Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:0:0: [sda] Cache data unavailable     Mar 27 12:44:11 (none) user.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through     Mar 27 12:44:11 (none) user.info kernel:  sda:     Mar 27 12:44:11 (none) user.warn kernel: custom_partition sda: partition 4 exceeds device capacity using largest possible size reduced from 5120000 to 4259840     Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:1:0: [sdb] 167772160 512-byte hardware sectors (85899 MB)     Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:1:0: [sdb] Write Protect is off     Mar 27 12:44:11 (none) user.debug kernel: sd 0:0:1:0: [sdb] Mode Sense: 61 00 00 00     Mar 27 12:44:11 (none) user.notice kernel: sd 0:0:1:0: [sdb] Cache data unavailable     Mar 27 12:44:11 (none) user.err kernel: sd 0:0:1:0: [sdb] Assuming drive cache: write through     Mar 27 12:44:11 (none) user.info kernel:  sdb: unknown partition table     Mar 27 12:44:11 (none) user.info kernel: kjournald starting.  Commit interval 5 seconds     Mar 27 12:44:11 (none) user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.     Mar 27 12:44:11 (none) user.info kernel: kjournald starting.  Commit interval 5 seconds     Mar 27 12:44:11 (none) user.info kernel: EXT3 FS on loop1, internal journal     Mar 27 12:44:11 (none) user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.     Mar 27 12:44:11 (none) user.warn kernel: Clocksource tsc unstable (delta = 607842230 ns)     Mar 27 12:44:11 (none) user.info kernel: kjournald starting.  Commit interval 5 seconds     Mar 27 12:44:11 (none) user.info kernel: EXT3 FS on sda4, internal journal     Mar 27 12:44:11 (none) user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.     Mar 27 12:44:11 (none) user.info kernel: Adding 1048568k swap on /dev/swap.  Priority:-1 extents:1 across:1048568k     Mar 27 12:44:11 (none) user.info kernel: kjournald starting.  Commit interval 5 seconds     Mar 27 12:44:11 (none) user.info kernel: EXT3 FS on sdb2, internal journal     Mar 27 12:44:11 (none) user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.     Mar 27 12:44:11 (none) user.info kernel: EXT3 FS on dm-0, internal journal      possible size reduced from 5120000 to 4259840


title: Command line program to Check Number of Seeder on a Torrent

text: is there a command line program that could check number of available seeder (and peers) for one or more torrent file, something that could give an output like this:               # peercount *.torrent     12/136 a.torrent      0/3 b.torrent     40/2 c.torrent      12, 0 and 40 for number of seeder 136, 3 and 2 for number of peer a, b and c for the torrent file name I need this to delete torrent files that has very little chance to complete


title: zsh is in /usr/bin, but also in /bin, what is the difference?

text: The /etc/shells says it has `zsh` installed in `/bin/zsh`, but also in `/usr/bin/zsh`.               brgr@envy17:~$ cat /etc/shells      # /etc/shells: valid login shells     /bin/sh     /bin/dash     /bin/bash     /bin/rbash     /usr/bin/tmux     /usr/bin/screen     /bin/zsh        <--     /usr/bin/zsh    <--      Now, the internet suggests me to use the one from `/usr/bin/`. My question is: why? What is the difference between these two and why is bash for example only intalled at one path (`/bin/bash`)?


title: How to change the default "fullscreen" monitor?

text: I have to monitors, one attached to my Nvidia graphics card using HDMI, the other one using VGA (using a DVI-VGA adapter). Most fullscreen games (that even recognizes that there are two monitors) uses the secondary monitor. The primary monitor is correctly set when I check from nvidia-settings, `xrandr` or KDE system settings. My current workaround is to simply disable monitor 2 when playing a game but that's not satisfiying. How can I effectively set the primary screen?


title: Adding custom setxkbmap options

text: Use setxkbmap to swap the Left Shift and Left Control describes how to swap some modifier keys with xkbcomp. However, I'd like to just add a custom setxkbmap option instead of using xkbcomp with a full layout definition. Similar to `setxkbmap -option local:swap_lwin_lctrl`, I'd like to swap right win & right control without modifying existing files in /usr/share/X11/xkb (which would be overwritten on package upgrade).


title: GRUB2 and kernel vga= parameter

text: According to the documentation, use of the `vga=` kernel parameter is deprecated as of GRUB2. The fact that some newer kernels don't seem to support it anymore on certain adapters is of no concern as the graphics card I have is seven to eight years old. The problem now is that I would like to use a higher resolution text mode, such as 80x50 instead of the default 80x25 characters. Apparently all graphics (VBE/VESA) modes are out of the question for this graphics card (ATI Rage XL) - the list of available modes only shows `0` through `6`. `6` is `80x60` but looks horrible, so I'd like to go with `1` (80x50). I've seen 80x50 and 80x60 working after getting the list of available modes whenever the default mode wasn't supported (with the default commented out `GRUB_TERMINAL=console`) and I was prompted to choose. How can I set the mode, if I'm not supposed to set it on the kernel command line **and** every use of `GRUB_GFXMODE` (with or without preloading `vbe` module) and `GRUB_GFXPAYLOAD_LINUX=keep` fails? Fails as in: screen stays blank because it's an invalid graphics mode for the card I have in this machine? My idea would be to pass `nomodeset` to the kernel still, but the boot loader would then still have to set the graphics mode. And I can't see any options other than the `vga=` kernel parameter for doing that. **Note:** the `vbetest` and `videotest` commands on the GRUB2 console will blank the screen and then the screen switches to sleep mode after claiming there is no video input. `vbeinfo` and `videoinfo` show a few available modes other than the above mentioned, but there is no mentioning of where this should be set. Also, when passing `vga=1` (without `nomodeset`) on the kernel command line, I see a very brief warning about it being deprecated, but it's too long to read completely - and the output doesn't appear in `dmesg`.


title: How can I use Unix to rename all html files by their titles?

text: As in, rename all HTML files in a directory by the text contained in TEXT? Could a combination of grep, sed, and mv work? For example, I have a file contained 1.html. The title of 1.html is contained in the HTML file as TEXT (it is contained within the title tags TEXT. I would like to rename 1.html to TEXT.html If a file is named as 5.html, and the title of 5.html is TEST2, then I want to rename 5.html to TEST2.html.


title: Passing arguments to su-provided shell

text: `man su` says:               You can use the -- argument to separate su options from the arguments     supplied to the shell.      `man bash` says:               --        A  --  signals  the  end of options and disables further option               processing.  Any arguments after the -- are treated as filenames               and arguments.  An argument of - is equivalent to --.      Well then, let's see:               [root ~] su - yuri -c 'echo "$*"' -- 1 2 3     2 3     [root ~] su - yuri -c 'echo "$*"' -- -- 1 2 3                                                            2 3     [root ~] su - yuri -c 'echo "$*"' -- - 1 2 3                                                             1 2 3     [root ~] su - yuri -c 'echo "$*"' - 1 2 3                                                                1 2 3      What I expected (output of the second command differs):               [root ~] su - yuri -c 'echo "$*"' -- 1 2 3     2 3     [root ~] su - yuri -c 'echo "$*"' -- -- 1 2 3                                                            1 2 3     [root ~] su - yuri -c 'echo "$*"' -- - 1 2 3                                                             1 2 3     [root ~] su - yuri -c 'echo "$*"' - 1 2 3                                                                1 2 3      Probably not much of an issue. But what's happening there? The second and the third variants seem like the way to go, but one of them doesn't work. The fourth one seems unreliable, `-` can be treated as `su`'s option.


title: Unix users, groups, and permissions

text: I don't understand unix users, groups, permissions, etc. For example, things managed by the `chmod`, `chgrp`, `usermod`, `groupadd`, etc. commands. How do all these things work?


title: How do I restart the network or ask the system to seek a refresh IP from the DHCP?

text: I'm running a Minix using VirtualBox. Minix is set to use the DHCP. And the network adapter is using a bridged connection*. When I last saved the state of the machine its IP was _192.168.1.11_ (`ifconfig`) and was connected to _wlan0_ (VirtualBox network settings). When I resumed the machine I changed the network adapter to _eth0_ -- the DHCP on this network* hands-out IP in the range _192.168.0.X_ -- but the IP that the system is assuming is, for obvious reasons, _192.168.1.11_ which of course can't be reached. For say, ssh-ing. I know Minix conforms with the POSIX standards. But like in Ubuntu (Linux) I couldn't use `service networking restart` nor could I find anything under `/etc` that could provide a hint. Of course I could use something like `ifconfig -h 192.168.0.10 netmask 255.255.255.0 mtu 1500`. But I want to get the IP from the DHCP. **Question:**   * How can I restart (command) the network dev/manager in Minix? (Assuming that way I could get a new IP)   * How can I request (command) a new IP from the DHCP? *please excuse/correct my (if any) technically inaccurate description.


title: Program to manipulate Samba shares (net.exe equivalent)

text: Is there an equivalent to the NET.exe suite for linux systems with which I can do net view queries for example?


title: how to migrate a squashfs system to another filesystem that's read/write

text: Well, basically what i want to do is copy all of my router's files (even the dev file (because i'm running busybox)) to my usb flash drive and let my router by default boot from the usb device. it might be not as fast as the nand flash that my router boots from, but i want to access the router's file any time and edit the files of the router. also, i don't want to mount it as squashfs, but as a filesystem the router understands, as it is currently running busybox v1.9.1 and has linux 2.6.15-17 (don't exactly remember), and i want the new filesystem to be read/write. here's the output of the mount command:               rootfs on / type rootfs (rw)     /dev/root on / type squashfs (ro)     none on /dev type tmpfs (rw)     /proc on /proc type proc (rw)     none on /var type tmpfs (rw)     none on /tmp type tmpfs (rw)     none on /mnt type tmpfs (rw)     usbfs on /proc/bus/usb type usbfs (rw)     /dev/nandflash on /upgflash type ext3 (rw,data=ordered)     /dev/sda1 on /mnt/usb1_1 type vfat (rw,fmask=0000,dmask=0000,codepage=cp936,iocharset=cp936,shortname=winnt)     none on /html/help type tmpfs (rw)      and the output of the df -k command:               Filesystem           1k-blocks      Used Available Use% Mounted on     rootfs                    8320      8320         0 100% /     /dev/root                 8320      8320         0 100% /     /dev/nandflash          251919    102992    136127  43% /upgflash     /dev/sda1              2880416   1078268   1802148  37% /mnt/usb1_1      and the output of the cat /proc/filesystems command:               nodev   sysfs     nodev   rootfs     nodev   bdev     nodev   proc     nodev   debugfs     nodev   sockfs     nodev   usbfs     nodev   pipefs     nodev   tmpfs     nodev   inotifyfs             ext3             squashfs     nodev   ramfs             vfat     nodev   fuse             fuseblk     nodev   fusectl      and the output of the cat /proc/partitions command:               major minor  #blocks  name            31     0        256 mtdblock0       31     1        512 mtdblock1       31     2       8826 mtdblock2        8     0    3942400 sda        8     1    2888608 sda1        8    16     256000 nflashb      and the output of the cat /proc/diskstats command:                 31    0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0       31    1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0       31    2 mtdblock2 236 3876 8224 3310 0 0 0 0 0 3310 3310        8    0 sda 5 7 19 124 0 0 0 0 0 124 124        8    1 sda1 11 11 0 0        8   16 nflashb 748 2937 29848 11605 423 878 2854 465219 0 36340 476824      and the output of cat /proc/devices command:               Character devices:       1 mem       2 pty       3 ttyp       4 ttyS       5 /dev/tty       5 /dev/console      10 misc      13 input      21 sg      89 i2c      90 mtd     180 usb     188 ttyUSB     189 usb_device     209 endpoint     242 fcache     248 bhal     249 commondrv     250 i2c_pca     251 usb_endpoint     252 usbmon     253 nvram     254 gpio          Block devices:       8 sd      31 mtdblock      65 sd      66 sd      67 sd      68 sd      69 sd      70 sd      71 sd     128 sd     129 sd     130 sd     131 sd     132 sd     133 sd     134 sd     135 sd      and the output of the cat /proc/meminfo command:               MemTotal:       126080 kB     MemFree:         90392 kB     Buffers:          4508 kB     Cached:          15428 kB     SwapCached:          0 kB     Active:           9616 kB     Inactive:        14412 kB     SwapTotal:           0 kB     SwapFree:            0 kB     Dirty:               0 kB     Writeback:           0 kB     AnonPages:        4116 kB     Mapped:           3452 kB     Slab:             5344 kB     SReclaimable:     1152 kB     SUnreclaim:       4192 kB     PageTables:        520 kB     NFS_Unstable:        0 kB     Bounce:              0 kB     CommitLimit:     63040 kB     Committed_AS:     7740 kB     VmallocTotal:  1032148 kB     VmallocUsed:      3460 kB     VmallocChunk:  1027212 kB      note: i provided all of this information so that you could get the right answer that's safe and not extremely fragile. please test the answers that you type in here BEFORE you tell me to do something unreliable or derpy.


title: Can't mount RAID after upgrade

text: I just upgraded my box to 14.04 and on bootup I got a message, that my RAID devices can't be mounted automatically so I chose to skip it and work through it after boot time. Now booted up, A mount -a gives me:               $ sudo mount -a     [sudo] password for reg:      mount: wrong fs type, bad option, bad superblock on /dev/md0,            missing codepage or helper program, or other error            In some cases useful info is found in syslog - try            dmesg | tail  or so          mount: wrong fs type, bad option, bad superblock on /dev/md1,            missing codepage or helper program, or other error            In some cases useful info is found in syslog - try            dmesg | tail  or so          $      while my mdadm.conf looks like:               $ cat /etc/mdadm/mdadm.conf     # mdadm.conf     #     # Please refer to mdadm.conf(5) for information about this file.     #          # by default (built-in), scan all partitions (/proc/partitions) and all     # containers for MD superblocks. alternatively, specify devices to scan, using     # wildcards if desired.     #DEVICE partitions containers          # auto-create devices with Debian standard permissions     CREATE owner=root group=disk mode=0660 auto=yes          # automatically tag new arrays as belonging to the local system     HOMEHOST <system>          # instruct the monitoring daemon where to send mail alerts     MAILADDR root          # next line added by reg 09/01/2009     ARRAY /dev/md0 devices=/dev/sdb6,/dev/sdc6     ARRAY /dev/md1 devices=/dev/sdb7,/dev/sdc7     #ARRAY /dev/md2 devices=/dev/sdb8,/dev/sdc8          # definitions of existing MD arrays          # This file was auto-generated on Tue, 08 May 2012 18:26:22 -0700     # by mkconf $Id$     $      just quickly started gparted to check if all my dirves show up and fair enough, my partitions 6 & 7 show up just fine on drives sdb and sdc. Also, seems like mdadm is running just fine:               $ ps ax | grep mdadm      1945 ?        Ss     0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog      7869 pts/8    S+     0:00 grep --color=auto mdadm     $      what could be my problem here, I don't quite follow.               $ dmesg | tail     [ 1437.716819] EXT4-fs (md0): bad geometry: block count 61034935 exceeds size of device (61034912 blocks)     [ 1437.717197] EXT4-fs (md1): mounting ext3 file system using the ext4 subsystem     [ 1437.717422] EXT4-fs (md1): bad geometry: block count 59585077 exceeds size of device (59585056 blocks)     [ 3030.508560] init: nvidia-persistenced main process (21110) terminated with status 1     [ 3757.003367] current rate 16719823 is different from the runtime rate 48000     [ 3757.006356] current rate 10357448 is different from the runtime rate 48000     [ 3850.605129] EXT4-fs (md0): mounting ext3 file system using the ext4 subsystem     [ 3850.605299] EXT4-fs (md0): bad geometry: block count 61034935 exceeds size of device (61034912 blocks)     [ 3850.605585] EXT4-fs (md1): mounting ext3 file system using the ext4 subsystem     [ 3850.605782] EXT4-fs (md1): bad geometry: block count 59585077 exceeds size of device (59585056 blocks)     reg@regDesktopHome:~/semios$      and syslog says nothing but               $ sudo mdadm --detail --scan     mdadm: cannot open /dev/md/127_0: No such file or directory     ARRAY /dev/md1 metadata=0.90 UUID=0abe503f:401d8d09:cd707cc0:bc3f8165     ARRAY /dev/md0 metadata=0.90 UUID=91e560f1:4e51d8eb:cd707cc0:bc3f8165     reg@regDesktopHome:~/semios$      **edit 1**               $ cat /proc/mdstat     Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]      md0 : active raid1 sdb6[1] sdc6[0]           244139648 blocks [2/2] [UU]          md1 : active raid1 sdb7[1] sdc7[0]           238340224 blocks [2/2] [UU]          md127 : active raid1 sdb3[1] sdc3[0]           390628416 blocks [2/2] [UU]          unused devices: <none>     $           $ sudo mdadm --detail /dev/md0     /dev/md0:             Version : 0.90       Creation Time : Tue Sep  1 19:15:33 2009          Raid Level : raid1          Array Size : 244139648 (232.83 GiB 250.00 GB)       Used Dev Size : 244139648 (232.83 GiB 250.00 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 0         Persistence : Superblock is persistent              Update Time : Sun May  4 21:32:24 2014               State : clean       Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0                     UUID : 91e560f1:4e51d8eb:cd707cc0:bc3f8165              Events : 0.75007              Number   Major   Minor   RaidDevice State            0       8       38        0      active sync   /dev/sdc6            1       8       22        1      active sync   /dev/sdb6     reg@regDesktopHome:~/semios$ sudo mdadm --detail /dev/md1     /dev/md1:             Version : 0.90       Creation Time : Tue Sep  8 21:19:15 2009          Raid Level : raid1          Array Size : 238340224 (227.30 GiB 244.06 GB)       Used Dev Size : 238340224 (227.30 GiB 244.06 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 1         Persistence : Superblock is persistent              Update Time : Sun May  4 21:32:24 2014               State : clean       Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0                     UUID : 0abe503f:401d8d09:cd707cc0:bc3f8165              Events : 0.3973383              Number   Major   Minor   RaidDevice State            0       8       39        0      active sync   /dev/sdc7            1       8       23        1      active sync   /dev/sdb7     $           $ sudo mdadm --examine /dev/sdb6     /dev/sdb6:               Magic : a92b4efc             Version : 0.90.00                UUID : 91e560f1:4e51d8eb:cd707cc0:bc3f8165       Creation Time : Tue Sep  1 19:15:33 2009          Raid Level : raid1       Used Dev Size : 244139648 (232.83 GiB 250.00 GB)          Array Size : 244139648 (232.83 GiB 250.00 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 0              Update Time : Sun May  4 21:32:24 2014               State : clean      Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0            Checksum : bfa701ff - correct              Events : 75007                     Number   Major   Minor   RaidDevice State     this     1       8       22        1      active sync   /dev/sdb6             0     0       8       38        0      active sync   /dev/sdc6        1     1       8       22        1      active sync   /dev/sdb6     reg@regDesktopHome:~/semios$ sudo mdadm --examine /dev/sdb7     /dev/sdb7:               Magic : a92b4efc             Version : 0.90.00                UUID : 0abe503f:401d8d09:cd707cc0:bc3f8165       Creation Time : Tue Sep  8 21:19:15 2009          Raid Level : raid1       Used Dev Size : 238340224 (227.30 GiB 244.06 GB)          Array Size : 238340224 (227.30 GiB 244.06 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 1              Update Time : Sun May  4 21:32:24 2014               State : clean      Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0            Checksum : 2a7376fd - correct              Events : 3973383                     Number   Major   Minor   RaidDevice State     this     1       8       23        1      active sync   /dev/sdb7             0     0       8       39        0      active sync   /dev/sdc7        1     1       8       23        1      active sync   /dev/sdb7     reg@regDesktopHome:~/semios$ sudo mdadm --examine /dev/sdc6     /dev/sdc6:               Magic : a92b4efc             Version : 0.90.00                UUID : 91e560f1:4e51d8eb:cd707cc0:bc3f8165       Creation Time : Tue Sep  1 19:15:33 2009          Raid Level : raid1       Used Dev Size : 244139648 (232.83 GiB 250.00 GB)          Array Size : 244139648 (232.83 GiB 250.00 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 0              Update Time : Sun May  4 21:32:24 2014               State : clean      Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0            Checksum : bfa7020d - correct              Events : 75007                     Number   Major   Minor   RaidDevice State     this     0       8       38        0      active sync   /dev/sdc6             0     0       8       38        0      active sync   /dev/sdc6        1     1       8       22        1      active sync   /dev/sdb6     reg@regDesktopHome:~/semios$ sudo mdadm --examine /dev/sdc7     /dev/sdc7:               Magic : a92b4efc             Version : 0.90.00                UUID : 0abe503f:401d8d09:cd707cc0:bc3f8165       Creation Time : Tue Sep  8 21:19:15 2009          Raid Level : raid1       Used Dev Size : 238340224 (227.30 GiB 244.06 GB)          Array Size : 238340224 (227.30 GiB 244.06 GB)        Raid Devices : 2       Total Devices : 2     Preferred Minor : 1              Update Time : Sun May  4 21:32:24 2014               State : clean      Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0            Checksum : 2a73770b - correct              Events : 3973383                     Number   Major   Minor   RaidDevice State     this     0       8       39        0      active sync   /dev/sdc7             0     0       8       39        0      active sync   /dev/sdc7        1     1       8       23        1      active sync   /dev/sdb7     $           $ sudo parted /dev/sdb unit mib print free     Model: ATA ST31000528AS (scsi)     Disk /dev/sdb: 953870MiB     Sector size (logical/physical): 512B/512B     Partition Table: msdos          Number  Start      End        Size       Type      File system     Flags      1      0.03MiB    95370MiB   95370MiB   primary   ext4            boot      3      95370MiB   476843MiB  381473MiB  primary   ext4      2      476843MiB  953859MiB  477016MiB  extended      6      476843MiB  715261MiB  238418MiB  logical   ext3      7      715261MiB  948015MiB  232754MiB  logical   ext3      5      948015MiB  953859MiB  5844MiB    logical   linux-swap(v1)             953859MiB  953870MiB  10.3MiB              Free Space          reg@regDesktopHome:~/semios$ sudo parted /dev/sdc unit mib print free     Model: ATA ST31000528AS (scsi)     Disk /dev/sdc: 953870MiB     Sector size (logical/physical): 512B/512B     Partition Table: msdos          Number  Start      End        Size       Type      File system     Flags      1      0.03MiB    95370MiB   95370MiB   primary   ext4            boot      3      95370MiB   476843MiB  381473MiB  primary   ext4      2      476843MiB  953859MiB  477016MiB  extended      6      476843MiB  715261MiB  238418MiB  logical   ext3      7      715261MiB  948015MiB  232754MiB  logical   ext3      5      948015MiB  953859MiB  5844MiB    logical   linux-swap(v1)             953859MiB  953870MiB  10.3MiB              Free Space          $      **edit 2** I tried the suggested but my file system wouldn't mount:               # sudo losetup --find --show --read-only /dev/sdc7 /dev/loop0     # mount -o ro /dev/loop0 /mnt/loop0 mount: unknown filesystem type 'linux_raid_member'     #      **edit 3** `file -s /dev/loop0` returns me the following:               $ sudo file -s /dev/loop0     [sudo] password for reg:      /dev/loop0: Linux rev 1.0 ext3 filesystem data, UUID=b2d66029-eeb9-4e4a-952c-0a3bd0696159 (large files)


title: Comparing Files based on 5 fields using Awk and Bash

text: I want to compare File1 and File2 (Separated by spaces) using five fields (Column 1,2,4,5,6). * _Logic:_ *If column 1 and 2 of File1 and File2 match exactly and if the File2 has the same characters as any of the characters present in column 4 and 5 of file1 then those lines of file1 and file2 are concatenated and redirected as output. **File1:**               s2/80   20      .       A       T       86      N=2     F=5;U=4     s2/20   10      .       G       T       90      N=2     F=5;U=4     s2/90   60      .       C       G       30      N=2     F=5;U=4      **File2:**               s2/90   60      .       G       G       97      N=2     F=5;U=4     s2/80   20      .       A       A       20      N=2     F=5;U=4     s2/15   11      .       A       A       22      N=2     F=5;U=4     s2/90   21      .       C       C       82      N=2     F=5;U=4     s2/20   10      .       G       G       99      N=2     F=5;U=4     s2/80   10      .       T       G       11      N=2     F=5;U=4     s2/90   60      .       G       T       55      N=2     F=5;U=4      **Output:**               s2/80  20 . A   T   86  N=2 F=5;U=4  s2/80  20  . A   A   20   N=2     F=5;U=4     s2/20  10 . G   T   90  N=2 F=5;U=4  s2/20  10  . G   G   99   N=2     F=5;U=4     s2/90  60 . C   G   30  N=2 F=5;U=4  s2/90  60  . G   G   97   N=2     F=5;U=4      I'm new in this field and would appreciate any guidance.


title: Is there any way to disable shutdowning remote machine?

text: I sometimes mistakenly shutdown the remote machine by using `sudo init 0`, so I wrote something like in one of my rc files:               alias sudo='sudo '     if [ $SSH_CLIENT ]; then       alias init 'echo Never use init when ssh'     fi      However although the rc files is executed, `init` still runs `/sbin/init` rather than the alias. And I don't like to add a global wrapper script into `/usr/local/bin`. Is it possible to disable `sudo init 0` then? Or I have to ask the administrator for help?


title: Old Debian packages install sources

text: I'm trying to install `make` program using aptitude install make in my Debian. Unfortunately I have error :               Err http://debian.balt.net lenny/main make 3.81-5      404 NotFound      What I need to do to make things go?               My linux version:     2.6.26-2-686 (Debian 2.6.26-22lenny1)


title: Advanced Find and Replace Program

text: I have code in which I need to do a mass find and replace (within only one file). I could easily do this except for that I need a free program (Preferably already compiled for Ubuntu so I don't have to compile it myself) that can add a number to each one similar to the program "bulk rename" except within a text file. So for example, I need to do the following with over a hundred items: Turn:               begin();     Random code in between.          begin();     More random code...          100 more "begin()"s...          begin();      Into:               begin(1);     Random code in between.          begin(2);     More random code.          100 more "begin()"s...          begin(102);      And if anyone knows of a program that only works with windows, that would be fine, as well. Any help is greatly appreciated.


title: My at command failed to reschedule. How can I debug this?

text: When using `at` is there a limitation on the amount of minutes to use?   E.g I rescheduled programmatically via a script to run in the next 2014.989 minutes (taken from the log) but when I do `atq` I don't see anything listed.   I assume my rescheduling failed? Why? How could I debug this?


title: How to capture the adress an application contacts?

text: An application contacts an Internet host on each start of it. It seems to take just an instant. I don't know if HTTP, plain TCP or UDP or what is used but tend to suppose HTTP. What a tool can I use to track this connection?


title: Understanding different fields of output of sensors

text: Here's the output of `sensors` command:               thinkpad-isa-0000     Adapter: ISA adapter     fan1:        3414 RPM          coretemp-isa-0000     Adapter: ISA adapter     Physical id 0:  +50.0°C  (high = +86.0°C, crit = +100.0°C)     Core 0:         +47.0°C  (high = +86.0°C, crit = +100.0°C)     Core 1:         +49.0°C  (high = +86.0°C, crit = +100.0°C)          acpitz-virtual-0     Adapter: Virtual device     temp1:        +49.0°C  (crit = +99.0°C)      What is the `Physical id 0` device, and how does the virtual device works here? Where does the data come from?


title: No framebuffer device: how to enable it?

text: I'm trying to make a PCMCIA tuner card work in my headless home server, running Debian Squeeze. Now, as I have very big troubles finding the correct command line to capture, transcode end stream the video to the network using VLC, I decided to go step by step, and work first on local output. That's where the problem comes in: **there seems to be no framebuffer device (/dev/fb0) to access for displaying graphics on the attached screen!** And indeed I noticed I don't have the Linux penguin image at boot (didn't pay attention before as screen is attached, but always off, and anyway computer is always on). As I'm not very familiar with Linux graphics, I would like to understand:   * Is this related to my particular hardware (see below)? Or is it specific to Debian Squeeze/ a kernel version/... ?   * Is there some driver I need to manually install/load? Now some general information:   * The computer has no dedicated graphic card, but an embedded graphic chipset (Intel G31 Express), embedded on the motherboard (Gigabyte G31M-ES2L)   * I don't want to install a full featured X server, just have a framebuffer device for this particular test Any ideas/comments on the issue?


title: Unable to delete file, even as root

text: I've got a file on remote machine (saying that, cause I don't know who the heck created it), that I've to remove.               user@machine:~/folder$ ls     lift_proto.db.lock.db      And permissions are like this:               user@machine:~/folder$ ls -al     total 12     drwxrwxrwx  2 root          root         4096 2012-03-06 20:57 .     drwxr-xr-x 26 user          group        4096 2012-03-06 20:53 ..     -rw-r--r--  1 root          root          126 2012-03-06 20:57 lift_proto.db.lock.db      Trying to delete:               user@machine:~/folder$ sudo rm lift_proto.db.lock.db       And nothing happens:               user@machine:~/folder$ ls     lift_proto.db.lock.db      I've seen that question, but this doesn't helped a lot:               user@machine:~/folder$ lsattr     -----------------e- ./lift_proto.db.lock.db      Moreover, I've successively tried to change ownership of file to `user` and permissions to 777, but then I'm deleting that file and it is still here back with root ownership and old permissions. My last guess that somebody somehow syncing that file from elsewhere (btw, is there any way to see that?), if not (e.g. you're seeing that there is something with attrs or etc), how can I delete that? **UPDATE 1:** `-f` flag of `rm` doesn't solve problem   **UPDATE 2:** Here is the output of `stat` before and after:               user@machine:~/folder$ stat lift_proto.db.lock.db        File: `lift_proto.db.lock.db'       Size: 126         Blocks: 8          IO Block: 4096   regular file     Device: 900h/2304d  Inode: 20054245    Links: 1     Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)     Access: 2012-03-06 21:30:40.600796566 +0400     Modify: 2012-03-06 21:30:40.600796566 +0400     Change: 2012-03-06 21:30:40.600796566 +0400     user@machine:~/folder$ sudo rm -f lift_proto.db.lock.db      user@machine:~/folder$ stat lift_proto.db.lock.db        File: `lift_proto.db.lock.db'       Size: 126         Blocks: 8          IO Block: 4096   regular file     Device: 900h/2304d  Inode: 20054245    Links: 1     Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)     Access: 2012-03-06 21:32:36.621421452 +0400     Modify: 2012-03-06 21:32:36.621421452 +0400     Change: 2012-03-06 21:32:36.621421452 +0400      **UPDATE 3** strace output               user@machine:~/folder$ sudo strace rm -f lift_proto.db.lock.db              execve("/bin/rm", ["rm", "-f", "lift_proto.db.lock.db"], [/* 14 vars */]) = 0     brk(0)                                  = 0x8c9000     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc967443000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=42930, ...}) = 0     mmap(NULL, 42930, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967438000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/libc.so.6", O_RDONLY)        = 3     read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\355\1\0\0\0\0\0"..., 832) = 832     fstat(3, {st_mode=S_IFREG|0755, st_size=1572232, ...}) = 0     mmap(NULL, 3680296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc966ea3000     mprotect(0x7fc96701d000, 2093056, PROT_NONE) = 0     mmap(0x7fc96721c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x179000) = 0x7fc96721c000     mmap(0x7fc967221000, 18472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc967221000     close(3)                                = 0     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc967437000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc967436000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc967435000     arch_prctl(ARCH_SET_FS, 0x7fc967436700) = 0     mprotect(0x7fc96721c000, 16384, PROT_READ) = 0     mprotect(0x60e000, 4096, PROT_READ)     = 0     mprotect(0x7fc967445000, 4096, PROT_READ) = 0     munmap(0x7fc967438000, 42930)           = 0     brk(0)                                  = 0x8c9000     brk(0x8ea000)                           = 0x8ea000     open("/usr/lib/locale/locale-archive", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=2027984, ...}) = 0     mmap(NULL, 2027984, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc966cb3000     close(3)                                = 0     open("/usr/share/locale/locale.alias", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc967442000     read(3, "# Locale name alias data base.\n#"..., 4096) = 2570     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0x7fc967442000, 4096)            = 0     open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=373, ...}) = 0     mmap(NULL, 373, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967442000     close(3)                                = 0     open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0     mmap(NULL, 26048, PROT_READ, MAP_SHARED, 3, 0) = 0x7fc96743b000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_MEASUREMENT", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0     mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc96743a000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_TELEPHONE", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0     mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967439000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_ADDRESS", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=155, ...}) = 0     mmap(NULL, 155, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967438000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_NAME", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0     mmap(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967434000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_PAPER", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0     mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967433000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = 3     fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0     close(3)                                = 0     open("/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=57, ...}) = 0     mmap(NULL, 57, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967432000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_MONETARY", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=286, ...}) = 0     mmap(NULL, 286, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967431000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_COLLATE", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=1170770, ...}) = 0     mmap(NULL, 1170770, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967313000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_TIME", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=2454, ...}) = 0     mmap(NULL, 2454, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967312000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_NUMERIC", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0     mmap(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc967311000     close(3)                                = 0     open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=256324, ...}) = 0     mmap(NULL, 256324, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc9672d2000     close(3)                                = 0     ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0     unlinkat(AT_FDCWD, "lift_proto.db.lock.db", 0) = 0     close(0)                                = 0     close(1)                                = 0     close(2)                                = 0     exit_group(0)                           = ?


title: Why does SELinux allow me to read this file?

text: I appear to be misunderstanding the security levels/categories within SELinux. I have attempted to configure a file that I have read access to (via DAC), but no read access to via SELinux categories. My user is confied to one category (C2), and the file is set to C3.               [test1@jsightler ~]$ id -Z     unconfined_u:unconfined_r:unconfined_t:s0:c2          [test1@jsightler ~]$ cd /testdir/     [test1@jsightler testdir]$ ls -Z     -rw-r--r--. root root unconfined_u:object_r:default_t:s0:c3 test               [test1@jsightler testdir]$ cat test      adfasdfadsfas      Why does this read succeed? EDIT: sestatus output:               [root@jsightler ~]# sestatus     SELinux status:                 enabled     SELinuxfs mount:                /selinux     Current mode:                   enforcing     Mode from config file:          enforcing     Policy version:                 24     Policy from config file:        targeted     [root@jsightler ~]#


title: Fixing broken packages in a Debian testing distribution

text: I'm playing around with Linux Mint Debian Edition (LMDE) in a VirtualBox instance to try it out and see if it'd be good for a main operating system for me. I'm pretty competent with most system administration and I'd like to have something like LMDE which is based on Debian testing so I can have a much more living/up to date operating system than Ubuntu/Linux Mint which is what I've historically run in the past. Something about reinstalling my operating system every 6 months to keep up to date seems wrong to me. After installing a virtual LMDE and `apt-get update` and `apt-get dist- upgrade`, I got the following error:               Reading package lists...     Building dependency tree...     Reading state information...     The following packages will be REMOVED:       gstreamer0.10-plugins-really-bad libntfs-3g75 libntfs-3g804 libvlccore4 vlc       vlc-nox vlc-plugin-notify vlc-plugin-pulse     The following NEW packages will be installed:       cpp-4.5 gcc-4.5 gcc-4.5-base gcj-4.6-base gcj-4.6-jre-lib gir1.2-peas-1.0       gnome-desktop3-data libaacplus2 libaacs0 libbluray-bdj libbluray1       libcrystalhd3 libelfg0 libevince3 libgail-3-0 libgcj-bc libgcj-common       libgcj12 libgdata1.8-cil libglew1.6 libgnome-desktop-3-0 libjaxp1.3-java       libjaxp1.3-java-gcj liblockfile-bin libmhash2 libmission-control-plugins0       libmtp-runtime libmtp9 libpeas-1.0-0 libpeas-common libpoppler-glib6       libpoppler13 libseed-gtk3-0 libsigsegv2 libvlccore5 libwebkitgtk-3.0-0       libwebkitgtk-3.0-common libxalan2-java libxalan2-java-gcj libxerces2-java       libxerces2-java-gcj linux-headers-3.0.0-1-amd64 linux-headers-3.0.0-1-common       linux-headers-amd64 linux-image-3.0.0-1-amd64 linux-image-amd64       linux-kbuild-3.0.0 poppler-data zenity-common     The following packages have been kept back:       foomatic-db-engine gstreamer0.10-ffmpeg libavcodec53 mplayer     The following packages will be upgraded:       acpid alsa-utils apt apt-file apt-utils aspell aspell-en banshee base-passwd       bc binfmt-support brasero brasero-common bsdutils busybox cpp-4.4       cpufrequtils cron cups cups-client cups-common cups-driver-gutenprint       cups-ppdc curl dc dkms dmsetup eog evince evince-common fakeroot       firmware-atheros firmware-bnx2 firmware-bnx2x firmware-intelwimax       firmware-ipw2x00 firmware-ivtv firmware-iwlwifi firmware-linux       firmware-linux-nonfree firmware-qlogic firmware-ralink firmware-realtek       foomatic-db foomatic-filters fortunes-husse fuse fuse-utils g++-4.4 gawk       gcc-4.4 gcc-4.4-base gconf-editor genisoimage gettext-base gimp       gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0 gnome-applets gnome-applets-data       gnome-bluetooth gnome-disk-utility gnome-nettool gnome-power-manager       gnome-user-share grep grub-common grub-pc grub-pc-bin grub2-common       gstreamer0.10-plugins-bad gzip hal hwdata iptables iso-codes jfsutils       klibc-utils libalgorithm-diff-xs-perl libapache2-mod-dnssd libarchive1       libart2.0-cil libaspell15 libaudio2 libavutil51 libblas3gf libbrasero-media0       libbs2b0 libburn4 libcap2-bin libcpufreq0 libcupscgi1 libcupsdriver1       libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3 libdevmapper1.02.1 libedit2       libenchant1c2a libencode-locale-perl libevolution libfaac0 libfuse2       libgconf2.0-cil libgdiplus libgdu-gtk0 libgdu0 libgimp2.0 libglade2.0-cil       libglib-perl libglib2.0-cil libglu1-mesa libgnome-bluetooth7       libgnome-vfs2.0-cil libgnome2.24-cil libgnomecanvas2-0       libgnomecanvas2-common libgnomepanel2.24-cil libgnomeui-0 libgnomeui-common       libgstfarsight0.10-0 libgtk2.0-cil libgtkmm-2.4-1c2a libgudev-1.0-0       libgutenprint2 libhal-storage1 libhal1 libhtml-format-perl       libhtml-template-perl libieee1284-3 libijs-0.35 libisofs6 libjpeg62       libjs-jquery libkarma0 libklibc libkpathsea5 liblapack3gf liblcms1       liblist-moreutils-perl liblocale-gettext-perl liblockfile1 liblua5.1-0       liblvm2app2.2 liblzma2 liblzo2-2 libmjpegtools-2.0-0 libmng1       libmono-addins-gui0.2-cil libmono-addins0.2-cil libmpfr4 libmtp-common       libnotify-bin libnspr4-0d libnss3-1d liboobs-1-4 libparted0debian1 libpci3       libpcre3 libpcsclite1 libplist1 libpolkit-agent-1-0 libpolkit-backend-1-0       libpolkit-gobject-1-0 libpolkit-gtk-1-0 libportaudio2 libpurple-bin       libpurple0 libraptor2-0 librasqal3 librecode0 libreoffice libreoffice-base       libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core       libreoffice-draw libreoffice-emailmerge libreoffice-filter-mobiledev       libreoffice-gnome libreoffice-gtk libreoffice-impress       libreoffice-java-common libreoffice-math libreoffice-report-builder-bin       libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer       libruby1.8 libsane libsane-common libsgutils2-2 libsmbclient       libsoup-gnome2.4-1 libsqlite0 libssh2-1 libstdc++6-4.4-dev libswscale2       libtalloc2 libtdb1 libtelepathy-glib0 libtext-charwidth-perl       libtext-iconv-perl liburi-perl libusb-1.0-0 libv4l-0 libvlc5 libwbclient0       libwmf0.2-7 libxapian22 libxml2-utils libxslt1.1 libxv1 libyajl1       linux-headers-2.6-amd64 linux-image-2.6-amd64 locales m4 man-db manpages       manpages-dev mesa-utils mint-meta-codecs mintbackup mintmenu       mintupdate-debian mintwelcome mobile-broadband-provider-info modemmanager       multiarch-support nautilus-share net-tools network-manager-gnome       notification-daemon ntfs-3g ntp openssh-client p7zip p7zip-full pciutils       pidgin pidgin-data policykit-1 policykit-1-gnome poppler-utils procps       python-bugbuddy python-chardet python-debian python-evolution       python-gnomeapplet python-gnomedesktop python-gnomekeyring python-gtkspell       python-libxml2 python-mako python-markupsafe python-notify python-openssl       python-parted python-uno python-wnck python-xapian rsyslog ruby1.8 samba       samba-common samba-common-bin sane-utils simple-scan system-tools-backends       sysvinit telepathy-gabble telepathy-mission-control-5 thunderbird       thunderbird-l10n-en-us transmission-common transmission-gtk ttf-dejavu       ttf-dejavu-core ttf-dejavu-extra ttf-opensymbol ufraw-batch ufw uno-libs3       update-inetd ure usb-modeswitch usb-modeswitch-data usbutils uuid-runtime       vim-common vim-tiny vino vlc-data w3m wget wvdial xdg-user-dirs xinit xnest       xserver-xorg xserver-xorg-input-all xserver-xorg-video-all xsltproc xz-utils       zenity     Preconfiguring packages ...     309 upgraded, 49 newly installed, 8 to remove and 4 not upgraded.     Need to get 0 B/424 MB of archives.     After this operation, 325 MB of additional disk space will be used.     (Reading database ...      (Reading database ... 137421 files and directories currently installed.)     Preparing to replace gstreamer0.10-plugins-bad 0.10.22-2 (using .../gstreamer0.10-plugins-bad_0.10.22-3_amd64.deb) ...     Unpacking replacement gstreamer0.10-plugins-bad ...     dpkg: error processing /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_amd64.deb (--unpack):      trying to overwrite '/usr/lib/gstreamer-0.10/libgstxvid.so', which is also in package gstreamer0.10-plugins-really-bad 0.10.22-0.1     dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)     Errors were encountered while processing:      /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_amd64.deb      Evidently, `gstreamer-plugins-bad` had an ugly (pun!) time trying to uninstall itself or be replaced. Weird. I've never seen this problem in "all my years" of Ubuntu administration, which is probably because people are working around the clock to make sure that I don't see issues like this. How can I fix this issue?


title: Is there a Linux utilities repository online accessible from a web browser?

text: Is there some place which has the collection of all the latest Linux utilities (something like filehippo.com for Windows utilities)? I know I can use various download utilities similar to **yum**, each of which would have their own repositories. I am wondering if there is any repository for Linux maintained anywhere that lets me download these utilities right from the browser?


title: IM client which can turn off notification in a specific conversation window?

text: So, the problem is that some chat buddies send chat lines a lot or too often. A typical example:               Chad McChaddy: Hi mate     Me: Hi     Chad: Could you take a look at problem XYZ? ABC is not working.     Me: K, checking...     Chad: It's actually working sometimes     Chad: But     Chad: sometimes it's not     Chad: For example     Chad: just now     Chad: Have you looked into it yet?     Chad: ping     (and so on)      I don't want to be cruel and block my buddy outright. I just need a little button or command that can turn off notification on the chat window so further messages from Chad don't cause a notification (blinking icon, sound, whatever) and distract me. For some reason, I don't see this feature in Kopete or Pidgin or Empathy.


title: Better help for bash?

text: I needed to know syntax for `for` loop in bash in a certain range of numbers. I typed `help for` but it didn't have this information. Then I learnt from some online article that the syntax is `for i in {1..N}`. Is there a commandline help tool for bash that includes complete information about its usage?


title: How to truncate the second column from a dot (.)?

text: INPUT:               10.175.192.16   vgxyxgf.de.foo.net  asdf    34efg     10.175.192.17   sdtds.de.foo.net    xyyxv   e5432     10.175.243.20   asdfycfb.us.foo.net dfvasf  34525      OUTPUT:               10.175.192.16   vgxyxgf     10.175.192.17   sdtds     10.175.243.20   asdfycfb      How can I make the OUTPUT? Like "awk '{SOMEMAGIC}' foo.txt So I have the "INPUT" and I need a /etc/hosts file style OUTPUT... :\


title: Back up particular package and its dependencies

text: My question is: can we take a backup of a particular package and its dependencies? For example, if we install VLC it requires dependencies like kde filesystem,libcaca.so.0 etc.. can we take a backup of VLC and its dependencies? I'm using Fedora15


title: How do I start the fan manually in Linux?

text: My fan doesn't run in Linux. I'm worried that the laptop might turn off if the temperature gets critically high. I ran the following command:               dmesg | grep -I fan      This gave me:               ACPI: Fan [FAN0] (off)     ACPI: Fan [FAN1] (off)      The directory `/proc/acpi/fan` doesn't exist. What can I do to get my fan working?


title: Figuring out installed packages on Ubuntu from filesystem backup

text: I have a full filesystem backup from my Ubuntu box, and my OS disk crashed. Is there a way to list all installed packages (like `dpkg -l` does but) from the backup? The logfiles are not an option as those aren't complete and they list installs, partial installs, and uninstalls etc.


title: Is there a way to increase `find` speed

text: I am wondering is there a way to increase `find` speed in terminal, it doesn't make sense that using internet google to search will have a better speed than doing a local search for strings or just file names. I am wondering is there a way to have a local indexing base, once built, in the future, the find command could be super fast. Or any other suggestions? Thanks!


title: Will SGE output slow down my simulation, if so, how much?

text: I am using clusters at my university's high performance computing center, they are using SGE system to do the job management. You might know that by default the SGE will output two files: `NAME.oXXXXX`, and `NAME.poXXXXX`. I want to know if this output will slow down my simulation. Usually my simulation would take a few weeks, and the `NAME.oXXXXX` file would grow very big, like several gigabytes, so I am kind of worrying such a big file will slow down my simulation. Does anybody have any experience, and if so how to turn it off. Actually I **do** need this output log to check my results occasionally. PS: the storage I am using now is not _afs_ , but _pscratch_ , so no use of `fsync`. Thanks a lot!


title: How to skip DNS checkup while I'm disconnected from Internet

text: I use RedHat machine. /etc/resolve.conf was set to nameserver 8.8.8.8 and it works well. I'm wondering how to connect my machine if it's disconnected from internet? It seems that if DNS of 8.8.8.8 is not available, I can't login. Am I right? How to set it up if I want to login anyway? This redHat is a virtual machine, resides on my laptop. I want to be able to login even-though the laptop is not connected to internet. Thank you!


title: Why doesn't 'find' show this file?

text: Using `find` with `grep`, one can locate files that match a pattern:               # find | grep error     ./solr-modifiedSolr4/SolrPhpClient/phpdocs/errors.html     ./error_log     ./includes/classes/error_log      However, using `find` alone the first file is not found:               # find . -name error*     ./error_log     ./includes/classes/error_log      Why doesn't `find` locate the `errors.html` file when not used with `grep`? How is `find` used to show this file as well?


title: I would like to send commands and requests from a client side app to a Linux server

text: So I am planning/designing an app running on Mac that will send commands and make data requests to a linux server. Some of the things I would need to do will be send file manipulation commands, zip files, send commands to a screen, and retrieve the output of a screen. Basically, it will be for administering a Minecraft server. My question is, is there an endpoint or service in Linux I can use to trigger shell scripts to do this? How can I read a stream from the screen? If none of this exists, what language is best? What protocol? I'm most familiar with HTTP but that might not be ideal here.


title: What do top's %MEM and VSZ mean?

text: I'm working on an embedded Linux system (128MB RAM) without any swap partition. Below is its top output:               Mem: 37824K used, 88564K free, 0K shrd, 0K buff, 23468K cached     CPU:   0% usr   0% sys   0% nic  60% idle   0% io  38% irq   0% sirq     Load average: 0.00 0.09 0.26 1/50 1081       PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND      1010     1 root     S     2464   2%   0   8% -/sbin/getty -L ttyS0 115200 vt10      1081  1079 root     R     2572   2%   0   1% top         5     2 root     RW<      0   0%   0   1% [events/0]      1074   994 root     S     7176   6%   0   0% sshd: root@ttyp0      1019     1 root     S    13760  11%   0   0% /SecuriWAN/mi       886     1 root     S     138m 112%   0   0% /usr/bin/rstpd 51234  <== 112% MEM?!?      1011   994 root     S     7176   6%   0   0% sshd: root@ttyp2       994     1 root     S     4616   4%   0   0% /usr/sbin/sshd      1067  1030 root     S     4572   4%   0   0% ssh passive       932     1 root     S     4056   3%   0   0% /sbin/ntpd -g -c /etc/ntp.conf      1021     1 root     S     4032   3%   0   0% /SecuriWAN/HwClockSetter       944     1 root     S     2680   2%   0   0% dbus-daemon --config-file=/etc/db      1030  1011 root     S     2572   2%   0   0% -sh      1079  1074 root     S     2572   2%   0   0% -sh         1     0 root     S     2460   2%   0   0% init       850     1 root     S     2460   2%   0   0% syslogd -m 0 -s 2000 -b 2 -O /var       860     1 root     S     2460   2%   0   0% klogd -c 6       963     1 root     S     2184   2%   0   0% /usr/bin/vsftpd /etc/vsftpd.conf         3     2 root     SW<      0   0%   0   0% [ksoftirqd/0]       823     2 root     SWN      0   0%   0   0% [jffs2_gcd_mtd6]      ps (which doesn't understand any options besides -w on busybox) shows:                 PID USER       VSZ STAT COMMAND         1 root      2460 S    init         2 root         0 SW<  [kthreadd]         3 root         0 SW<  [ksoftirqd/0]         4 root         0 SW<  [watchdog/0]         5 root         0 SW<  [events/0]         6 root         0 SW<  [khelper]        37 root         0 SW<  [kblockd/0]        90 root         0 SW   [pdflush]        91 root         0 SW   [pdflush]        92 root         0 SW<  [kswapd0]       137 root         0 SW<  [aio/0]       146 root         0 SW<  [nfsiod]       761 root         0 SW<  [mtdblockd]       819 root         0 SW<  [rpciod/0]       823 root         0 SWN  [jffs2_gcd_mtd6]       850 root      2460 S    syslogd -m 0 -s 2000 -b 2 -O /var/log/syslog       860 root      2460 S    klogd -c 6       886 root      138m S    /usr/bin/rstpd 51234       945 root      2680 S    dbus-daemon --config-file=/etc/dbus-system.conf --for       964 root      2184 S    /usr/bin/vsftpd /etc/vsftpd.conf       984 root      4616 S    /usr/sbin/sshd       987 root       952 S    /sbin/udhcpd /ftp/dhcpd.conf      1002 root      4056 S    /sbin/ntpd -g -c /ftp/ntp.conf      1022 root      2464 S    -/sbin/getty -L ttyS0 115200 vt102      1023 root      7176 S    sshd: root@ttyp0      1028 root      2572 S    -sh      1030 root      2572 R    ps      When you look at process 886, you see that it uses 112% of the availble memory and has VSZ (virtual memory size) of 138MB. That doesn't make any sense to me. In the top man page it says: > %MEM -- Memory usage (RES) A task's currently used share of available > physical memory. How can this process consume more than 100% memory? And if it's such a memory hog, why are there still 88564K RAM free on the system?


title: UBI bad block management

text: Anyone know what happens when UBI uses up all its reserved PEBs that are reserved for bad block management? For example say I have a UBI volume that has 14 PEBs reserved               # ubinfo -d 1       ubi1     Volumes count:                           1     Logical eraseblock size:                 126976 bytes, 124.0 KiB     Total amount of logical eraseblocks:     1466 (186146816 bytes, 177.5 MiB)     Amount of available logical eraseblocks: 787 (99930112 bytes, 95.3 MiB)     Maximum count of volumes                 128     Count of bad physical eraseblocks:       0     Count of reserved physical eraseblocks:  14     Current maximum erase counter value:     9     Minimum input/output unit size:          2048 bytes     Character device major/minor:            249:0     Present volumes:                         0      What happens when UBI finds bad block number 15? Does it not allow the volumes to be used?


title: How to map ALT key in .vimrc?

text: In order to be able add blank lines without going into insertion mode, I'm trying to map `ALT-o` and `ALT-O` to `o<ESC>` and `o<ESC>` I've tried the following in my `.vimrc`               map <M-o> o<ESC>     map <M-O> O<ESC>      and               map <ALT-o> o<ESC>     map <ALT-O> O<ESC>      and (as suggested below)               map <A-o> o<ESC>     map <A-O> O<ESC>      but none work. It just gives the usual behavior, as if `ALT-o` had not been defined. This is my first time altering the `.vimrc` file, and I can't find where the documentation tells you how to designate the various keys. But I am able to verify that my `.vimrc` file is being read, by including:               map <Enter> ihello<ESC>      Which sucessfully maps `<Enter>` to inserting `hello` and returning to command mode. I'm using vim with cygwin.


title: Working of dup3

text: Hi while reading dup3 system call, i got that it will change only O_CLOEXEC flag of duplicated file desriptor. But when i have written below program for all the 3 outputs it printed the flag is either present or not and it is based on whether O_CLOEXEC is specified in original file descriptor when opening. What's wrong?. I really don't understand. Can anyone please help me.               #define _GNU_SOURCE     #include <stdio.h>     #include <stdlib.h>     #include <getopt.h>      #include <errno.h>     #include <fcntl.h>     #include <string.h>          #define TRUE 1     #define FALSE 0          void PrintUsage();     void PrintVersion();     void PrintStatusCloexec( int );     void dup3_code( const char * );          void main(int argc, char *argv[])     {         int hflag = FALSE, vflag = FALSE, nflag = FALSE, src_flag = FALSE;         char *src_file_name = NULL;          int src_len = 0;         char c;         int option_index;              struct option long_options[] = {                  { "version", no_argument, 0, 0},                 { "help", no_argument, 0, 0},                  { "src_file", required_argument, 0, 0},                 {0,0,0,0}             };                    while( ( c = getopt_long(argc, argv, "hvs:", long_options, &option_index) ) != -1 )         {             switch( c )             {                 case 'h':                     hflag = TRUE;                     break;                 case 'v':                     vflag = TRUE;                     break;                 case 's':                     src_flag = TRUE;                     src_len = strlen( optarg );                     src_file_name = (char *)calloc(1, src_len + 1);                     strncpy(src_file_name, optarg, src_len);                     break;                 case 0:                     switch(option_index)                     {                         case 0: vflag = TRUE;                             break;                          case 1: hflag = TRUE;                             break;                         case 2: src_flag = TRUE;                             src_file_name = (char *) calloc(1, strlen(optarg) + 1);                             strncpy(src_file_name, optarg, src_len);                             break;                         default: printf(" Invalid argument index : %d", option_index );                             exit(EXIT_FAILURE);                      }                     break;                      case '?':                     break;                 default:                     printf( " Invalid option %c", c);                     exit(EXIT_FAILURE);             }         }              if( vflag == FALSE && src_flag == FALSE )          {             PrintUsage();         }              if(hflag == TRUE)         {             PrintUsage();         }              if(vflag == TRUE )         {             PrintVersion();         }              if(src_flag == TRUE)         {             printf(" src file name : %s\n", src_file_name);             dup3_code( src_file_name );         }              exit(EXIT_SUCCESS);     }          void PrintUsage()     {         printf(" Usage : %s [-h] [-v] [-s|src_file file_name]\n" , __FILE__ );     }          void PrintVersion()     {         printf(" Version : 1.0\n");     }          void dup3_code( const char *file_name )     {         int fd = open( file_name, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );         if( fd == -1 )         {             printf(" Error opening file %s : %s\n", file_name, strerror(errno));             exit(EXIT_FAILURE);         }         printf( "After file is opened:\n");         PrintStatusCloexec( fd );              int new_fd = dup( fd );         printf( "After dup:\n" );         PrintStatusCloexec( new_fd );         close( new_fd );              new_fd = dup3( fd, new_fd, O_CLOEXEC );         printf( "After dup3:\n" );         PrintStatusCloexec( new_fd );         close( new_fd );              close( fd );     }          void PrintStatusCloexec( int fd )     {         int flags = fcntl( fd, F_GETFL );         if( flags & O_CLOEXEC )         {             printf( " close on exec flag for file id %d is set\n", fd );         }         else         {             printf( " close on exec flag for file id %d is not set\n", fd );         }          }      Also My GNU C library version :               GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu10) stable release version 2.15.


title: Grep lines but let the first line through

text: Consider the following output from `df`.               Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1        23G  6.1G   16G  29% /     udev             10M     0   10M   0% /dev     tmpfs           397M  420K  397M   1% /run     tmpfs           5.0M     0  5.0M   0% /run/lock     tmpfs           1.8G  904K  1.8G   1% /run/shm     /dev/sda6       890G  324G  521G  39% /home     /dev/sdb1       459G  267G  169G  62% /home/user/mnt     none            4.0K     0  4.0K   0% /sys/fs/cgroup      How can I only show lines that begin with `"/dev"` and keep the heading, but filter out everything else. I'd also like to not have to resort to using using temporary files or variables? Note: the heading is locale dependent, therefore you can't catch it with a regexp.


title: Checking files in a different folder using for loop

text: I have 2 folder - folder1 and folder2. Im in folder1 and need to execute a shellscript that will search for all the csv files in folder2.. The current script check *.csv in the current folder..how to point to folder2?               for file in *.csv     do       split -l 50000 -d -a 4  "$file" "$file"     done


title: Synchronize KMail and KOrganizer with my Google data

text: Is there a way to synchronize KMail and KOrganizer with my Google data?


title: Count number of characters per listed filename

text: Given the following ls result:               $ ls     Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos      This will give the total number of characters for all files:               $ ls | wc -m     67      But how can I have calculate the number of characters per file name? For the same file list the result I'm after would be something like this:               8     10     10     6     etc...


title: Linux Mint 16 - VLC won't play bluray with aacs

text: Running Linux Mint 16 Petra with Cinnamon, nothing fancy. I just can't seem to get my AACS BD-ROMs to play whatsoever. I have libaacs, libbluray1, and I retrieved the AACS key database like the Arch Wiki suggested (https://wiki.archlinux.org/index.php/BluRay) Currently Installed:               libaacs0:amd64 0.6.0-2      libbluray-bdj 1:0.5.0-2~ppa1     libbluray1:amd64 1:0.5.0-2~ppa1     libvlc5 2.0.8-1     libvlccore5 2.0.8-1     libvlccore7 2.1.2-2~ppa2     vlc 2.0.8-1     vlc-data 2.0.8-1     vlc-nox 2.0.8-1      Here's a full verbose dump from VLC: http://pastebin.com/pA7f8QQr Any ideas?


title: What does adduser do that useradd doesn't?

text: In addition to the more widespread `useradd`, Debian based systems also contain an additional `adduser` command which provides a higher level interface for adding users and some related tasks. There are various questions/answers on other SE sites which detail the basic differences between these commands, for example:   * ServerFault - What's the difference between 'useradd' and 'adduser'?   * Superuser - What's the difference between “adduser” and “useradd”?   * Ask Ubuntu - What is the difference between adduser and useradd? Most of the answers essentially say that `adduser` provides nicer interface for adding users interactively, but don't give much detail on what happens when `adduser` is run that doesn't compared to `useradd`. So:   1. What does `adduser` do that `useradd` doesn't?   2. What commands do I need to use to produce equivalent results?


title: Fluxbox shortcut to open an xterm, or switch to an existing one

text: Is it possible using fluxbox to setup up a shortkey to say `winkey`+`r` that opens up a terminal (say `xterm` or whatever) with these properties:   1. If there is already a terminal that the working directory is = ~ and it is not currently running a command (i.e. its at the prompt) then show that one.    2. Or if not create a new terminal


title: How to integrate mv command after find command?

text: Given a scenario I was searching for file name which contain `AAA` withing it on a path using following command:               find path_A -name "*AAA*"      Given the output shows from the above command, I want to move those files into another path, say `path_B`. Instead of moving those file one by one, I'm just curious whether I can optimize the command by moving those files right after the find command?


title: How to check that perf events are enabled in Linux kernel, and how to install perf userland as non-root?

text: From what I have checked it looks like kernel side of 'perf' subsystem is enabled on computer I work on. Checking kernel configuration shows the following               $ zgrep "_PERF[_= ]" /proc/config.gz      CONFIG_HAVE_PERF_EVENTS=y     CONFIG_PERF_EVENTS=y     # CONFIG_PERF_COUNTERS is not set     CONFIG_HAVE_PERF_EVENTS_NMI=y      I also did the check described in perf_events FAQ:               $ cat /proc/sys/kernel/perf_event_paranoid     1      But the **`perf` tool** is not installed:               $ perf     -bash: perf: command not found     $ /sbin/perf     -bash: /sbin/perf: No such file or directory     $ /usr/sbin/perf     -bash: /usr/sbin/perf: No such file or directory      Is it possible to install perf userland as an ordinary user, to one's own home directory (for '2.6.36-gentoo-r4' kernel)? Or do I need to ask administrator of machine in question to install it? More unfortunately `dev-util/perf` package on Gentoo is masked (blocked) on amd64:               $ emerge --search perf     [...]     *  dev-util/perf [ Masked ]           Latest version available: 2.6.35_rc4           Latest version installed: [ Not Installed ]           Size of files: 73,503 kB           Homepage:      http://perf.wiki.kernel.org/           Description:   Userland tools for Linux Performance Counters           License:       GPL-2


title: enf of file unexpected (excepting "f$ing "fi")

text: os: pfSense (nanobsd)     shell: csh      script:               /etc/rc.conf_mount_rw     mount -t msdosfs /dev/da0s1 /mnt/usb          if ( -s /var/squid/log/access.log ) then         cat /var/squid/log/access.log | perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e' > /mnt/usb/access_`date +%Y-%m-%d-%H-%M`.log         echo "Log wurde gespeichert"     else         echo "Logfile ist leer, kein Logfile geschrieben"     endif          /etc/rc.conf_mount_ro      Throws following error:               /scripts/copy-script.sh: 14: Syntax error: end of file unexpected (expecting "f$ing "fi")      Any Suggestions?


title: vim editing/switching between multiple files efficiently in large directory structures

text: I am by no means a vim power user, I am just beginning to grasp the advanced motions and commands with vim. But there's one drawback that I can't seem to get around. I grew up with graphical programs for writing code, but I've just recently started using vim over ssh & screen to work on fairly large projects with many folders. I'm curious what the vim masters do to work with multiple files quickly and easily. Consider a rails app as an example. Say you want to edit a controller so you run.               vim app/controllers/controller.rb      But then you quickly want to change to editing a view or a db migration, my first instinct is to `:wq`, return to bash to navigate to that directory and start vim again in a brand new buffer. This is obviously flat out wrong. I've learned about several things like:   * The clientserver (but I don't want to use X over ssh and this seems like the only way)   * `:e` to open another file by browsing, but I can't seem to do it very quickly. Tab complete really trips me up.   * Opening an entire directory and searching through the buffers.   * NERDTree is promising, but I really want to stay away from any graphical representation to keep forcing me to master command line navigation I apologize for being naive, but I really want to learn the correct way to go about it even if it's heavily subjective. What are your methods, and what would you recommend?


title: Partition USB to raw partition

text: I'm now running Window 7 and I want to install Manjaro Linux on the other disk on my computer. In the installation guide, the author said:                Should your attempt to write to a USB stick still be unsuccessful,       then use a partition tool to format it as a RAW partition type,       use ImageWriter again.      So my question is: How can I format my USB from FAT32 to raw and which software should I use?


title: Installing Gentoo packages as an ordinary user (non-root)

text: Is it possible to install Gentoo packages (ebuild-enabled programs, programs with support for portage) as an ordinary user (non-root) to one's own home directory (`\--prefix=$HOME` or sth. like that)?


title: Help in setting up internal Bluetooth card on Linux 2.6.38

text: I have a laptop that has a Bluetooth card in it, a Gateway NV series one. I'm trying to get it to turn on, as it currently isn't. The first time I booted after I wiped my drive and installed Linux Mint 11 from scratch, I saw the bluetooth light come on for the first time ever. However, it wasn't working, and after a reboot, it's no longer on. Running `hcitool dev` only lists my USB dongle, or nothing if the dongle isn't plugged in. I've heard that there are kernel-level things I can do to fix this, where should I look for that? Is there a way for me to at least determine what kind of Bluetooth card I have in here so I can work on getting it working? `lsusb` doesn't give me anything relevant to Bluetooth:               Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 002 Device 002: ID 04f2:b044 Chicony Electronics Co., Ltd Acer CrystalEye Webcam     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 010: ID 18d1:4e12 Google Inc. Nexus One Phone (Debug)     Bus 001 Device 009: ID 0bc2:3001 Seagate RSS LLC      Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 001 Device 004: ID 046d:c526 Logitech, Inc. Nano Receiver     Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      Nor does `lspci`:               00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)     00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)     00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)     00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)     00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)     00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)     00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)     00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)     00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)     00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)     00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)     00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)     02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)     04:00.0 Network controller: Intel Corporation WiFi Link 5100      One thing's for sure, the card at the very least _turned on_ the first time I booted, and something changed, preventing it from coming on. How can I determine what kind of card I have and how to enable it?


title: Will I be able to use old fashion interface in Gnome 3?

text: If i wish to use old-style interface (like Gnome 2 with global-menu and awn) in Gnome 3, will it be much of customizing and pain, or is just possible with a few clicks?


title: How to find memory per core on multicore CPU?

text: This is required information for some MPI using app that I am working with... From its Makefile _template_ :               #insert memory per core and uncomment the following line     #PREPROC= -D'MB_PER_CORE=750'      Note that said scientific app runs also on NUMA machines, like Cray, where each core has its own memory. I am asking here what to put in above line on **_Linux_** on e.g. 12GB machine with 16 cores.


title: DNS Troubleshoot.  Campus domain does not resolve when using campus network

text: I am having a very odd DNS issue. I live on-campus and the university provides Internet access with my rent, but I can not get access to the university websites. I am hoping to get direction on how to diagnosis my specific DNS issue as described below. Thanks a ton! I have an OpenWRT base router/firewall - 10.3.1-rc4 that works just grand. I have no issues what so ever, except when I use the campus network, I can no resolve the university's domain. I have verified that OpenWRT is using the campus name servers:               root@tdwrt:~# cat /tmp/resolv.conf.auto          nameserver 10.35.60.8         nameserver 10.25.60.2         search resnet.uwyo.edu         root@tdwrt:~# wget http://google.com         Connecting to google.com (209.85.225.105:80)         Connecting to www.google.com (209.85.225.147:80)         index.html           100% |**************************************************************|  8746  --:--:-- ETA         root@tdwrt:~# wget http://uwyo.edu           wget: bad address 'uwyo.edu'         root@tdwrt:~# ping -c5 uwyo.edu         ping: bad address 'uwyo.edu'         root@tdwrt:~#       I signed up for 3rd party ISP for two months and when using the cable co as my ISP, I can resolve the university site just fine. But why pay $40 per mo, when it is suppose to be included in my rent?! I have also re-flashed the device to get rid of any potential malformed configs. I run "tcpdump -n -i br-lan | grep .53 | grep domain.com" and then try to access the domain, but I do not get any output. When I run the same (with different interface) on my workstation, it shows the router being queried for address.               05:01:12.516403 IP 192.168.1.5.59064 > 192.168.1.1.53: 64580+ AAAA? uwyo.edu. (26)     05:01:12.521326 IP 192.168.1.5.57653 > 192.168.1.1.53: 31772+ AAAA? uwyo.edu. (26)     05:01:12.528271 IP 192.168.1.5.41321 > 192.168.1.1.53: 17466+ A? uwyo.edu. (26)     05:01:12.537111 IP 192.168.1.5.47016 > 192.168.1.1.53: 50397+ A? uwyo.edu. (26)      I started a trouble ticket back in May 2009 and updated it through out the summer. I can not get the university support to touch it. Its easy to think its a problem with my router, but I say it is not so easy since EVERY other domain is just fine and even uwyo.edu works just fine when using 3rd party ISP. The problem seems to be a combo of how UW does there stuff and OpenWRT..


title: Add a one-off scheduled task through a shell script?

text: I'd like to execute a task at a given time, once. I know I can just use crontab -e to add it there, but I'd like to do that through a shellscript. `crontab -e` gives me some temporary file to edit which is unpredictable. Also, once the task executes I'd like to remove it from the crontab again to make sure it'd not leaving behind mess. So is there a standardized way to add/remove entries from my personal crontab through a script? I know I could roll my own system: Have a script that executes every minute that executes and deletes .sh files from a folder and have my "addtask" script create .sh files in that folder, but before rolling my own I wonder if there is something already. If it matters, I use Mac OS X and zsh but I wanted to use something that works on other *nixes as well.


title: Is there a way to move by screen lines in vim?

text: When editing files in vim, it is a small annoyance that when I move lines with j and k, it moves by file lines, rather than screen lines like other editors. With my own files, I can deal with this by automatically wrapping to a certain length in the vim options, but this is no good for files from others. Is there a vim command to either temporarily toggle the treatment of lines to screen lines, or alternate commands for moving that use screen lines?


title: SED Showing CRLF While Vim Not Showing

text: Why `sed l\;q` shows a CRLF while opening the file in Vim with `:set list` doesn't show any CRLF


title: Why aren't CD image files listed when mounted in current directory?

text: When mounting a disk image in the current directory using :               sudo mount -o loop -t iso9660 wall.iso ./      Listing files in current directory only returns wall.iso .   To view the actual files on the disk image I must first `cd` out of the directory then back in it. _Note : if I already knew wall.iso countainted a directory called **subdir** , even tough `ls` didn't list the directory I could already `cd subdir`._ Why doesn't `ls` return the files when I first call it? Does `ls` read from a cache which is only updated when changing directory?