title: Lowering kernel timer interrupt frequency

text: When I run my Virtual Machine with Gentoo as guest, I have found that there is considerable overhead coming from tick_periodic function.( this is the function which runs on every timer interrupt).This function updates a global jiffy using write_seqlocks which leads to the overhead. Here's a grep of HZ and relevant stuff in my config file.               sharan013@sitmac4:~$ cat /boot/config | egrep 'HZ|TIME'     # CONFIG_RCU_FAST_NO_HZ is not set     CONFIG_NO_HZ=y     # CONFIG_HZ_100 is not set     # CONFIG_HZ_250 is not set     # CONFIG_HZ_300 is not set     CONFIG_HZ_1000=y     CONFIG_HZ=1000     # CONFIG_MACHZ_WDT is not set     CONFIG_TIMERFD=y     CONFIG_HIGH_RES_TIMERS=y     CONFIG_X86_CYCLONE_TIMER=y     CONFIG_HPET_TIMER=y      Clearly it has set the configuration to 1000, but when I do `sysconf(_SC_CLK_TCK)` I get 100 as my timer frequency.So what is my systems timer frequency? What I want to do is to bring the frequency down to 100,even lower if possible.Although it might effect the interactivity and precision of poll/select and schedulers time slice, I am ready to sacrifice these things for lesser timer interrupt as it will speed up VM.   when I tried to find out what has to be done I read in some place that you can do so by changing in the configuration file, else where I read that adding divider=10 to the boot parameter does the job , else where I read that none of it is needed if you can set the `(CONFIG_HIGH_RES_TIMERS)` to acheive low- latency timers even without increasing the timer frequency and the same is possible with a tickless system `CONFIG_NO_HZ`.   I am extermely confused about what is the right approach.   All I want is to bring down the timer interrupt to as low as possible.   Can I know the right way of doing this ? Thanks, Sharan


title: How to change yum's default downloader

text: By default `yum` uses `curl` to download packages from internet repositories. I want use `axel` instead of `curl` to download packages: is it possible?


title: Why doesn't this xargs command work?

text: I wanted to delete all .sh extensions so did this:               ls *.sh | xargs -I {} mv {} `basename {} .sh`      However it doesn't work, it behaves like `basename` returns unchanged file name. Why is it behaving that way ? For instance, this works:               ls *.sh | xargs -I {} echo `basename {}.jpg .jpg`;      **EDIT** : Solution: single quote prevents ``basename ...`` evaluation by the shell before the command is run.               ls *.sh | xargs -I {}  sh -c 'mv {} `basename {} .sh`'


title: What are the benefits of using several IP addresses on a server?

text: With `ifconfig`, I am able to configure multiple IP addresses on a single network interface card. Why would I want to do that and how would I later utilize several addresses, e.g. how does software know which one to use? I have only used network interfaces with a single IP address so far.


title: How do I install swell-foop-3.11.1.tar.gz in Linux Mint Petra?

text: How do I install `swell-foop-3.11.1.tar.gz` in Linux Mint Petra?   I tried to install it with software manager but the game does not seem to work, so I downloaded `swell-foop-3.11.1.tar.gz` and extracted it, but I don't know how to install it.   Do I use terminal? If so how?


title: How to merge a Windows 8 install with a Linux Mint, two different disks, same computer

text: I have a Windows 8 on a disk drive I removed, then installed Linux Mint on a new disk drive. I would like to place the Windows 8 back as dual boot... is this possible? The problem was, I could never get my Windows 8 on the new, larger/faster disk so I basically said F*&% Windows 8 after ruining another of my weekends and loaded the Mint. I can live with Mint, but I miss a few things in Windows, Photoshop and Flash Pro (for it's new convert to JavaScript tools). Another option I thought of,but scared to even try due to time constraints, can you mirror this Windows install to a VM and run out of Linux.. easily or at least with work, reliably? This is, mirror the existing and not install new, because my 8 is an upgrade and now they will not let me transfer key to new install.


title: Bash globbing: how to express "something-*.txt except *-foobar.txt" as glob?

text: On the command line, can I express easily in terms of shell globs that I would like to catch all files `something-*.txt`, except for `something-*-foobar.txt`? If I can, how? NB: I know how to achieve the same with `grep -v` or other combinations of multiple commands. The question is solely about whether (and if so how) to achieve this with shell globs.


title: Using text from previous commands' output

text: I know this is not how terminals work, but I find myself often wishing there was an easy way of using text (copying it, modifying it, etc) that is already on my terminal window history from some previous command output. I've imagined it like this: I'm at my bash shell about to enter a command and I realize I need to type something that is already on the screen a few lines above. I can reach for the mouse and select it, but I hate that. What I really wish at this moment is that my whole terminal became a giant Vim buffer, all of it: the prompts, the commands I've typed, and the output from those commands. Everything. And then I could jump a few lines up, maybe edit a little, and yank some text. Then, return to bash shell mode and paste whatever I yanked into the current command line. I know there are some options:   * Naturally, pipe the text I need directly from some command's output to a file, or right to the next command. But for that you have to plan in advance or re-execute the command from your history (supposing the output won't change between invocations).   * To reach for the mouse and select the text to copy. Lame, annoying, I wish I hadn't to do that, (this isn't the GUI stackexchange site, is it? =)   * To use my (Mac OS X) Terminal application's "Export text as..." option, and save the terminal text to a file. Then open the file and work with it. Almost, but why go through the step of saving to a file on disk? So the question is: What do you do in this situation? Is there any trick, tool, shell feature that could be useful in this scenario? Do you just resign yourself to use the mouse or re-type whatever you need to type? It might be that the problem is that I'm not doing things 'the unix way', but c'mon, this is 2010 and I cannot easily copy some text a few lines away from my cursor?


title: How to move all files with a certain file extension from subdirectories to a single directory

text: I have a directory that contains many subdirectories. The subdirectories contain lots of types of files with different file extensions. I want to move (not copy) all the files of one type into a new directory. I need all these files to be in the same directory, i.e. it needs to be flat. (My use case is that I want to move ebooks called *.epub from many directories into a single folder that an EPUB reader can find.)


title: clear gnu screen window name

text: I'm using screen with a hardstatus listing my open windows, I usually have a few named (mail, im, top, etc.) and a few with blank name. Some program changes the current window name, for my named window that's not a problem: Ctrl+a, A: allow me to change back the name. but the same command does not want an empty string as the name and keep the current name in that case. So, how can I set an empty name to screen window? A single space does not count.


title: update line based on previous line

text: I have a issue since I'm not familiar with awk. I have csv file generated from sar -d output converted to csv style:               12:33:41        unix,restarts     12:35:00,lofi4096,0,0.0,0,0,0.0,0.0     ,iscsi0,0,0.0,0,0,0.0,0.0     ,scsi_vhc,0,0.0,0,0,0.0,0.0     ,nfs1,0,0.0,0,0,0.0,0.0          12:45:00,lofi4096,0,0.0,0,0,0.0,0.0     ,iscsi0,0,0.0,0,0,0.0,0.0     ,scsi_vhc,0,0.0,0,0,0.0,0.0     ,nfs1,0,0.0,0,0,0.0,0.0      and I want to convert to this               12:33:41        unix,restarts     12:35:00,lofi4096,0,0.0,0,0,0.0,0.0     12:35:00,iscsi0,0,0.0,0,0,0.0,0.0     12:35:00,scsi_vhc,0,0.0,0,0,0.0,0.0     12:35:00,nfs1,0,0.0,0,0,0.0,0.0          12:45:00,lofi4096,0,0.0,0,0,0.0,0.0     12:45:00,iscsi0,0,0.0,0,0,0.0,0.0     12:45:00,scsi_vhc,0,0.0,0,0,0.0,0.0     12:45:00,nfs1,0,0.0,0,0,0.0,0.0      My attempt but since awk reads line by line I don't know out to keep the previous line value. I would expect that what I have should work. Any idea how I can obtain my desired result. I tried with awk, but I guess this should be possible with sed or the hard way with a custom shell script ( I'm trying to avoid doing this part ).               #!/usr/bin/awk -f     BEGIN {             FS=",";     }     {             print $1             if ($1 != "") {                     mydate=$1;                     print $0;             }             else {                     print $mydate","$0;             }     }      Running the system with Solaris 11.1.


title: Repeating a text-output terminal command, in a scrollable ncurses-like interface?

text: `man ps` says: > If you want a repetitive update of the selection and the displayed > information, use top(1) instead. ... however, in some cases, I don't like the output of `top` - I would instead like to have the output exactly the same as `ps axf`:               $ ps axf       PID TTY      STAT   TIME COMMAND         2 ?        S      0:00 [kthreadd]         3 ?        S      0:06  \_ [ksoftirqd/0]         6 ?        S      0:00  \_ [migration/0]        11 ?        S<     0:00  \_ [cpuset]        12 ?        S<     0:00  \_ [khelper]        13 ?        S<     0:00  \_ [netns]        15 ?        S      0:00  \_ [sync_supers]        16 ?        S      0:00  \_ [bdi-default]        17 ?        S<     0:00  \_ [kintegrityd]        18 ?        S<     0:00  \_ [kblockd]        19 ?        S<     0:00  \_ [kacpid]        20 ?        S<     0:00  \_ [kacpi_notify]        21 ?        S<     0:00  \_ [kacpi_hotplug]        22 ?        S<     0:00  \_ [ata_sff]        23 ?        S      0:00  \_ [khubd]        24 ?        S<     0:00  \_ [md]        26 ?        S      0:00  \_ [khungtaskd]        27 ?        S      0:01  \_ [kswapd0]        28 ?        SN     0:00  \_ [ksmd]        29 ?        S      0:00  \_ [fsnotify_mark]        30 ?        S<     0:00  \_ [aio]        31 ?        S      0:00  \_ [ecryptfs-kthrea]        32 ?        S<     0:00  \_ [crypto]        36 ?        S<     0:00  \_ [kthrotld]        38 ?        S      0:00  \_ [scsi_eh_0]        39 ?        S      0:00  \_ [scsi_eh_1]        40 ?        S<     0:00  \_ [kmpathd]     ...      Now, running `ps axf` repeatedly is not a problem (plenty of suggestions on Repeat a Unix command every x seconds forever - Unix & Linux Stack Exchange); however, as the above snippet shows, its output can be quite larger than the size of a terminal window. So I was wondering - is there a program which can run a command repeatedly, and collect its output, and display it in something like an `ncurses` window? I'd ideally like to set `ps axf` to refresh at half a second - and I'd like to have scrolling (given that the output will overflow terminal window bounds), however, such that if the text display starts vertically from, say, line 6 on top, it stays at that position - even if the latest output of the command has more (or less) lines of text in it than the previous one. I hoped `screen` may do something like this, but then, I don't think it implements any scrolling behavior... Is there a program out there that does something like this?


title: Arch wifi keeps dropping

text: I recently installed Arch, wifi has been messing around. Dropping and generally not connecting. I fixed it by ruling it was DHCP not getting a lease in time, I assigned a static IP and all is good. But for some reason every now and again I can't visit certain sites and domains(.net,.com) etc... If I use netctl to stop the profile then set my interface to down then restart prfile it works for a while again. I have no idea where to look for this. My /etc/resolv.conf has 4 nameservers (googles, and open dns) so they're good. Any idea where to look next?


title: delete user from group in fedora from command line

text: I have been using ubuntu extensively and use the following from the command line:               deluser <username> <groupname>      It doesn't seem to work in fedora. Is there an equivalent?


title: bash - can I do : find .... -exec this && that?

text: Is there a way to logically combine two shell commands that are invoked with **find - exec**? For instance to print out all the **.csv** files that contain the string foo together with its occurrence I would like to do:               find . -iname \*.csv -exec grep foo {} && echo {} \;      but **bash** complains with "missing argument to '-exec' "


title: Installing flash player for Firefox

text: I would like to install Flash player for Firefox on Linux. I downloaded the `.tar.gz`, and there are some compiled shared libraries. I am not sure how to make them work, and I am looking for a hint. I tried to change `LD_LIBRARY_PATH` to point to the folder where those libraries are, but I had no luck. Any suggestions?


title: Creating a variable with sed in ksh

text: I'm using Ksh88 on a Solaris 10 machine. If I do the following:               foo="one two three"     for i in $foo; do         echo $i;     done      The script executes as expected:               $ ./script.ksh     one     two     three      However if I replace the loop with this:               foo="one two three"     for i in $(sed -e 's/bar/$foo/' <(echo $1));     do         echo $i     done      I execute it and this is what I get:               $ ./script.ksh bar     $foo      How can I make `for` expand the result of the `sed` command into a variable?


title: terminal emulator which auto closes after execution but stays open if there was an error during execution

text: I have a automatic build script it uses a makefile which starts different ant scripts depending on the target I start it using xterm (I have a shortcut on the desktop) It works fine but if I want to check if the execution was successful I cant close the terminal automatically Is there a terminal emulator which wont auto close if there was an error during execution ?


title: Sed find/delete for a string with multiple special characters recursively

text: I'm having quite a bit of difficulty with a complex string. A friend's site was hacked and has since been locked down but I'm helping to clean up the mess leftover and what I need to do is the following: Go recursively into every directory and if there is the following string at the end of the file, delete the string.               ;document.write('<iframe src="http://efficienttrue.ru/upwherehandpainted.cgi?8" scrolling="auto" frameborder="no" align="center" height="13" width="13"></iframe>');      As you can see the string contains single and double quotes, and multiple other special characters. I've tried putting an \ escape before every single special character but that doesn't seem to work. I tried this:               grep -rl efficienttrue.ru . | xargs sed -i "s/\;document\.write\(\'\<iframe\ src\=\"http\:\/\/efficienttrue\.ru\/upwherehandpainted\.cgi\?8\"\ scrolling\=\"auto\"\ frameborder\=\"no\"\ align\=\"center\"\ height\=\"13\"\ width\=\"13\"\>\<\/iframe\>\'\)\;/\/g"      but I get the following error:               sed: -e expression #1, char 201: unterminated `s' command


title: inserting a token while parsing a file - bash

text: I have a file with this structure:               ma${token}jid-azimi-865131021     javad-ya${token}rip-865132012      and here is my program:               IFS="-"          token="12345678"          cat input.txt | while read col1 col2 col3; do         echo ${col1}         echo ${col2}         echo ${col3}         echo "********************************"     done       I want to insert `${token}` while reading file. because token is a dynamic word and I can not change it inside the file every time. So I add `${token}` to the file once. But the output of program is:               ma${token}jid     azimi     865131021     ********************************     javad     ya${token}rip     865132012     ********************************      Why this is happening? `ma${token}jid` should be expand like this: `echo ma${token}jid`, then `12345678` should be inserted.


title: Can emacs use gpg-agent in a terminal at all?

text: I understand that there are problems with getting `pinentry-curses` to work with emacs (see some of the comments on http://emacswiki.org/emacs/EasyPG), and so using emacs in a terminal isn't compatible with gpg-agent because of this. I can't use a graphical pinentry tool in this case as this is over an ssh connection to a remote machine. However, is it possible to feed the gpg-agent the passphrase beforehand and then have emacs use this, but not to prompt for a passphrase if the agent doesn't already have this info? What settings would allow this to work with `notmuch.el` and `EasyPG`? Or, are there alternative methods of caching the passphrase which would achieve the same effect, but may have security problems (which is the reason gpg-agent exists in the first place)?


title: Typical use case for a group password

text: I checked more than half a century worth Unix experience and neither my colleagues, nor myself has ever set a password on a group (`sg` and `gpasswd`). What would be a typical use case for a group password or is it pretty much only there because of historic reasons?


title: `(kill-line 0)` kills physical line even with global-visual-line-mode in Emacs

text: I define `backward-kill-line` like this.               (defun backward-kill-line ()       (interactive)       (kill-line 0))      And I'm using `global-visual-line-mode`. `kill-line` kills visual line, but this `backward-kill-line` kills physical line. How can I change `backward-kill-line` that kills only visual line?


title: How to stop cursor from blinking

text: How do I make the cursor stop `blinking` when in a **TTY**? (or anywhere else). **BONUS Points** for one universal setting that stops the cursor blinking almost everywhere.


title: Bacula + bat on Ubuntu Maverick

text: Okay, so I have a goal, and I'm unsure of the best steps to take to get there. **Goal:**   * Set up a Linux VM in VirtualBox (Host: Windows Server 2008 R2)   * Setup Bacula in a Linux environment   * Get Bacula to backup to a NAS device (preferably a Drobo as it's less expensive for us than other NAS solutions appear to be and we don't have time to build something like FreeNAS / ZFS) **Steps taken so far:**   * Created VirtualBox VM of Ubuntu Server (Maverick) as the guest   * Installed KDE on Ubuntu   * Updated packages, etc.   * Installed Bacula -- no configuration, etc. **Steps that need to be taken, to my knowledge:**   * Install and run Bacula Administration Tool (bat)   * Configure Bacula (either via bat or .conf files) -- backup to USB external HDD (to test backups, schedules, clients, etc.)   * Re-configure Bacula storage daemon to backup to a network-attached Drobo device (i.e. Drobo FS) **Questions so far:**   * I see the following errors in the terminal and the bat tool when it starts -- why? Terminal output:               Error: "/var/tmp/kdecache-sean" is owned by uid 1000 instead of uid 0.     (1893) KSharedDataCache::Private::mapSharedMemory: Opening cache "/var/tmp/kdecache-sean/icon-cache.kcache" page size is 4096     (1893) KSharedDataCache::Private::mapSharedMemory: Attached to cache, determining if it must be initialized     (1893) KSharedDataCache::Private::mapSharedMemory: Cache fully initialized -- attached to memory mapping     (1893) KSharedDataCache::Private::mapSharedMemory: 7323648 bytes available out of 10485760     QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory     QFileSystemWatcher: failed to add paths: /home/sean/.config/ibus/bus     Bus::open: Can not get ibus-daemon's address.      IBusInputContext::createInputContext: no connection to ibus-daemon       And on the console I receive: "bat: ABORTING due to ERROR in console/console.cpp:155 Failed to connect to localhost-dir for populateLists" **First Troubleshooting Avenues** This seems to me like bacula-dir isn't started? No configuration has been done, and I certainly don't pretend to know how to start Bacula properly. I've tried consulting the documentation, to no avail for this particular implementation. Any help? Thanks!


title: version control for /etc under *BSD

text: What turnkey solutions exist to put `/etc` under version control, under various unices? Turnkey doesn't necessarily mean part of the base install, but the following features would be nice:   * hooks into VCS commands to manage metadata (ownership, permissions);   * integration with the package manager (run automatically before and after installations, handle upgrades intelligently);   * treat upstream file versions as a branch;   * a pre-filled ignore list;   * support for several underlying VCS (especially distributed ones). I use etckeeper under Debian and derivatives. It has all the above features except that it doesn't keep track of upstream versions. I would like to learn about alternatives, particularly on *BSD.


title: Can't uninstall vim

text: I've got a problem with vim deinstallation. I've done `sudo apt-get remove` on vim, vim-common, vim-tiny and actually anything starting with 'vim' in the package list, but still can run vim from command line. It doesn't show up in packages list but still works. I can't understand how it is even possible... How can I remove it completely?


title: How to echo in shell script without executing the result

text: I am using this code to print all open files in the specified changelist.               while read line; do         echo "$line"     done < `p4 opened -c $changelist`      However, the line also gets executed and I get following error:               ./do.sh: line 7: //perforce/a.js#24 - edit change 353 (text) by user1: No such file or directory      My required output is:               //perforce/a.js#24 - edit change 353 (text) by user1


title: How can I calculate the size of a directory?

text: How to know the size of a directory? Including subdirectories and files.


title: Line numbering in Vim

text: How do I enable line numbers to be displayed in Vim?


title: Sound Problems with pulseaudio

text: The overall question that my whole problem is kind of based on is regarding sound in linux. Should I be using alsa or pulse or what? I'm using pulse at the moment and this is my problem: I was in the midst of configuring awesome and playing some music at same time when I restarted awesome and found sound no long functioned. After debugging and frustration I restarted and sound still doesn't work. When run in super verbose mode pulseaudio gives much output (see bottom of post) but I think the key line is this:               D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success     D: module-udev-detect.c: /dev/snd/controlC0 is accessible: no     D: module-udev-detect.c: /dev/snd/controlC29 is accessible: no      Any guesses? * * * Full log:               rob@lennyubuntu:~$ pulseaudio -vvvv     I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted     I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted     D: core-rtclock.c: Timer slack is set to 50 us.     D: core-util.c: RealtimeKit worked.     I: core-util.c: Successfully gained nice level -11.     I: main.c: This is PulseAudio 0.9.21-63-gd3efa-dirty     D: main.c: Compilation host: i486-pc-linux-gnu     D: main.c: Compilation CFLAGS: -g -O2 -g -Wall -O3 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option     D: main.c: Running on host: Linux i686 2.6.32-24-generic-pae #42-Ubuntu SMP Fri Aug 20 15:37:22 UTC 2010     D: main.c: Found 2 CPUs.     I: main.c: Page size is 4096 bytes     D: main.c: Compiled with Valgrind support: no     D: main.c: Running in valgrind mode: no     D: main.c: Running in VM: no     D: main.c: Optimized build: yes     D: main.c: All asserts enabled.     I: main.c: Machine ID is 37b1a2935e121fd776c640534c92c393.     I: main.c: Session ID is 37b1a2935e121fd776c640534c92c393-1284741785.538707-879649589.     I: main.c: Using runtime directory /home/rob/.pulse/37b1a2935e121fd776c640534c92c393-runtime.     I: main.c: Using state directory /home/rob/.pulse.     I: main.c: Using modules directory /usr/lib/pulse-0.9.21/modules.     I: main.c: Running in system mode: no     I: main.c: Fresh high-resolution timers available! Bon appetit!     I: cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1      I: svolume_mmx.c: Initialising MMX optimized functions.     I: remap_mmx.c: Initialising MMX optimized remappers.     I: svolume_sse.c: Initialising SSE2 optimized functions.     I: remap_sse.c: Initialising SSE2 optimized remappers.     I: sconv_sse.c: Initialising SSE2 optimized conversions.     D: memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496     D: database-tdb.c: Opened TDB database '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-device-volumes.tdb'     I: module-device-restore.c: Sucessfully opened database file '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-device-volumes'.     I: module.c: Loaded "module-device-restore" (index: #0; argument: "").     D: database-tdb.c: Opened TDB database '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-stream-volumes.tdb'     I: module-stream-restore.c: Sucessfully opened database file '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-stream-volumes'.     I: module.c: Loaded "module-stream-restore" (index: #1; argument: "").     D: database-tdb.c: Opened TDB database '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-card-database.tdb'     I: module-card-restore.c: Sucessfully opened database file '/home/rob/.pulse/37b1a2935e121fd776c640534c92c393-card-database'.     I: module.c: Loaded "module-card-restore" (index: #2; argument: "").     I: module.c: Loaded "module-augment-properties" (index: #3; argument: "").     D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success     D: module-udev-detect.c: /dev/snd/controlC0 is accessible: no     D: module-udev-detect.c: /dev/snd/controlC29 is accessible: no     I: module-udev-detect.c: Found 2 cards.     I: module.c: Loaded "module-udev-detect" (index: #4; argument: "").     D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-bluetooth-discover.so': failure     D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-esound-protocol-unix.so': success     I: module.c: Loaded "module-esound-protocol-unix" (index: #5; argument: "").     I: module.c: Loaded "module-native-protocol-unix" (index: #6; argument: "").     D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-gconf.so': failure     I: module-default-device-restore.c: Saved default sink 'auto_null' not existant, not restoring default sink setting.     I: module-default-device-restore.c: Saved default source 'auto_null.monitor' not existant, not restoring default source setting.     I: module.c: Loaded "module-default-device-restore" (index: #7; argument: "").     I: module.c: Loaded "module-rescue-streams" (index: #8; argument: "").     D: module-always-sink.c: Autoloading null-sink as no other sinks detected.     I: sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right     I: sink.c:     device.description = "Dummy Output"     I: sink.c:     device.class = "abstract"     I: sink.c:     device.icon_name = "audio-card"     D: core-subscribe.c: Dropped redundant event due to change event.     I: source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right     I: source.c:     device.description = "Monitor of Dummy Output"     I: source.c:     device.class = "monitor"     I: source.c:     device.icon_name = "audio-input-microphone"     D: module-null-sink.c: Thread starting up     I: module.c: Loaded "module-null-sink" (index: #9; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").     I: module.c: Loaded "module-always-sink" (index: #10; argument: "").     I: module.c: Loaded "module-intended-roles" (index: #11; argument: "").     D: module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.     I: module.c: Loaded "module-suspend-on-idle" (index: #12; argument: "").     D: dbus-util.c: Successfully connected to D-Bus system bus 37167102d347eef17e1632d54c939a90 as :1.19     I: client.c: Created 0 "ConsoleKit Session /org/freedesktop/ConsoleKit/Session1"     D: module-console-kit.c: Added new session /org/freedesktop/ConsoleKit/Session1     I: module.c: Loaded "module-console-kit" (index: #13; argument: "").     I: module.c: Loaded "module-position-event-sounds" (index: #14; argument: "").     D: dbus-util.c: Successfully connected to D-Bus session bus 72094675a23ec627dd2a6a7b4c939a9c as :1.8     D: main.c: Got org.pulseaudio.Server!     I: main.c: Daemon startup complete.     D: module-console-kit.c: dbus: interface=org.freedesktop.DBus, path=/org/freedesktop/DBus, member=NameAcquired


title: Prevent disk renumbering on reboot in OSX

text: I have 3 physical drives in my Mac Pro with OSX 10.6.4. Occasionally after rebooting the machine, the disk numbering changes such that the /dev/disk# does not reference the same drive as it did before the reboot. Example               /dev/disk0 -> 64GB SSD drive     /dev/disk1 -> 640GB Hitachi     /dev/disk2 -> 160GB WD (BootCamp)      After rebooting the mapping might be               /dev/disk0 -> 160GB WD (BootCamp)     /dev/disk1 -> 640GB Hitachi     /dev/disk2 -> 64GB SSD drive      Even more confusing is that the remapping is not consistent. For most stuff this is irrelevant. However I also have Parallels installed to allow access to the BootCamp partition from within OSX. Parallels uses the /dev/disk# path in it's configuration file so, after rebooting OSX I launch Parallels and it tells me that the disk is no longer present. Is there a way to tell OSX to always assign a given drive to /dev/disk0?


title: Easy way to use hardware mixing?

text: My sound card supports hardware mixing. What's the easiest way to use this feature (rather than on an app-by-app basis, hopefully)?


title: Error: iptables: No chain/target/match by that name

text: I am trying to configure proxy server on RHEL Server 6.5 using Squid and iptables. Below is the command I executed and the error message it displayed:               vzlptest01 root [root] > iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT     iptables: No chain/target/match by that name.      Some more details:               vzlptest01 root [root] > cat /proc/net/ip_tables_matches     limit     state     length     ttl     tcpmss     multiport     multiport     tos     tos     dscp     icmp     udplite     udp     tcp          vzlptest01 root [root] > cat /proc/net/ip_tables_targets     DNAT     SNAT     LOG     TOS     TOS     DSCP     TCPMSS     REJECT     ERROR      **Edit:**               vzlptest01 root [root] > iptables -S     -P INPUT ACCEPT     -P FORWARD ACCEPT     -P OUTPUT ACCEPT      How to deal with this issue?


title: Why is rewriting in htaccess not working on this server

text: I'm moving code from a server that served a single domain to one that serves multiple domains. I'm using named virtual hosts to handle the different domains. The url rewriting is not being executed   * I know that virtual hosts work on that server because the other domains work   * I know that this particular domain is working because when I hit pingtest.iguiders.com I see the index.html file I left in www/ping/. ('ping' is the dir that pingtest points to because, after my test works, the real domain, ping.iguiders.com will point here)   * I know that htaccess is generally working on this server because my other domains use it extensively.   * I initially copied pingtest.iguiders.com in /sites-available from another virtual host that uses htaccess and works. I just changed the server alias and the document root   * the virtual host definition does contain RewriteEngine On Here is the entire .htaccess file               RewriteEngine on          RewriteLog "/var/log/rewrite.log"     RewriteLogLevel 7          # Pings for ping server     RewriteRule ^0.02/ping/$ ping_functional.php [L,qsa]     RewriteRule ^0.03/ping/$ ping_functional.php [L,qsa]     RewriteRule ^0.04/ping/$ ping_functional.php [L,qsa]     RewriteRule ^0.05/ping/$ index.html [L,qsa]      But when I try pingtest.iguiders.com/0.05/ping/ I do not get the index.html file I expect (Nor do 0.02, 0.03, etc. work). I get a 404. I suspect that the .htaccess is not being accessed at all because I never see the rewrite log I defined. Anything obvious I screwed up?


title: Install libusb 1.0.9 on Arch Linux

text: I am not sure how to install libusb 1.0.9 on Arch Linux. pacman does not offer it and the package seems to have been deleted from the repository. I tried compiling from source but it does not seem to be picked up correctly.


title: How to fix Linux filename tab autocomplete that is appending a space instead of trailing slash on directories?

text: For some strange reason my filename autocomplete is behaving differently than normal. Given the following file structure `./foobar/file.txt`, if I want to delete `file.txt`, I type `rm foob<TAB><TAB>` and let the command line autocomplete the filename out to `rm foobar/file.txt`. But right now, after hitting the first `<TAB>` my command gets autocompleted to `rm foobar` (with a space after `foobar`). Is it possible that I accidentally changed it to this behavior? How can I change it back?


title: Which BSD to start with?

text: So I've been a linux user since June 2008. My first distro was Ubuntu. I've tried OpenSuSE, Fedora, Mandriva, Linux Mint, Puppy Linux, Damn Small Linux and Arch Linux, and I was thinking about giving BSD a try. Which BSD variant should I choose?


title: File delete versus overwrite and link at /proc/pid/fd

text: It is well known that UNIX systems won't actually delete a file on disk while the file is in use. So if a file is being accessed by process 1 and process 2 deletes the file using rm, process 1 continues to see the file; additionally the file descriptor link at /proc/(process 1 id)/fd reports the original contents of the deleted file. However, if process 2 overwrites the file as opposed to deleting it (say with echo "abracadabra" > file.txt), the file descriptor link at /proc/(process 1 id)/fd reports the overwriting material("abracadabra"), while process 1 is still able to access the original contents of the file. Why this difference? [Edit]The snippet below is in response to Jim Paris               >uname -a     Linux ravoori-netbook 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UT     C 2012 i686 i686 i386 GNU/Linux     >echo original > /tmp/foo     >tail -0f /tmp/foo &     [2] 6144     >rm /tmp/foo     >cat /proc/6144/fd/3     original     >echo abracadabra > /tmp/foo     >cat /proc/6144/fd/3     original


title: Why do top and ps show different PIDs for the same processes?

text: When I run `top -H`, I see that my multiple `mysql` threads all have the same PID. However, in `ps -eLf` I see each one has a different PID: `ps -eLf`               UID        PID  PPID   LWP  C NLWP STIME TTY          TIME CMD     mysql     1424     1  1424  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1481  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1482  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1483  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1484  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1485  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1486  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1487  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1488  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1489  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1490  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1791  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1792  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1793  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1794  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1809  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld     mysql     1424     1  1812  0   17 18:41 ?        00:00:00 /usr/sbin/mysqld      and in `top -H`               PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND      1424 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.08 mysqld                                                                        1481 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.16 mysqld                                                                        1482 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.33 mysqld                                                                        1483 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.16 mysqld                                                                        1484 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.23 mysqld                                                                        1485 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.27 mysqld                                                                        1486 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.15 mysqld                                                                        1487 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.18 mysqld                                                                        1488 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.16 mysqld                                                                        1489 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.16 mysqld                                                                        1490 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.34 mysqld                                                                        1791 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.26 mysqld                                                                        1792 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.54 mysqld                                                                        1793 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.00 mysqld                                                                        1794 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.00 mysqld                                                                        1809 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.00 mysqld                                                                        1812 mysql     20   0  539m  56m 7200 S   0.0  1.5   0:00.13 mysqld      What is going on and which one should I believe?


title: minicom and Xbee module - no feedback

text: I just bought an Xbee module and would like to set it up using "minicom". I first plugged the Xbee to the computer using a board that uses a FTDI chip to transform the UART interface that Xbee is using to USB interface. If I use command lsusb, I can see that FTDI chip is **device 005 on the USB bus number 003**.               Bus 003 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC      I opened minicom using "sudo minicom" and set up the " **Serial port setup** " like instructed in this thread. Now it looks like:               +-----------------------------------------------------------------------+     | A -    Serial Device      : /dev/bus/usb/003/005                      |     | B - Lockfile Location     : /var/run                                  |     | C -   Callin Program      :                                           |     | D -  Callout Program      :                                           |     | E -    Bps/Par/Bits       : 9600 8N1                                  |     | F - Hardware Flow Control : No                                        |     | G - Software Flow Control : No                                        |     |                                                                       |     |    Change which setting?                                              |     +-----------------------------------------------------------------------+      And " **Bps/Par/Bits** " is set up like:               +---------[Comm Parameters]----------+                          |                                    |                          |     Current:  9600 8N1             |                          | Speed            Parity      Data  |                          | A: <next>        L: None     S: 5  |                          | B: <prev>        M: Even     T: 6  |                          | C:   9600        N: Odd      U: 7  |                          | D:  38400        O: Mark     V: 8  |                          | E: 115200        P: Space          |                          |                                    |                          | Stopbits                           |                          | W: 1             Q: 8-N-1          |                          | X: 2             R: 7-E-1          |                          |                                    |                          |                                    |                          | Choice, or <Enter> to exit?        |                          +------------------------------------+        I saved the whole thing and closed minicom. Then I started minicum with a command "sudo minicom" and I got into the main screen where I tweaked the console to use local echo ("CTRL+A E") and to use linefeed ("CTRL+A A"). In the thread mentioned above. Author then preses three times + key and geta s response "OK". This doesn't work for me. Is my port set up ok? I mean the line:               A -    Serial Device      : /dev/bus/usb/003/005


title: How to run a command in the background with a delay?

text: Can somebody show me how to make a program to do this action: after 5 minutes               echo "80" > /sys/class/leds/blue/brightness      I want this program run in the background (like `rngd` service) I can't do this because I don't know so much about Linux.


title: Killing all the process of a command except first process

text: I am sometimes stuck in a situation where a script/command kept in Cron runs more than once because of some reasons (the first instance is not completed fully, the second instance of the same process starts) and at some point of time these processes increase a lot and show system hanging etc. So, what I want as a temporary solution here is to check if there are more than one instances of the script/command say,               ps -ef | pgrep -f 'DELETE OPERATION_CONTEXT'      or directly kill all the processes of this command               ps -ef | pkill -f 'DELETE OPERATION_CONTEXT'      But I want an idea how I can kill all the processes of pgrepped command except for the first process (this would let one of the process to keep working and all other duplicates to get killed).


title: How to setup squid simplest way for safe proxy?

text: I have installed `squid` on my remote linux box and added my desktop's IP as               acl lagrangian64 src XX.XX.XX.XX/32      in squid config. Also I have added `lagrangian64` to the following line:               http_access allow manager localhost lagrangian64      Was this enough and correct? I am getting and error while browsing any site with this proxy:               ERROR     The requested URL could not be retrieved     While trying to retrieve the URL: http://www.google.com/     ...     Access Denied     ...      How to allow myself to browse? What I did up for now?


title: Auto indent C++11 lambda functions Vim

text: Is there any way to get Vim to auto indent C++11 lambda functions correctly? I have tried many different permutations of smartindent, cindent, etc. in .vimrc. ![enter image description here](http://i.stack.imgur.com/YaprJ.png)


title: How to disable floating of maximized Chromium window?

text: I'm using AwesomeWM. My rule for Chromium:               { rule = { class = "Chromium" },       properties = { tag = tags[1][9], floating = true, border_width = 0 } },      It works well, except Chromium window can be dragged using it's titlebar even if it's maximized.


title: Why can't Steam's window be dragged or moved normally?

text: Why Steam's windows can't be dragged using border and it's custom titlebar. Chromium works (almost) well with AwesomeWM, why Steam doesn't.


title: Merge csv files with conditions

text: I have 2 _CSV_ files for each date ( _csv_2014_4_15_ and _csv_2014_4_16_ ) , with basic structure and couple of unique columns as below.               id,name,created_at,updated_at,other columns          12, joe, 2013-1-1 18:30, 2014-2-1 12:00     56, bob, datetime, datetime      I want to merge the 2 csv files based on these these conditions. My code so far is as below.               if (csv_date_x.id == csv_date_x+1.id)     {        if(csv_date_x.updated_at < csv_date_x.updated_at)              add csv_date_x+1 row into out.csv     }     else {        if(csv_date_x+1.created_at == TODAY (yyyy-mm-dd)              add csv_date_x+1 row into out.csv     }


title: Convert PDF from sRGB color space to CMYK

text: Does anyone know how I can convert a PDF (or EPS) file from sRGB color space to CMYK color space? My workflow is currently the following:   * Draw an image with Powerpoint   * Print via postscript printer into a .prn postscript file   * Execute a bash script that uses ps2eps, ps2pdf, and pdftk in order to generate a cropped PDF image Unfortunately, this produces an sRGB PDF only. Instead, I need a CMYK PDF and I don't have an idea how I may get this. Any help on this is highly appreciated.


title: Arch Linux problem: What is causing the black screen problem when logging into Cinnamon?

text: I first posted this in February, but I'm making the problem clearer because I had no responses in 6 months, and the problem still exists. My Arch boots to the terminal. I login as root. I start Cinnamon and everything is fine. I logout of root while in Cinnamon, and I'm returned to the terminal. I login then under my own user account. I start cinnamon and I get a black screen with a mouse pointer that I can move. I can't get out of this and it requires a shutdown. This problem is reproducable. After booting up again, I login under my normal user account and it works, but the wallpaper has changed to some basic, default image. What is happening and how can I fix this?


title: how to download fedora 19 alpha release cadidate (or test composite) (spin lxde) iso image?

text: This should have been an easy google search, but I cannot find any iso images! The title says what I am searching for.


title: ZSH takes two tabs to complete filenames

text: I love Zsh's tab completions, but it's frustrating when there is only one possible option and I have to tab twice to tab complete the filename. For example, if this is a list of files in a directory:               - a.txt     - b.txt     - x.txt      and I type `cat x<TAB>` in ZSH, I get this at the prompt:               $ cat x     x.txt      I have to TAB again to get the value. What can I do to get ZSH to complete the filename with only the first tab? Here's my setopt:               alwaystoend     autocd     autonamedirs     autopushd     cdablevars     completeinword     correctall     extendedhistory     noflowcontrol     histexpiredupsfirst     histignoredups     histignorespace     histverify     incappendhistory     interactive     longlistjobs     menucomplete     monitor     promptsubst     pushdignoredups     sharehistory     shinstdin     zle


title: How can I rejoin a process running

text: I am very new to using Linux. I have a 'machine' on Amazon and I was trying to learn how to use Python on this machine. I started running Python—had to step away for a few minutes and the connection was reset. I rejoined the connection and started wondering if the Python process was running. I poked around and submitted the               ps -ewwo pid,args | grep python       and I discovered all of this               root@mymachine:/# ps -ewwo pid,args | grep python     906 python     1118 grep python     2450 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -q start     2451 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=ArchRunner:0:1 -s     2452 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=BounceRunner:0:1 -s     2453 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=CommandRunner:0:1 -s     2456 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s     2462 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s     2468 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s     2469 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=VirginRunner:0:1 -s     2470 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s      From what I have found I think that Python is still running and it has a process ID of 906. I would like to know   1. Will it die on its own at some point (not likely from what I understand)   2. Can I rejoin it somehow?   3. Am I even correct in my conclusion and if I can't rejoin it can I kill it?


title: Install from RPM, then files change. How can I see the differences?

text: This is a RedHat Enterprise 5.5 system. I ran a verification check against an RPM, and it looks like two files have changed:               # rpm --verify shadow-utils      S.5....T  c /etc/default/useradd     S.5....T  c /etc/login.defs      I have access to the RPM which originally installed these files. Can diff these changed files against the version which is stored in the RPM?


title: Fedora GUI package installer takes very long (>15min) to start

text: I tried to use Linux GUI for Fedora but I did not find it intuitive than that of windows. Whenever I tried installing any software using rpm file by double clicking file, many times it stuck and when I reinvoke that from terminal it says yum is already locked and some other installation process is already running and I always have to force quit that process. From OS point of view this seems to be Scheduling problem. (How) can we replace scheduling for Linux x window? Is there any better scheduling available for Fedora linux x window? * * * Update: Sorry about late response: => When I double click rpm package , it does not show up anything even after waiting for two minutes. => When I try to invoke that package from command line thinking something wrong with Fedora GUI it throws me a message saying some other process has the lock. => When I kill that process using kill command and try to install using command line it starts with no problems. => Many times when I don't kill the process after invoking rpm installation package, I start doing some other work, after more than 15 minutes the installation window comes from nowhere asking for root password, after entering which I get window for downloading dependencies ? Can somebody clarify me how this problem is not related to scheduling ?


title: Opensuse 11.3 with Dell inspiron 1564 wireless

text: When I was using ubuntu i used to add the cd to software sources and install a package called bcmwl* and the wireless would work immediately. Now on Opensuse the wireless is not working and as a regular user I am not sure what to do exactly ..   I typed dmesg at terminal and i got a long file with "Broadcom 4312 WLAN found" but i am unable to find my network or connect. Please help


title: Contents of /proc

text: Is there a site someplace that lists the contents of `/proc` and what each entry means?


title: Replace very long string in files recursively

text: I have a very long and complex string in many files and I want to remove/replace it recursively. The string contains many slashes, backslashes and spaces and any kind of special signs. How do I do that? A simple find + sed combination wouldn't work because of all the special signs in it which I hardly can escape. Would it be possible to write the search string to a file and use this as input for a search & replace command?


title: Develop / Debug C / C++ on Ubuntu?

text: What's the best IDE for developing C / C++ on Ubuntu? I tried installing Eclipse but it seems like I need the eclipse-cdt package also. The problem is there is no such package, at least for Lucid. How do I proceed? I am not tied to Eclipse.


title: Easiest way to install a Linux Desktop installtion on VirtualBox

text: I need a Linux Virtual machine (running on Windows with Virtual Box), and I need it run a desktop such as Gnome. Because it is running on a Virtual machine on a not particulary powerful machine I require a version of Linux which is not too memory/cpu hungry. I readup a little on this and decided to try Arch Linux as it advertised itself as lightweight and easy, but unfortunately it was not easy enough for me. I setup a VirtualBox machine mounted the Installation ISO okay as described at https://wiki.archlinux.org/index.php/Installing_Arch_Linux_from_VirtualBox But then when it came to actually installing ArchLinux I was lost as https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide concentrates or real(non-virtual) installations and had far too many steps. Is there a Linxu Distro which I can install with just a couple of commands that will be usuable in my virtual machine ?


title: Add echo command to /etc/profile to disable screen blanking

text: I am considering adding the following echo command to /etc/profile               echo -e ‘\033[9;0]\033[14;0]’      The system in question does not have setterm command available and is just running text console. Are there any problems with doing this the way I plan to?


title: Login script for bash not loading

text: I am very confused about the login script for bash. I have always used `~/.bash_profile` to configure my bash shell. Now I am on a new system just as a user: I am not root. This system was originally using tcsh shell and I changed it to bash using the command `ypchsh to /bin/sh`, but it does not load my bash login configuration file and not even `.bashrc`. But if I type just `bash` in my terminal, my login file is loaded. What should I do to load it on login? * * * sample of my .profile:               # .bash_profile           # Get the aliases and functions      if [ -f ~/.bashrc ]; then              . ~/.bashrc      fi           # User specific environment and startup programs           PATH=$PATH:/usr/local/share/bin/:/usr/local/share/bin/idl/:./      export PATH           source $HOME/script.sh           export SCRIPT_VARIABLE


title: Get current terminal name

text: How do I fetch the current terminal name? I mean to the name that `ps` shows in the TTY column, e.g.:               root@dor-desktop:/home/dor/Documents/LAMP_setup/webs_install/do/install# ps aux | egrep 'mysql|(^USER)'     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND     dor       2238  0.2  1.9 448052 79796 ?        S    17:27   0:17 gedit /home/dor/Documents/LAMP_setup/webs_install/do/install/mysql.install /home/dor/Documents/LAMP_setup/webs_install/do/install/mysql.setup     root      4975  0.1  0.5 324984 22876 ?        S    18:12   0:04 gedit /usr/local/mysql/bin/mysqld_safe     root      8160  0.0  0.0   4108   664 pts/2    S    19:08   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --skip-networking --skip-grant-tables --user=mysql --basedir=/usr/local/mysql --ledir=/usr/local/mysql/libexec     mysql     8279  0.0  0.4 146552 19032 pts/2    Sl   19:08   0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --skip-networking --skip-grant-tables --log-error=/usr/local/mysql/var/dor-desktop.err --pid-file=/usr/local/mysql/var/dor-desktop.pid --socket=/usr/local/mysql/mysql.sock --port=3306     root      8342  0.0  0.0   7632  1024 pts/2    R+   19:14   0:00 egrep --color=auto mysql|(^USER)      In the above example, I need to fetch `pts/2` which is probably the name for the current terminal that executed those commands.


title: Memory Mapping Linux 3+ kernel

text: Can some one help me understand how memory mapping is done Gone through this Why does Linux show both more and less memory than I physically have installed? but still i am not able to understand fully. using Ubuntu 12.04 with 2 Gb DDR3 ram with 3.2.0-39-generic               free -k              total       used       free     shared    buffers     cached     Mem:       2012040    1726616     285424          0       2612     245560     -/+ buffers/cache:    1478444     533596     Swap:      2057212     745152    1312060      2 GB in KB:               2097152      2097152-2012040=85112               Memory used by kernel          dmesg|grep Memory          (6571k kernel code, 452k absent, 63360k reserved, 6632k data, 920k init)      6571+452+63360+6632=77015k 85112-77015=8097k Where can i see this 8 Mb of used ram.If its used by Devices through DMA can it be visible. Also is reserved refers to memory reserved for BIOS? http://pastebin.com/GrvrfzUu               [    0.000000] BIOS-provided physical RAM map:     [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)     [    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)     [    0.000000]  BIOS-e820: 0000000000100000 - 000000007da08c00 (usable)     [    0.000000]  BIOS-e820: 000000007da08c00 - 000000007da5cc00 (ACPI NVS)     [    0.000000]  BIOS-e820: 000000007da5cc00 - 000000007da5ec00 (ACPI data)     [    0.000000]  BIOS-e820: 000000007da5ec00 - 0000000080000000 (reserved)     [    0.000000]  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)     [    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved)     [    0.000000]  BIOS-e820: 00000000fed20000 - 00000000feda0000 (reserved)     [    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved)     [    0.000000]  BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)     [    0.000000] NX (Execute Disable) protection: active     [    0.000000] SMBIOS 2.5 present.     [    0.000000] DMI: Dell Inc. OptiPlex 380                 /0F0TGN, BIOS A05 02/24/2011     [    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)     [    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)      dmesg|grep Memory               Memory: 1994460k/2058272k available (6571k kernel code, 452k absent, 63360k reserved, 6632k data, 920k init)


title: Send email from external email id such as Gmail, Outlook to Unix user account

text: I am trying to see if there is any way I can send email from external email address to Unix user account. I don't know if this at all possible or not. For example, if my external email address is `abc@xyz.com` and unix user name is `test@localhost` on `testserver.test.com` then I would like send email from `abc@xyz.com` to `test@localhost`. With `mail` command I know I can send email from Unix to my account on Gmail/Outlook but I would to know if any way exists to do reverse. Ultimately I want to have it available in `/var/spool/mail/test` account.


title: Mouse cursor disappearing after running gnome-settings-daemon in OpenBox

text: I'm running Openbox 3.5.2 on Fedora 20. For extra comfort (font rendering, tap-to-click, ...), I used to let `gnome-settings-daemon` run in the background. Now since upgrading to the F20 beta, my mouse cursor is disappearing right after executing `/usr/libexec/gnome-settings-daemon`. That is it _visually_ disappears; I am still able to click on things. But the impact on usability is unbearable nonetheless. At first I thought compton were at fault, which I installed fresh out of koji. But removing it from my autostart doesn't change things for the better. The mouse is just fine in Gnome itself. There's nothing suspicious in `.xsession- errors` as far as I can tell. I'm really out of ideas right now. Relevant system info:               $ rpm -q openbox compton gnome-settings-daemon     openbox-3.5.2-2.fc20.x86_64     compton-0-0.3.20121218g75aec17.fc19.x86_64     gnome-settings-daemon-3.10.2-3.fc20.x86_64     $ uname -sr     Linux 3.11.10-301.fc20.x86_64      The machine itself is a X121e Thinkpad with a E-450 APU, powered by the OSS radeon driver.


title: Copy file while replacing text in it

text: I'm writing a script to publish a webapp. While copying files, I must replace a placeholder `current_date` in a file with the current date. I would start with something like this to define the date string               date=`date +%Y%m%d`      The copy and replace part is where I don't know how to start.


title: Setting ulimit correctly for PHP on Linux

text: I have `/etc/security/limits.conf` set to the following:               nobody soft nofile 409600     nobody hard nofile 1024000     phpuser soft nofile 409600     phpuser hard nofile 1024000     httpd soft nofile 409600     httpd hard nofile 1024000     * soft nofile 409600     * hard nofile 1024000      However, php pages still display:               [...] failed to open stream: Too many open files [...]      Setting `ulimit -n 10000` looks to only be a temporary fix. I also have the following set:               fs.file-max = 20970800     net.core.somaxconn = 1024000     kern.maxfilesperproc = 16638400     kern.maxfiles = 819200


title: Where does Chrome gets its list of certificate authorities from?

text: On Fedora, I'm talking about the list displayed when you go to settings > manage certificates > authorities tab. I've read that it should be in the NSS shared DB, but this command returns an empty list: ` [laurent@localhost nssdb]$ certutil -d sql:$HOME/.pki/nssdb -L `


title: Weird logging behavior in Berkeley mail on a Mac

text: I use Berkeley mail (/usr/bin/mail) on an iMac. It has just started behaving in strange ways. If I type "~v", to open an editor, I get "[LogLevel VERBOSE]" or sometimes "[LogLevel DEBUG]" and the editor doesn't open. I get the same behavior running heirloom mailx. Any idea why this might be happening and how I can stop it? (I'm not a power user and know little about logging.) Somewhat mysteriously, this new behavior coincided exactly with an upgrade to Mavericks, not on the machine running Unix mail, but on the machine from which I remotely ssh to that machine. The machine running Unix mail hasn't been upgraded: uname -v yields "Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64".


title: How to sort (by whatever key) BibTex entries in `.bib` file?

text: I work with LaTeX and do versioning with Git. For bibliography management I use Mendeley. The problem is that each time Mendeley synchronizes it's `.bib` exports, they are in different order, what makes bibliography versioning much harder. My idea is to sort BibTex entries in `.bib` file, each time before commit. Could you help me, how to do this in smart (short&sweet) way ? :) P.S. I can run this routine manually. I do not need git integration. I just want program/script to sort `.bib` file.


title: How do I monitor display :1 while I'm using display :0?

text: I am running X on two displays. :0 is my primary display but I also have some programs running on :1. Is there any GUI application that will let me monitor display :1 in a window that sits on display :0? (Using gnome, FWIW)


title: How does touch -t work internally?

text: How does `touch -t` command works exactly, internally (I tried to find its source code but couldn't)?


title: Cannot kill teamviewer process

text: My main desktop has Mint 14 and I approached it via SSH from another computer, because I didn't have a screen on the Mint one. Then I tried to start teamviewer just I order to launch its desktop session remotely. I started the teamviewer and everything ran fine, but then I tried to stop this application from the terminal and this is what happens: ### Checking:               x@x-pc /opt/teamviewer8 $ ps -ef | grep team     root      1567     1  0 20:55 ?        00:00:00 /opt/teamviewer8/tv_bin/teamviewerd -f     x         2892     1  0 21:41 ?        00:00:00 /opt/teamviewer8/tv_bin/wine/bin/wineserver     x         2914  2822  0 21:48 pts/0    00:00:00 grep --colour=auto team      ### Using one-liner just to feel myself more hacker like :)               sudo for i in `ps -ef | grep team | awk {'print $2'} | xargs`; do kill -9 $i; done      ### Checking again:               x-pc teamviewer8 # ps -ef | grep team     root      3003     1  0 21:50 ?        00:00:00 /opt/teamviewer8/tv_bin/teamviewerd -f     root      3009  2957  0 21:50 pts/0    00:00:00 grep --colour=auto team      ### Killing again:               x-pc teamviewer8 # ps -ef | grep team     root      3003     1  0 21:50 ?        00:00:00 /opt/teamviewer8/tv_bin/teamviewerd -f     root      3011  2957  0 21:57 pts/0    00:00:00 grep --colour=auto team     x-pc teamviewer8 #     x-pc teamviewer8 #     x-pc teamviewer8 #     x-pc teamviewer8 #     x-pc teamviewer8 # kill -9 3003     x-pc teamviewer8 #     x-pc teamviewer8 #     x-pc teamviewer8 # ps -ef | grep team     root      3012     1  2 21:57 ?        00:00:00 /opt/teamviewer8/tv_bin/teamviewerd -f     root      3017  2957  0 21:57 pts/0    00:00:00 grep --colour=auto team     #########################################      No matter how many times I killed it, it receives new PID. How can I kill it?


title: "Permission denied" for running an executable file on a linux machine

text: I once generated an executable file using g++ on a linux box. But when I try to run this executable file on another linux machine, the system said "Permission denied". However, after I re-compile the source code on this second machine and run the executable file, the program just runs fine. Can you let me know what may be the problem? Thanks.


title: How's a module approved to be included into the linux kernel?

text: I'm now compiling the linux kernel 2.6, and finding there are more than 1,000 modules in total. How is a module approved to be included into the linux kernel?


title: How to restart mono web application without restarting apache?

text: Is there any way to restart **ONE** web application in mono without having to restart Apache? Currently i'm doing a `sudo service apache2 restart` everytime I deploy my .NET web application to mono. But it restarts all my other applications requiring them **ALL** to get reloaded into memory at next web request.


title: How to set a video mode in linux with kms/drm?

text: How can I set the video mode in Linux the low level way? As far as I know the lowest layer in userspace would be to request KMS via DRM. Is this correct? And if so, how could I achieve a mode switch and access to the associated "video memory"?


title: macchanger: Too many open files in system

text: I'm having a problem with `macchanger`. Whenever I try to run the command `macchanger -r eth1`, I get the following error:               ERROR: Can't change MAC: interface up or not permission: Too many open files in system      I'm running this command as root, and the `ulimit` is set to **unlimited**. What can I do to avoid this error?


title: How do you format a USB stick after it is being labled "unrecognised" by Ubuntu?

text: I have a memory stick which I had cleaned of old data fragments. The memory stick was mounted on /dev/sdc1 so I did:               dd if=/dev/zero of=/dev/sdc1 bs=1M      After the task was complete, my usb memory stick became unrecognized. What do you do in this case to make the drive recognized again and partition it as FAT?


title: Bash prompt when my home directory is a symbolic link

text: I symlinked my `/host/Users/Kevin` folder to `/home/Kevin`. I also edit the `/etc/passwd` file to `/home/Kevin`. I logged out and logged back in, however when I open up a terminal it's a bash prompt like so:               kevin@ubuntu:/host/Users/Kevin$      But when I `cd` or `echo $HOME` it changes to:               kevin@ubuntu:~$      or when I `echo $HOME` it prints `/home/Kevin`. How can I make it open up in this format by default?


title: How do I access files on an external hard drive?

text: edited 02-25: I thank @Anthon for his replies. I still do not, however, understand the meaning or the how of "pinging" ("Once you update your Q, ping the commenters..."). I also do not understand the meaning of "If you don't know what he means ask him in a comment under his" (?). I do hope he and the others excuse the fact that I've not contacted them directly about this updated question. As well, thank you @Jenny D for your (patient and clear) instructions and information. I've printed them out and will use. @ganessh: It is a NTFS drive @Zelda - I pulled the drive because the computer in which it was installed had a failing (well, failed) motherboard, and I needed to get to the data. I had no problems with the drive when it was still in the (alive) computer. @Babin Ionston-I downloaded the ntfs3g pkg (and vague instructions) but am having a difficult time with the installation. I will however, keep trying, and if unsuccessful, will write down the challenges and bring the question here. It would be _enormously_ beneficial for new members to receive a "write this/not that" message to make it very clear what information is needed by members to respond to a question (and I don't remember receiving such when I signed up, but perhaps I did). Although I'm quite honored with the patience shown by most of the folks who have responded to my question, I think doing so would save everyone time. All: I will try out these suggestions (and instructions) and report back. Thank you. ============= I have a lot of files on an external hard drive that I wish to access on my (now) Linux-based computer. The computer is now running Mint 16 (Cinnamon). The drive is a SATA drive I pulled from my Windows computer. That computer ran Windows 7. The problems I experience are:   1. The drive appears on my desktop, and all of the folders on it (I believe) do display in the folder list. I can access some folders quickly (and see the contents) but not others (including the folder with the files I need--mostly Word/Excel files). These files are in a folder that was formerly in the Users folder on my Windows computer.    2. My computer freezes when I click on this file (and this is the largest folder--approx 12 GB) I see a spinning disk and (I think) the word "processing"above it. Then the computer locks up: the cursor freezes, or doesn't freeze, but I can't close the window. I receive a message (I think it says "accessing") and a spinning disk, but the files do not open, and the computer freezes. I then have to reboot.    3. I also tried copying the files to the computer, but was not able to do so (the freezing began).  My question: What do I need to access these files? Also (and once again), what information should I provide you all to make answering my question(s) easier? Please note that I am new to Linux, so do not assume that I understand terms (like ping) or abbreviations that may be familiar to you.


title: Transfer all messages of thunderbird with windows 7 to thunderbird ubuntu 14.04?

text: How can I transfer all messages and contacts of thunderbird with windows 7 to thunderbird ubuntu 14.04? I know that have a free app called mozbackup. But it don't works with linux. There a way that can I make this moving? Thanks!


title: Making a real universal bootable Arch pen drive

text: I've followed this article, and been able to get a fully working 32-bit installation on a _Kingston DataTraveler_ 8GB pen drive, with a BIOS boot partition, and a home/root `ext4` file system without journaling partition, and no swap. I'm using GPT partitions. The problem is that pen in which I installed Arch only works on my computer. That is, if I insert it in other computer (the ones I tested had Windows with BIOS, not UEFI), I cannot change the boot order, because the pen does not appear as a bootable device. **How can I get it to run on any computer, the same way the usual Arch Linux installation pen does?** That is the whole point, to have a pen that is ensured to boot on any computer to which I have physical access, rendering its usual data protection measures, i.e. login passwords, useless! _(evil laugh)_ I see the normal installation pen has an EFI instead of a BIOS Boot partition. I don't mind reinstalling the system, but I'd surely prefer if I could copy the latest installation media ISO and tweak the necessary options (auto login, hostname, clearing of changes on reboot, etc.). **Can I do that? How exactly?** Is this supported? What exactly, besides what is referred in the article, and the EFI boot partition, do I need to watch out for? Must I use `fdisk` or is `gdisk` OK? What bootloader should I choose? I'd prefer GRUB, simply because I'm used to it, but I heard Syslinux is better (and easier) for this purpose.


title: Debian 7 - Kernel Panic after libc6 update

text: I installed and configured Debian 7.2 Wheezy AMD64 few days ago, I spent days configuring everything out and installing useful apps etc, so finally I tried to install Wine.   And what happened?   Dependency problem - libc6 is version 2.13 but it should be 2.17 to satisfy Wine. Unfortunately, there is no stable version available so I used sid to install libc6 2.17. It got installed, but, after finishing installation, all commands stopped working. I was unable to call any command, it just reports that command is NOT found. I thought that reboot may fix the problem, so I done hard-reboot and after GRUB menu it stucks:               switch_root can't execute '/sbin/init' no such file or directory     Kernel Panic - not syncing      And my Debian is now is in unusable state. I have Dual Boot with Windows 7 64-bit. I also have Debian 7.2 Wheezy AMD64 live on USB flash so I can use it for repair. I do not have enough experience with Debian based distros to solve this. Can someone give me step-by-step guide?


title: How do I edit /etc/rc.local?

text: Im using Raspbian and trying to edit `/etc/rc.local`. When I run `sudo nano etc/rc.local` or just `sudo nano rc.local` it creates a new file. And anything I try to edit in leafpad won't save.


title: CentOS: Avoid that ALT-F4 switches to console

text: At least every Linux system that I worked with used the convention to switch to the non-graphical consoles by `Ctrl`-`Alt`-`F1`, `Ctrl`-`Alt`-`F2` and so on. Recently, I installed CentOS 6.3 on a machine. The installation is non- customized and uses Gnome 2. To my surprise `Alt`-`F4` switches to console. `Alt`-`F1` then brings you back to the XServer. How can I change the keybinding to `Ctrl`-`Alt` instead of simply `Alt`? It also seems to bypass Gnome's key bindings. In Gnome, I tried to define `Alt`-`F4` as close window, but it does not work but still switches to the console.


title: Combining awk statements

text: I'd like to combine those awk statements:               awk -F'\t' 'NF>1 && $NF!=""' #prints every row with more than two fields      awk '$1 ~ /^[0-9]/'        #prints every row starting with a number      awk -F'\t' 'NF==1'           #prints every row with one only field     awk '$1 ~ /^[A-Z]/'        #prints every row starting with a capital letter       in order to get a statement printing every row that begins with a capital letter AND contains one only field, and every row with more than two fields, each of them starting with an integer. Sample input:               NAME_1     1        11  11     key 11     KEY KEY      Expected output:               NAME_1     11  11


title: Print PDF scaled-down and aligned

text: I want to print a PDF file with all pages scaled down equally (to, say, 70 %). The scaled-down pages should then be left-aligned on the printing paper. This doesn't seem to be possible with `lpr` alone. With `pdfjam` I can scale the pages (`\--scale 0.7`) but I don't know/see any option to align the scaled pages. A negative offset (like `\--offset '-3cm 0cm'`) doesn't work.


title: What is a datastore especially when considering *nix systems as hosts?

text: Is it the `.vmx` files that are created on installing VMWare, does it differs across Windows and Linux platforms as hosts? How can we create or browse datastores when the host is Linux or Windows?


title: Running an xterm remotely with ssh -Y, defies the coloring I setup in .Xresources

text: The `xterm` seems to not read the colors I set in my ~/.Xresources file when I connect to a Linux PC remotely. Basically, if I'm sitting in front of my PC and I run an `xterm` from Xsession, the colors will obey whatever is in my ~/.Xresources file - no problem there. Here is my ~/.Xresources file:               XTerm*background: black     Xterm*XtDefaultBackground: black     Xterm*XtDefaultForeground: white     XTerm*foreground: white      But if I log on to that same computer remotely and run an `xterm` (which will appear locally though), the colors are again the default (black fonts on white background). It seems irrational that `xterm` does not read .Xresources file in this case! What am I missing?


title: Setting up smartmontools

text: I recently built a small server running lubuntu and decided it would be wise to setup smartmontools in order to monitor the drive health. SMART seems to be built into lubuntu in gnome-disks, however, it was not configurable to any degree other than on or off. I proceeded to install hdparm and smartmontools and configured both according to this http://zackreed.me/articles/60-spin- down-idle-hard-disks. My disk, however, still does not enter standby mode. I checked gnome-disks once more and saw that SMART was running itself once every 10 minutes due to turning smartctl on in terminal. Does anybody know of any way to fix this so that the disk can enter standby mode?


title: How to run cinnamon properly?

text: I am running cinnamon fallback, the output of `inxi -SGx` is               System:    Host: elie-Hp Kernel: 3.2.0-23-generic x86_64 (64 bit, gcc: 4.6.3) Desktop: Gnome Distro: Linux Mint 13 Maya     Graphics:  Card-1: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0                 Card-2: Advanced Micro Devices [AMD] nee ATI Seymour [Radeon HD 6400M Series] bus-ID: 01:00.0                 X.Org: 1.11.3 drivers: vesa,intel (unloaded: fbdev) Resolution: 1368x768@0.0hz                 GLX Renderer: N/A GLX Version: N/A Direct Rendering: N/A      Is there a chance that i can run cinnamon properly and not in fallbak mode?


title: Recovering truncated file

text: I'm in a peculiar situation. While editing a Perl program I accidentally truncated the file to zero length (using an Emacs lisp code I was developing). I need to recover that program... How do I that ? I tried debugfs utility but that was of no help cuz the program wasn't deleted but truncated to zero length & then saved by the lisp code without a prompt.


title: Triple compression and I only save 1% in space?

text: I've been trying to save space on my linux server, and I had a folder containting, in subfolders, 22GB of images. So I decided to compress them. First I used tar:               tar -zcf folder.tar folder       Then gzip               gzip folder      And finally, for good measure, just in case, bzip2               bzip2 folder      And after all that, the total of all the `folder.tar.gz.bzip2`s, came to still 22GB! With, using finer precision, a 1% space saving! Have I done something wrong here? I would expect many times more than a 1% saving! How else can I compress the files?


title: Why do the nfs4 tutorials recommend to bind mount sub directories

text: All NFS4 tutorials I have encountered so far recommend bind mounting real directories into the export root. Is this a technical necessity? If I had a directory that's only meant to be exported, is it sufficient to make it a subdirectory of the export root or does it really need to be bind mounted?


title: Unable to do head or tail for a file

text: I have a .CSV file which upon passing the `file test_file.csv` command gives the output as:               test_file.csv: ISO-8859 English text, with CR line terminators      When I am using `cat, head or tail` command on the file, it is returning me the total file content on the screen. How do I convert the line terminators so that I will be able to use these commands and use the file for further processing. Also, I was wondering if there is a way to know how this file was generated/created? Please suggest.


title: dumpe2fs - lifetime writes - what is it

text: For example, if I run:               sudo dumpe2fs /dev/sda1      I get detailed information about the partition. I'm confused about this part, `Lifetime` writes, returns the following for my boot partition:               Lifetime writes:          12 kB      What does this `12 Kb` mean? This is full output:               user@root:/data$ sudo dumpe2fs /dev/sdb1     dumpe2fs 1.42.9 (4-Feb-2014)     Filesystem volume name:   <none>     Last mounted on:          <not available>     Filesystem UUID:          5524d5a6-4635-48a6-8cd9-a636e3ad2b2c     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super large_file     Filesystem flags:         signed_directory_hash      Default mount options:    user_xattr acl     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              121680     Block count:              486144     Reserved block count:     0     Free blocks:              477783     Free inodes:              121669     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      118     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8112     Inode blocks per group:   507     Filesystem created:       Thu Mar 27 03:18:09 2014     Last mount time:          Thu Mar 27 03:18:34 2014     Last write time:          Thu Mar 27 03:18:56 2014     Mount count:              1     Maximum mount count:      -1     Last checked:             Thu Mar 27 03:18:09 2014     Check interval:           0 (<none>)     Lifetime writes:          12 kB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Default directory hash:   half_md4     Directory Hash Seed:      8f43123d-1451-4047-a26c-d5227fd80240


title: Write-only permission for a directory doesn't allow to rename (move) files inside?

text: In fact, I would like to ask more general question -- "what does write permission for a directory allow you to do exactly?" -- but let's approach it with a concrete example. It is a long question, if you are in a hurry **read the bold** -- it should cover the main part. Different sources (nice question, one more, grymoire's) say something similar to the following on the directory permissions: > r, read -- reading of the directory's content (filenames inside) > > w, write -- changing the directory's attributes (e.g. modification time) and > creating/renaming/removing entries inside > > x, search -- accessing files inside, you have access to the inode of the > file, hence you can reach it's actual content My problem is with the description of `w`. What directory's attributes does it give you access to? **I cannot create/rename/remove a file inside a directory with only write permission** : I make a directory (`tdir/`) and a file inside (`afile`), `chmod -x-r tdir/`, `mv tdir/afile tdir/af`, `rm tdir/afile`, `touch tdir/newfile` -- all fail with permission denial, unless I set `x` permission to the directory as well. And `x` alone doesn't give you the permission to create/rename/remove files inside the directory. **In order to do that you need both`x` and `w`**. But `touch tdir` does change the modification time of the directory with `w` only. I would rephrase the sources above this way for the compliance with the issue: a directory's `r` allows you to see the filenames inside, but no access to the actual file (to the inode); `x` gives you access to the inodes of the files (which means you can see their permissions and, according to it, have access to the contents), but you still cannot change anything in the directory; directory is actually some sort of a file and to change something in it you need the `w` permission. Thus, when you are changing something in the directory you need `w` permission. If your change requires inodes of the files in the directory -- you need `x` as well. It explains why you cannot remove a file inside a directory with `w` only: **when removing a file you need to reduce the link count of the inode by 1 -- you need to know the inode -- thus you need`x` for the directory**. **But why do you need`x` for creating (you could ask the system to create a file without exposing the inode?) and renaming/moving the file (when you move a file you don't change it in any way, you only change the records inside the directories and their inode counts?)?** Maybe it is just an implementation thing? I.e. indeed you don't need the inode for renaming/creating files -- you need only filenames and `w` permission; but inode and filename constitute one record in the directory; thus changing the filenames = changing the records = kind of accessing the inodes. And also what attributes do directories have besides modification time, permissions and files records? What else in the directory can you change with `w` only?


title: Ksnapshot generates grayscale EPS screenshots only

text: Every time I want to take an EPS screenshot with KSnapshot it is grayscaled even though the real screenshot contains colors. This only happens when I choose the EPS format in KSnapshot, not with the other formats. I'm using ubuntu 14.04 with KDE 4.13.1. Any ideas? Charlie


title: Suppress "Alarm clock: 14" from ping

text: I've made a simple script for rebooting my router and afterwards showing a progress bar until my computer has an internet connection again. When running the script I get the following output:               The router is now rebooting...     ############################################bin/reboot_router: line 48:  4758 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4761 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4763 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #####bin/reboot_router: line 48:  4773 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4775 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     ##bin/reboot_router: line 48:  4777 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #      I want to suppress the `Alarm clock: 14` thing from appearing, so the output becomes:               The router is now rebooting...     #######################################################      The relevant part of the script is:               #!/bin/bash          COLUMNS=$(tput cols)          # Reboot router code here          echo 'The router is now rebooting...'          min_time=60     max_time=120     start_time=$SECONDS     time=0     progress=0          until [[ $min_time -lt $time ]] && ping -Q -c 1 -t 1 google.com &> /dev/null; do         let time=SECONDS-start_time         let new_progress=COLUMNS*time/max_time         let diff=new_progress-progress         let progress=new_progress         for((i=0; i<diff; i++)); do             echo -n '#'         done         sleep 1     done          echo


title: Latex auto package loading

text: In Windows, TexWorks loads the missing `sty` packages itself. In Linux it doesn't: how is this `sty` loading managed in Linux?


title: Choosing Linux Distro for PostgreSQL

text: I'll begin by saying I'm a newbie sys admin. I need a new PostgreSQL 9.1 machine. My go to distro is Debian (for no good reason other than it's what I first learned). However, when I started looking at documentation, it appears that Debian manages those packages from http://backports-master.debian.org/Instructions/. This is apparently a repo for unstable packages that haven't really been tested on Debian. Here's the question: Is my assessment right? Is this what the backports repo is? If this isn't stable, why would I put it on a production box? Is there another distro with a package manager that I should be looking at instead?


title: Kickstart file not being found in VituralBox

text: ![enter image description here](http://i.stack.imgur.com/zRTLz.jpg)I am installing a STIG RHEL on a virtual box and therefore have a custom kick start file in the iso I am using. The iso structure looks like this for the kickstart file               ROOT     |     |----stig_fix              |              |----stig_fix.cfg      However, when I try to install using the iso image from the storage option in vituralbox, it keeps saying it can not find the kickstart file. Does anyone know what value I should make ks equal to in the main menu, to get vitural box to be able to find the kickstart file?


title: Alternative to watch which support colors

text: I have a command (`phpunit`) which has a colored output. According to the `watch`, command I should be able to use the `\--color` flag to allow color rendering to pass through. However, this isn't working. Is there any other ways of solving this?


title: Fedora 19 eclipse issue

text: I have just installed Fedora 19 from the DVD ISO and I am having this irritating problem. Whenever I start eclipse it shows me:               "Eclipse Platform" is not responding.       You may choose to wait a short while for it to continue or force        the application to quit entirely.      and I have to select wait and then it works for me. I think I noticed, when installing Fedora, that it had no option to make a selection to install Java as I had for eclipse. How can I start Eclipse without getting this message? ![enter image description here](http://i.stack.imgur.com/795GA.jpg)


title: LXC and deployment of web application code

text: l'm currently in the learning stage of using LXC. Now I'm at the point where I'm ready to deploy my application (written in PHP) to my containers. I've been using DeployHQ (deploying over ssh 2) to get my application from GitHub for this in my old setup, but I'm having issues understanding how I can get the files from my host to my lxc containers. Is it only possible for me to go from my containers and out to get the code?


title: Setting KDE to crop the laptop's screen to match external VGA device's ratio

text: I have a laptop with 16:9 screen ration. Sometimes I need to attach it to a projector via VGA. The projector ratio is 4:3. I use `System Settings`->`Hardware`->`Display and Monitor`->`Size & Orientation` to enable the VGA connection and set it's resolution. The problem is that all the resolutions for the VGA are 4:3, while the resolution for the laptop's screen is 1600x900(which is 16:9). That means that whatever resolution I pick, either the image on the projector is cut, the image on the local screen is cut, or both. Is there a way to force crop the local screen to 4:3? Ofcourse, I want the sides of the screens to be blank, not the to crop the image itself.


title: LVM: possible to recover full snapshot?

text: Accidentally, I have let a LV snapshot created by libvirt/virt-manager run to full. Is there any way I can at least recover (some) data written to the snapshot? Many thanks!               lvs       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 268435390464: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 268435447808: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 0: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 4096: Input/output error       LV          VG         Attr       LSize  Pool Origin                    Data%  Move Log Cpy%Sync Convert       vm_win_01   vm_storage swi-I-s--- 50.00g      [vm_win_01_vorigin]   100.00            lvdisplay     --- Logical volume ---       LV Path                /dev/vm_storage/vm_win_01       LV Name                vm_win_01       VG Name                vm_storage       LV UUID                wiONtF-6bXR-nleO-P2v7-e6mw-ezdg-tvBPbz       LV Write Access        read/write       LV Creation host, time cubist-vh001, 2014-07-22 18:38:55 +0800       LV snapshot status     INACTIVE destination for vm_win_01_vorigin       LV Status              available       # open                 0       LV Size                250.00 GiB       Current LE             64000       COW-table size         50.00 GiB       COW-table LE           12800       Snapshot chunk size    4.00 KiB       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           254:7          dmsetup table | grep win     vm_storage-vm_win_01_vorigin: 0 524288000 snapshot-origin 254:4     vm_storage-vm_win_01: 0 524288000 snapshot 254:4 254:6 P 8     vm_storage-vm_win_01_vorigin-real: 0 524288000 zero      vm_storage-vm_win_01-cow: 0 104857600 linear 8:3 104859648


title: Config to re-enable gtk2 tear-off menus?

text: Following an apt-get update on Debian jessie/sid, several Gtk2 applications no longer have tear-off menus enabled. I'm aware that this is a deprecated capability of Gtk (and disagree strongly with the GNOME team's rational for deprecating the feature), but if this _is_ a config issue (and I've dug it up repeatedly in the past), how would I re- enable it? gconf-editor doesn't seem to affect the behavior.


title: alias Not able to execute source command

text: I am trying to define a following alias in my .aliases file.               alias sett 'cleartool setview viewXYZ_!*; cd /path_dir1/dir2/; source ./env/script-name'      I use it as `sett myview` on commnd prompt when I open a new Terminal. First 2 commands work but source ... does not. ./env is a sub-directory of dir2 Can anyone explain why?


title: Atheros ethernet driver

text: I have openSUSE 11.4 installed on my HP pavilion dm4-2015dx. The ethernet card (Attansic ethernet controler is shown in Yast's hardware info) was not recognized and after many days of googleing i found similar problem that has been solved. I tried to do what is described on ubuntu forum but it didn't work for me. Although I finally have eth0 - but connection cant be established. Next thing I tried to enable Tumbleweed repository and update to kernel 3.0 (which could have drivers). Short after updating kernel I had two eth devices, but only one was activated when plugged in LAN cable. Still couldn't connect. After rebooting there is only one eth device - but not sure which one. How can I "uninstall" drivers from ubuntu forum? Or did Kernel override them? Any other suggestion on how to solve my problem is more than welcome! Thanks


title: Obtaining the staus of all input/output ports connnected to system

text: What's the command to list the all I/O ports connected to system? Also, how do I get the status of all individual ports? For example: printer How do I determine whether a printer is ready to print or if there are any jobs are waiting? For example: monitor How do I determine whether the monitor(s) is/are active or not?


title: How can this init script start without its dependency?

text: I'm working on some lsb init scripts. Here's the init info from one of them:               ### BEGIN INIT INFO     # Provides:     myscript     # Required-Start:   networking myotherscript     # Required-Stop:    networking myotherscript     # Default-Start:    2 3 4 5     # Default-Stop:     0 1 6     # Short-Description:    Starts my daemon     ### END INIT INFO      And the init info from myotherscript               ### BEGIN INIT INFO     # Provides:     myotherscript     # Required-Start:   networking     # Required-Stop:    networking     # Default-Start:    2 3 4 5     # Default-Stop:     0 1 6     # Short-Description:    Starts my other daemon     ### END INIT INFO      If I understand correctly, running `service myscript start` should not work unless myotherscript is running. However, executing `service myscript start` does indeed work. Why don't I at least get an error about the unmet dependency?


title: Detecting extension files doesn't executed for a period

text: How can I detect the `.class` files in my workspace which haven't executed for a certain period, and remove them?


title: How well will the AMD Radeon HD 7950 gpu perform on Linux?

text: The time has come for me to upgrade my aging gpu (9800 gt). The AMD 7950 has caught my attention because of the attractive price with pleasing benchmarks. But it is common knowledge that AMD GPUs have poor support on Linux. What sort of performance can I expect, with say, the latest version of Ubuntu? Will I have issues starting X. Will I have issues with a dual monitor setup? Will basic games such as minecraft or neverball play as expected without problems? Will there be any issues with video playback or flash? I tried doing some research with how this card performs on Linux, but google lacks any usable resources. If the 7950 is completely useless when paired with a Linux system, can someone suggest a comparable nvidia gpu for the same price range with similar performance?


How to fetch logs from diffrent servers using one command? For example, suppose I want to fetch logs for same id in different servers. I have to go to each server and search for logs. Is there any way to do it one go?


title: Execute a command in a different path

text: When using Git VCS, I execute all of the git commands on the directory that contains a .git repository. I want to execute a git-pull through an SSH trigger but how do I define the path to the repository to perform the action on?