title: Using grep -v on multiple arguments

text: Is there a simpler way to do this? `grep -v foo file | grep -v bar` There're probably very elegant ways to do it with egrep, but how to go with plain old grep? EDIT: `grep -v 'foo\|bar' file` seems to work only with GNU grep. I'm on Solaris. Any solution for that?


title: Removing files and symlinks like /etc/*release. Could it cause issues?

text: I just got a VM running on CentOS 6.5 and `ls -l /etc/*release` returns a number of files like `/etc/centos-release`, `/etc/lsb-release`, and `/etc/redhat-release`. The last one, `/etc/redhat-release`, is a symlink to the centos-release file. Is it safe to remove `/etc/redhat-release`? Or could it cause issues later?


title: Configure Clock on different port other than port 80 in CentOS

text: I installed CentOS 6.4 & noticed that port 80 is being used by Clock application               [root@l-22733-p11 logs]# lsof -i tcp:80     COMMAND     PID      USER   FD   TYPE DEVICE SIZE/OFF NODE NAME     clock-app 10418 jack   21u  IPv4 408998      0t0  TCP l-22733-p11.abc.com:51095->a23-3-105-136.deploy.akamaitechnologies.com:http (CLOSE_WAIT)     clock-app 20477 jack   21u  IPv4 408354      0t0  TCP l-22733-p11.abc.com:51088->a23-3-105-136.deploy.akamaitechnologies.com:http (ESTABLISHED)      If I kill these processes, then the clock gets killed. How can I configure this clock to run on different port than port 80? This issue was not present with earlier version of CentOS. I want to run the Tomcat server on port 80 & it is giving me bind exception since clock is running on port 80.


title: Is there a method for making Google Chrome open textareas in vim?

text: I used to use Firefox on a daily basis but have switched to Google Chrome, and have been using it for 2+ years now. The one plugin that I miss is this one, It's All Text!. This plugin allowed for the textarea to be opened into a separate `vim` or `gvim` window where I could do editing and then save the contents when done, back to Firefox. The closes thing I've found is this plugin is TextAid, but I find it a bit of kludge since it requires a separate web server to be kept up. I'd really prefer not having to use TextAid, does anyone know of any alternative methods to achieving this using Chrome?


title: Is symlink's target relative to the destination's parent directory and if so, why?

text: I've got the following file structure:               build/     client/       –> index.js      And when I try to create a symbolic link named "client" inside the build directory that refers to the client directory in the cwd like so               // Fails     $ pwd     /home/user/     $ ln -s client build/client      $ stat build/client/index.js     stat: build/client/index.js: stat: Too many levels of symbolic links      I get the ELOOP error displayed above. When I change the target path to be relative to the destination path, all is good:               // Works     $ pwd     /home/user/     $ ln -s ../client build/client      $ stat build/client/index.js     stat: <outputs file stats>      Is this the intended behavior and please explain why...


title: Which file defines the LESSOPEN environment variable?

text: please advise me about the following. On my Linux machine - I do the following:               $ env | grep -i LESSOPEN     LESSOPEN=|/usr/bin/lesspipe.sh %s      So from `env` command I see that:               LESSOPEN=|/usr/bin/lesspipe.sh %s      I want to change the variable `LESSOPEN`, so I do the following search in order to find where it's located, so I can make this change.               $ grep -Ril "LESSOPEN" /      But the `grep` search did not find any such file with `LESSOPEN`. Please advise on which file `LESSOPEN` variable is defined, so I can change its value.


title: Adding values of the column that have the same data ID?

text: I want to prepare a uniform daily data from a mixed daily and sub-daily data by adding the sub-daily values and producing a uniform daily data. My sample input and desired out put data looks like below. Input file:               date            Value     01/01/2000     2     01/01/2000     2     01/02/2000     6     01/03/2000     5     01/03/2000     4      Required output file:               date          Value     01/01/2000    4 (i.e. 2+2)     01/02/2000    6     01/03/2000    9(i.e 5+4)


title: Does sync command remove the dirty cache in the memory?

text: I am aware that sync command flushes the dirty cache into disk. I have run `free` command first, then `sync`, and then `free` again. The result of latter `free` command shows more free memory available than the former one. Does this mean that the dirty caches are removed from memory when performing `sync`? Can anybody give me a more solid proof?


title: yum is not working

text: [root@localhost ~]# yum install percona     Loaded plugins: rhnplugin     Bad id for repo: not installed, byte =   3     This system is not registered with RHN.     RHN support will be disabled.     YumRepo Error: All mirror URLs are not using ftp, http[s] or file.      Eg. 6Server.10 is not a valid release or hasnt been released yet/     http://mirror.centos.org/centos/6Server.10/addons/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://mirror.centos.org/centos/6Server.10/addons/i386/repodata/repomd.xml      Trying other mirror.     Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again     You have new mail in /var/spool/mail/root


title: Repeat each line multiple times

text: Would like to have each line in a file repeated a fixed number of times. e.g. have each line repeated four times:               a     b     c      becomes:               a     a     a     a     b     b     b     b     c     c     c     c      I've done some searching, and there are a lot of questions and answers along the lines of doing the reverse, e.g. merging duplicate lines into single lines, and maybe a few about doubling lines by printing them again. It would be easy to do this in C, but I wish I knew more about the native commands so I wouldn't have to resort to these kinds of one-off throw-aways all the time.


title: debian, problem with DNS

text: When I type in "google.com," firefox tells me that the server is not found. When I type in the IP address of google, it works just fine. I was playing with this computer at another place and it didn't have any problems. I have no idea what's wrong. Also: this is a fresh install and the computer is a little old.


title: Any way to register source-built software with rpm/yum database?

text: When I install a software from its binary package using rpm or yum, I can later query for meta-information (`rpm -qi PACKAGE`, `rpm -ql PACKAGE`, ...) and can uninstall it (`rpm -e PACKAGE`). But with the software that I build and install from its sources, I have to keep hanging on to the build directory forever to later be able to uninstall it, since removing the build directory would make it impossible for me to later uninstall the software! Even if you could hold on to the build directory forever, querying for meta-information isn't easy either, unless you know the intricacies of make files. Question: Is there any way to, sort of, 'register' the binaries being installed (which is usually during the `make install` step for most software packages) with the rpm/yum database, to allow easy uninstall later and for meta-information querying?


title: VMware Player on Linux, bridge networking

text: I am having trouble with VMware Player 4.0.3 for Linux. I am trying to run a Linux virtual machine guest (from the Linux host), but am unable to successfully get an IP address on the guest with bridge networking. I do have an internet connection and I already ran `vmware-netcfg` and changed the bridge mode from "Automatic" to my specific network card. I have also ran the command `sudo vmware-networks --start` which completes successfully.


title: Sun type 5 keyboard via serial port replicator

text: I'm running Ubuntu 12.04 on an HP G60 laptop with a Targus serial port replicator to USB and a custom cable between the keyboard and the replicator I ran `modprobe sunkbd`. Nothing works for the Type 5. The type 5c beeps when I plug it in or boot up but none of the keys work. What am I missing? I've pluged the Type 5c in via the mini DIN plug under the keyboard that is for the mouse because you can't detach the 5c cable from the keyboard.


title: In awesome window manager, how can I make key bindings send keyboard events?

text: I don't think that title probably helps very much, but here's my issue: I'm using the awesome window manager and am trying to make my key bindings to be similar in flavor to OSX for special keys. I'm learning German, so I somewhat regularly need to type vowels with umlauts (double dots) above them. In OSX, to do this, you type Alt+U, then the vowel you want. Obviously, that won't be feasible in awesome, but what I do want is modkey+ to send a keyboard event that gives it the impression I had hit an umlaut-ed key. Would I have to change the keyboard layout first? Such that the code changes the layout, sends the corresponding event, then changes it back? Or can I send the event without changing the layout? And how do I send the event in the first place, if that's possible?


title: How do I get Linux on my sat nav?

text: I have a Clarion MAP680 navigation system, with some version of Windows CE on it. Is there any way I could hack it to get my beloved Linux on it?   It seems to have a 1 GB flash drive or something, and a SD card slot I've never used. By the way, I have no hacking experience whatsoever.


title: using root to mkdir in another users home directory

text: having a bit of a difficult time trying to create a folder under another user's `/home/devuser1/pubic_html` folder. I'm trying to avoid using `sudo` and looking for an alternative. The permissions on the said folder reads as:               drwxr-s--- 2 devuser1  www-data 4096 Apr 28 19:40 public_html      Alternatively, assuming I use the `sudo` prefix, what would be the implications be? I've read that it's bad practice to use `sudo` to make a folder. After the new folder is created, I'm still changing the ownership of it to the user in question. Example:               chown -vR devuser1:www-data /home/devuser1/public_html/$vhost


title: Why ping an IP is different to ping a website?

text: I've noticed a strange behaviour (at least, I can't get out). **Ping IP** , specifying packet size:               ping -s 128 8.8.8.8       I get:               PING 8.8.8.8 (8.8.8.8) 128(156) bytes of data.     72 bytes from 8.8.8.8: icmp_req=1 ttl=43 (truncated)      **Ping website** , specifying packet size:               ping -s 128 www.google.com      I get:               PING www.google.com (173.194.35.19) 128(156) bytes of data.     136 bytes from mil01s16-in-f19.1e100.net (173.194.35.19): icmp_req=1 ttl=52 time=8.36 ms      So, why pinging pure IP packet size has been truncated? From _Ping_ man, I get: > -s packetsize: Specifies the number of data bytes to be sent. The default is > 56, which translates into 64 ICMP data bytes when combined with the 8 bytes > of ICMP header data.


title: Increasing swap space without reinstallation

text: I'm running Fedora 20, and I forgot to change my swap size allocation during installation. I have 16G of RAM, so I'd like to allocate 32G of swap space. The install created a swap for me, of only 8G. The Fedora install is on an LVM2 partition. Is there a way I can increase the swap size without reinstalling Fedora?


title: Keep two bash history files, one with ignoredups, one with everything

text: For the purposes of looking at which commands I am using the most, I'd like to keep a record of command I type in my bash history (even duplicates). But, for sanity and ease of use, I still want to keep my ignoredups setting on. Is there a way to automatically create two history files? With the "default" being no duplicates, and the full history elsewhere?


title: Microphone always picks up sound and routes it to speakers

text: I've started running into a kind of strange problem on my laptop, and Google hasn't proved to be very helpful so far. Essentially, at seemingly random times, my microphone will start sending output directly to my speakers/headphones and I cannot disable it. Going through the Gnome GUI and muting my microphone doesn't stop the sound, and disabling the capture channel in `alsamixer` doesn't help either. For that matter, I can set every channel to a level of "0" in `alsamixer`, but if I unmute the master I'll **still** hear microphone input. So far the only thing that solves the issue is rebooting my system, but that's clearly an inconvenient "workaround" for the problem. If I was on a desktop this might not bother me much, but my mic is integrated into my laptop so my typing and touchpad clicks get picked up and amplified right through my headphones (which is incredibly annoying, obviously). This is on a fairly fresh Fedora 14 install, but the problem started on 13. `lspci` and `alsa-info` report my sound card as:               00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)      and `lsmod` notes that the `snd_hda_intel` module is loaded. Has anybody experienced this before? Any helpful hints? It might very well be a simple solution, but I just can't seem to figure out what it is.


title: remove extra tilespace from a montage (ImageMagick) composite image?

text: I have a bunch of photos. They're all the same height, and I'm trying to put them together into a composite image using ImageMagick's montage program via Bash. The problem is that by default, the tile size (one image occupies one tile) is equal to the image with the largest dimensions. Narrow images, therefore, are surrounded by a lot of white space. I want to remove this white space. How can I do it?


title: How to run Different congestion control algorithms in FEDORA 17 ..?

text: Earlier versions of Fedora has different loadable kernel modules which includes diffrent congestion control algorithms etc at ( **/lib/modules/"kernel-name"/kernel/ipv4** ).These are present in the form of .ko files like **tcp_veno.ko , tcp_westwood.ko** . But when i started using **fedora 17** i found out that these modules are not present at the given location and i want to use different congestion control algorithms. **Please suggest me a way for using those algorithms in fedora 17. ??**


title: Simple "Variable" Bash File

text: So I just want to make a simple bash file, that takes a file name as a parameter. In that bash file, I want to take the name, before the extension, and have it as a "variable", to use in other places. For example, if I was to run `bash_script_name sample.asm`, the bash script would run:               nasm -f elf sample.asm     ld -s -o sample sample.o io.o      So basically the form of `bash_script_name $().asm`               nasm -f elf $().asm     ld -s -o $() $().o io.o      How ever you would do that in bash. I dunno, because I have almost no bash experience.


title: Task Switcher inside VNC

text: I run a VNC client (tightvnc) along with other applications on a Windows machine. Inside my VNC session, I typically have several xterms and gvim windows open. **How can I switch between the applications within VNC?** If I do ALT-TAB, that results in switching between the applications in Windows where the whole VNC is considered as a single application; I do not want that. Is there some way to configure some key bindings, any two/three keystroke is okay for me, to do the job?


title: The UEFI & SecureBoot impact, how severe?

text: I'm planning to buy a new laptop in the coming days, and I'm quite impressed with new, cool Ultrabooks. As a long-time GNU/Linux user, I'll of course install a distro of my choice on it. Chances are I'll have to buy a computer with Windows 8 pre-installed; and chances are it will run UEFI and have "secure boot", on which non-signed kernels won't boot. UEFI is probably good, BIOS may need to retire. I guess the hairy thing is _Secure Boot_. As far as I can understand, some trusted certificates will be embedded into firmware and so into the kernel _etc._. If the kernel's certificate can be traced back to either one of firmware's, the kernel will boot, else UEFI will tell me off and refuse to boot. This process will prevent uncertified software from booting. This may have benefits although I can't see them. I wonder how can an open source kernel obtain one of these keys and still be free. I have read a thread on Linux mailing list where a Red hat employee asks Linus Torvalds to pull a changeset which implements facility to parse PE binaries and take a complex set of actions to let kernel boot in Secure Boot mode (as far as I can understand). They want to do this because Microsoft only signs PE binaries. Mr. Torvalds has _kindly_ rejected this changeset, stating the kernel already implemets the standard, which is not PE. RedHat is trying to push this code to kernel so they won't have to fork it one day. See, this is a complicated thing. Let me ask my questions:   * What benefits will I gain with UEFI and Secure Boot, as a home user?   * How is this _signing_ done?   * Who can obtain signatures/certificates? Is it paid? Can it be public? (It should be available in the source code of Linux, doesn't it?)   * Is Microsoft the only authority to provide signatures? Shouldn't there be an independent foundation to provide them?   * How will this impact open source and free kernels, hobbyist/academic kernel developers _etc._. e.g. Will this boot (a very basic boot sector code):              hang:        jmp hang     times 510-($-$$) db 0     db 0x55     db 0xAA      A news item at this website was the inspration of this question. A Spanish Linux user group called Hispalinux has filed a complaint against Microsoft on this subject to Europan Comission. Should I be concerned? I reject to use neither proprietary software nor software signed by trusted companies. I have done so till now, and I want to continue so. Thanks in advance.


title: How do I redirect output to cd?

text: Is it possible to redirect a command's output to `cd`? For example, I searched for a directory using `locate` and got the path to it. Now, instead of writing a `cd` path, can I redirect the `locate` output to `cd`? I tried this:               $ locate Descargas | grep Descargas$     /home/oliver/Descargas     $ locate Descargas | grep Descargas$ | cd     $ locate Descargas | grep Descargas$ > cd     $ locate Descargas | grep Descargas$ < cd     /home/oliver/Descargas     $       No luck. This probably isn't particularly useful, but I'm curious.


title: How do I run a command on a TTY from a SSH session?

text: Does anyone know of a way that I could run a command from my ssh session and have it display on tty1? It seems like I could do that like: `script command >> /dev/tty1`. However, if I were to do that, and close my terminal it would kill the process wouldn't it? Any ideas? Thanks.


title: What does GID mean?

text: What does GID actually mean? I have Googled it and this is what linux.about.com said: > Group identification number for the process. Valid group numbers are given > in /etc/group, and in the GID field of /etc/passwd file. When a process is > started, its GID is set to the GID of its parent process.   * But what does that mean? The permissions I have for my folder is currently at `0755` I understand if I set the UID for the Owner it will be `4755` And if I set the GID of the Group it will be `2755` If I set the Sticky Bit for Others it will be `1755`   * Is it even important to set those permissions?


title: Is there a way to deactivate Buffer overflow protection on my machine?

text: I want to do some experiments with buffer overflows on my various virtual machines, including (but not limited to) Debian 6, Ubuntu 12.04, Fedora 16, but every time I try to execute the buffer overflow exploit I get the following message:               stack smashing detected (core dumped)      After doing my research I read that it is a feature called **buffer overflow protection** implemented in the compiler. **GCC** for instance uses **GCC Stack-Smashing Protector (ProPolice)** , **Clang/LLVM** uses **two buffer overflow detectors, SafeCode and AddressSanitizer**. My question is: Since I really want to check out buffer overflow attacks **_on my machines_** is there a way (a compiler flag, perhaps? a linux config file?) to deactivate the buffer overflow protection?


title: how do i redirect output from tailf & grep to a file

text: All I wanted is to grep for specific lines in an ongoing log and re-direct it to some file..               tailf log | grep "some words"      Now, I want the above command output to get re-directed to some file in on- going basis.... I tried,               tailf log | grep "some words" >> file      But that doesn't seem to work. What am I missing?


title: How to grep lines which does not begin with "#" or ";"?

text: I want to grep `smb.conf` and see only lines which are not commented.


title: Can virtfs/9p be used to share the same host folder with multiple guests?

text: So far I have resorted to sharing host folders with the KVM guests via Samba. Now, reading up a bit on it, it appears that "VirtFS (Plan 9 folder sharing over Virtio - I/O virtualization framework)" offers an easier way. However, I was unable to find on above linked page whether this method allows concurrent access to the same shared folder for multiple KVM guests.


title: Can virtfs/9p be used as root file system?

text: Is it possible to use a folder shared from the host to the guest via virtfs/9p as the root file system inside the guest? Loosely related to my previous question: Can virtfs/9p be used to share the same host folder with multiple guests?


title: Shell script to validate mount point status in the linux server

text: I'm in need of a script which should work as below. A script where it would validate if that specific mountpoint is currently mounted on the server. It would search for mountpoint name in `/etc/fstab` and then validate either from `df -h` output or `/proc/mounts` to check if its mounted on the server (if you have any better way to validate thats also fine). After reboot, in case it does not gets mounted it would trigger an email. For one server its okay but this is going to be used to validate more than 1000 servers so a script would be better solution. So the script would be executed on one server and it would check for mountpoint status in another 1000 server. Mountpoint in the server is in the name of `/mount1`, `/mount2`, `/mount3` etc. We need to validate this specific mountpoint name only, we can ignore other OS related FS. What I have so far:               #!/bin/bash          # Grep for word mountpoint name ie "mount"      awk '{print $2}' /etc/fstab | grep -i "mount" > mntpoint.txt     exec 3< mntpoint.txt          while read mount <&3     do     # Search for present mountpoint in file /prod/mounts.     # I'm using /proc/mounts here to validate          grep -iw $mount /proc/mounts > /dev/null          if [ $? -eq 0 ]     then         echo $mount "is mounted"     else         echo $mount "is not mounted needs manual intervention"     fi     done


title: How to install SUMO on Ubuntu 10.10

text: I want to install SUMO on Ubuntu 10.10: I followed sumo installation guidelines step by step: I installed packages necessary to build SUMO, I created a symbolic link `libgdal.so .` I decompressed the tarball and I moved the decompressed directory to `/usr/local/src` Then I entered the source directory and I called configure:               $ ./configure --with-fox-includes=/usr/include/fox-1.6 \     --with-gdal-includes=/usr/include/gdal --with-proj-libraries=/usr \     --with-gdal-libraries=/usr --with-proj-gdal      In the configuration step I had this               error: configure :error:gdal-lib not found in “/usr”


title: Memory usage command with syntax similar to the time command

text: What command shows the memory usage of a program, i am looking for a command that is simple to use and has similar syntax to the `time` command. I am trying to find the memory usage of a md5 hashing program that is written in C and takes 7 seconds to hash "hello world" . I am using the android operating system with busybox installed.


title: debian/watch for Fedora

text: How do Fedora maintainers track new versions of upstream package sources? Is there anything like debian/watch in the Fedora/Red Hat world?


title: USB mouse not working

text: Every time I plug in any wired mouse recently, I get similar to the below on `VCS1`: > [1443270.286164] usb 6-1: new low-speed USB device number 15 using uhci_hcd   >  [1443270.454270] usb 6-1: New USB device found, idVendor=045e, > idProduct=0083   >  [1443270.461874] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=0   >  [1443270.469328] usb 6-1: Product: Basic Optical Mouse   >  [1443270.476877] usb 6-1: Manufacturer: Microsoft   >  [1443270.501140] input: Microsoft Basic Optical Mouse as > /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input26   >  [1443270.509327] hid-generic 0003:045E:0083.000F: input,hidraw0: USB HID > v1.10 Mouse [Microsoft Basic Optical Mouse] on usb-0000:00:1d.0-1/input0 .. but no mouse functionality. The last time I spent some trying to solve this, the final line that is now missing from the above, was `No input driver specified, ignoring this device` I haven't tried a computer reboot, because I am interested in using this opportunity to become more acquainted with the mouse subsystem(s) of Linux. Found Restart usb mouse driver? while writing up this question, but not sure how to try steps 2 & 3 of what this OP tried (Have restarted X, however - No change). What should I look at next?


title: What is the difference between RGB and YCbCr?

text: In my Linux Mint ATI Catalyst setup I have set YCbCr as default for **Color Pixel Format**? What is the difference? I subjectively think that RGB (Full RGB) is better for my eyes. YCbCr seems to be more blurry and my eyes have problem to focus and are tired sooner.


title: Effect of static and dynamic linking on start address

text: I have a simple C program. I run:               $ gcc Q1.c -Wall -save-temps -o Q1      Then I inspect the executable generated:               $  objdump -f Q1     Q1:     file format elf32-i386     architecture: i386, flags 0x00000112:     EXEC_P, HAS_SYMS, D_PAGED     start address 0x080483b0      Then I compile it with static linking:               $ gcc Q1.c -Wall -save-temps -static -o Q1      and inspect the file again:               $ objdump -f Q1     Q1:     file format elf32-i386     architecture: i386, flags 0x00000112:     EXEC_P, HAS_SYMS, D_PAGED     start address 0x08048e08      What effect does static and dynamic linking have on the start address of the program? The start address is the address of `main()`, right?


title: CentOS on HyperV - eth0 not in ifconfig?

text: I've launched a _CentOS_ install in HyperV and assigned a NIC the same way I've done on an _Ubuntu_ VM, however, the device simply isn't picked up. Only my loopback is found by `ifconfig`. How should I go about trouble shooting this?


title: How to install StackApplet on Debian?

text: I would love to install StackApplet on Debian 6.0.2! I downloaded 'stackapplet_1.4.0_all.deb' and ran following command:               root@debian:/home/dagrevis/Downloads# dpkg -i stackapplet_1.4.0_all.deb      Selecting previously deselected package stackapplet.     (Reading database ... 132125 files and directories currently installed.)     Unpacking stackapplet (from stackapplet_1.4.0_all.deb) ...     dpkg: dependency problems prevent configuration of stackapplet:      stackapplet depends on python-appindicator; however:       Package python-appindicator is not installed.     dpkg: error processing stackapplet (--install):      dependency problems - leaving unconfigured     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Errors were encountered while processing:      stackapplet      I guess that I don't have 'python-appindicator'. I searched for it, but, unfortunately, I couldn't find it. P.S. I am using Gnome and that shouldn't be a problem...


title: Windows Boot Configuration Data (BCD) viewer for linux

text: Is there such a thing as a Windows Boot Configuration Data (BCD) viewer for Linux? I understand that BCD files are 'like registry hives' and tools exist to read registry hives for Linux. Is there a way to see the contents, the list of partitions etc, that a BCD file contains? It used to be easy with `boot.ini` files but not anymore! My use case is this: I have a hidden partition that is not accessible from Windows (it's a system partition) and I want to read the BCD file it has. On the same system, both that partition and the Windows boot partition have boot managers and BCD files and I'm trying to sort this out (and dual-boot Linux eventually).


title: Creating a boot splash screen

text: I've been designing a Linux distro and trying to incorporate a nice user experience into it in the form of pleasing art and an interface that won't confuse or overwhelm first-time Linux users. The problem I'm working on now is attempting to bring up a loading screen during boot process that either has a progress indicator or a "dummy" progress bar ala Windows XP-just something that moves to ensure the user that the system hasn't forgotten about them-and that the user can escape out of by hitting a certain key. I've already created one and I'm looking for the next step in including it in the distro. I've already tried:   * **splashy** - Doesn't work with the current kernel. At all.   * **MPlayer with `-vo directfb` via DirectFB** - May work in the long run, but DirectFB seems to both produce a garbled image and overload the framebuffer and making the console unresponsive. Plus, it's not as modular as I'd like (how to signal that it's finished loading?). I'd rather not have to patch the kernel (like the abandoned boosplash project does), as this tends to break horribly when a new kernel version comes out. Also, from what I've seen, kernel-modifying projects tend to be difficult for developers to maintain for that reason, resulting in a high project- abandonment rate. To get to the point, my question is this: **Can you recommend a good bootsplashing utility that can do what I just described?** I'm using Linux 2.6.38.7 and basing the distro on Slackware 13.37.


title: How to pipe output from one process to another but only execute if the first has output?

text: How can I rewrite this command to only email if there is output from the `mailq | grep`?               mailq | egrep 'rejected|refused' -A 5 -B 5 | mail -s 'dd' email@email      Is this even possible on one line?


title: rsyslog - action AND action

text: I want to create rule to send data from `facility` to file _AND_ to **MySQL** database. How it can realized? Only by adding second line like:               syslog.*                         /var/log/syslog.log     syslog.*                         :ommysql:localhost,database,user,password      Or there is some more correct way?


title: ssh from host to guest using qemu

text: How do I setup ssh from the host to the guest using qemu? I am able to use port redirection when I boot the VM without any special parameters, as follows:               /usr/bin/qemu-system-x86_64 -hda ubuntu1204 -m 512 -redir tcp:7777::8001      But when I try to boot using the following:               /usr/bin/qemu-system-x86_64 \     -m 1024 \     -name vserialtest \     -hda ubuntu1204 \     -chardev socket,host=localhost,port=7777,server,nowait,id=port1-char \     -device virtio-serial \     -device virtserialport,id=port1,chardev=port1-char,name=org.fedoraproject.port.0 \     -net user,hostfwd=tcp:7777::8001      I get the following error and the VM does not boot:               qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: invalid host     forwarding rule 'tcp:7777::8001'     qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: Device 'user'     could not be initialized      Please note that I am able to boot the VM without the `-net` parameter without any issues, however, I want to setup ssh from the host to the guest. ssh from guest to host works fine as expected. ### Edit I have tried using               -net user,hostfwd=tcp::7777-:8001      as well as               -net user,hostfwd=tcp::7777:8001      but still the error persists and the VM does not boot.


title: Debian Wheezy subnet configuration (proxy, MASQUARADing etc.)

text: I have a "server" with eth1 having a full IP address, DNS, gateway and proxy name connected to the university internet/intranet provider and eth0 IP 192.168.1.2 connected by a gigabit switch with two "nodes" 192.168.1.3 and 192.168.1.4. All three running the latest full Debian Wheeze installation from DVD with all components available. I have configured this subnet using "interfaces" file using only static IP addresses and netmask like this               iface eth0 inet static     address 192.168.1.2     netmask 255.255.255.0      with extra set of parameters for eth1 on "server" which is able to access internet through this card. I can not arrange an internet access for the "nodes" through "server's" eth1 using iptables or any other tools available for look up on the Internet. Any help with complete script example using iptables and/or additional features/lines to introduce to the interfaces files on two "nodes" taking into account all these proxy and fixed university ipadress configurations for the outer network on eth1? SSH is working just fine on this subnet. My "server" can access Internet as well. I'm reading this tutorial. May be I misconfigured all these DHCP, NSF, NAT etc though I've never touched them directly and SSH is working just fine across this subnet.


title: Why can't I pgrep a process?

text: $ ps aux | grep -i ssh     USER      4364  0.0  0.0   9004  1032 ?        Ss   12:20   0:00 ssh -v -fND localhost:4000 USERNAME@SERVER-IP-ADDRESS          $ pgrep localhost:4000      Why doesn't this work?


title: Is there any command-line, generic HTTP proxy (like Squid)?

text: I can easily use Netcat (or, Socat) to capture traffic between my browser and a specific host:port. But for Linux, does there exist any command-line counterpart of a Squid-like HTTP proxy that I can use to capture traffic between my HTTP client (either browser or command-line program) and any arbitrary host:port?


title: In GNOME 3, how does one assign keyboard shortcuts for applications besides the default applications?

text: In GNOME 3, there's a facility to assign keyboard shortcuts for applications like your default browser, default email client, default terminal etc. How do I do this for other applications?


title: Retrieve deleted files on Linux VM guest

text: I use Ubuntu on VMware to learn how to use Linux. I used `rm` on some folders and mistakenly deleted some files from `/etc`. I have some very important files on it. Is there a way to retrieve that files, for example using Knoppix? If yes, how I can do it?


title: Problems in installing firefox 23 on centos 6.3 ( libpangoft2-1.0.so.0)

text: XPCOMGlueLoad error for file /home/xd/firefox/firefox/libxul.so: libpangoft2-1.0.so.0: cannot open shared object file: No such file or directory Couldn't load XPCOM. I cannot find a way to install libpangoft2-1.0.so.0 After searching, it _seemed_ to me that the library will be in the pango package. Accordingly, I tried yum install pango but get this Package pango-1.28.1-7.el6_3.x86_64 already installed and latest version Nothing to do How do I get this installed. PS: It is surprising that centos 6.3 needs to be upgraded to install firefox 23. I had to install libstdc++.i686, dbus-glib.i686 and it seems I have to install some more to get this browser to work. Same results with chrome


title: Difference between urxvt -e and xterm -e

text: Create an executable file `file1` as follows:               cat > file1 <<EOF     #!/bin/bash     mutt -e "push '<'"     EOF     chmod +x file1      Running `./file1` in an existing terminal executes mutt and select the first message (this is what the command `<` does). Running `xterm -e ./file1` opens xterm, runs mutt and selects the first message. However, running `urxvt -e ./file` opens urxvt, runs mutt but selects the _last_ message (the default in the absence of the "push '<'" directive). Any ideas about why `urxvt -e ./file1` behaves in this specific way? * * * Further clues: With the following file, `xterm -e ./file2` and `urxvt -e ./file2` both result in the intended behavior.               cat > file2 <<EOF     #!/bin/bash     echo foo     sleep 1     mutt -e "push '<'"     EOF     chmod +x file2      The following file still results in the intended behavior with xterm, but I've seen `urxvt -e ./file3` result in both behaviors nondeterministically.               cat > file3 <<EOF     #!/bin/bash     echo                   mutt -e "push '<'"      EOF     chmod +x file3      Testing with `gnome-terminal` yields the same behavior as `xterm`, so it seems like something is wrong with `urxvt`, but I was not able to reproduce such differences in behavior with anything other than mutt. What the hell is going on here?


title: Black screen after GRUB

text: I recently bought a new laptop which came preinstalled with Windows 8 (no! please don't run away yet!). I'd like to try and put Linux on it in a dual boot (probably Ubuntu, with its UEFI support), but before that I'd like to make a system image with Clonezilla in case I mess up, or in the more likely case that UEFI causes something else to mess up. Te problem is that when I put the Clonezilla CD in the drive and reboot, I get its GRUB menu, but after selecting an option the screen just goes black and stays that way. It still responds to a CTRL+ALT+DELETE at that point. I tried both stable-amd64 and alt-stable-amd64 to no avail. I have also tried 800x600, 1024x768 and safe graphics mode. I have secure boot disabled. The system is an MSI GP60 2OD. Any help would be appreciated. ## Update It would appear that this problem not only occurs when trying to boot Clonezilla, but with _any_ Linux-based system. It simply won't boot. * * * The only thing I notice is the orange light that indicates NVidia Optimus is using the NVidia GPU (or in Windows, that's what it indicates, anyway). Also, the fans get louder and the air coming out of the side gets hotter. The system is not completely frozen, seeing as pressing the power button, CTRL+ALT+DELETE or the fan boost button still does what I'd expect it to do. * * * I can boot a Linux live CD when I put UEFI into Legacy mode, but then I can't boot Windows, and I need them both. * * * ## Update I managed to install elementary OS (based on Ubuntu 12.04) in Legacy mode, installing the boot loader on the root partition (`/dev/sda9`) to avoid it completely messing up the Windows boot loader. At the end the Windows boot loader still got messed up, but I managed to restore it. Now, when I put UEFI in Legacy mode, it doesn't find an operating system. And when I put it in UEFI (with CSM) it boots Windows 8.1. I tried adding an entry for elementary OS in the Windows boot loader with EasyBCD, but to no avail (the option appears in teh boot loader, but it just shows me an error about some file missing or being corrupted). Can anyone tell me if there's any way for me to add elementary OS to the Windows boot loader? Other options are welcome, too. Although this would be the preferable scenario because I would get to keep Fast Boot. * * * ## Specifications **MSI GP60-2OD**   Intel Core i7-4700MQ   NVidia GeForce GT 740M ( **Optimus** )


title: Issues accessing CIFS share directories

text: **Disclaimer 1:** _Crossposted from Serverfault because there was no activity over there._ **Disclaimer 2:** _This question is similar toAutomounting not working correctly for CIFS shares; weird results but not exactly the same._ **The Setup:** Running CentOS most recent stable (6.4) connecting to CIFS share from EMC VNXe SAN. Using AutoFS configured using this method: http://www.fedoraforum.org/forum/showthread.php?t=240811 Synopsis of config: >   1. Install autofs > >   2. Comment out entire /etc/auto.master > >   3. Create new /etc/auto.cifs file with contents similar to auto.smb (full > contents at link above) > >   4. _chmod 755 /etc/auto.cifs_ > >   5. Add line /etc/auto.master: _/mnt /etc/auto.cifs --timeout=0_ > >   6. Create file /etc/auto.smb.fileserver01 with credentials: > username=domain/username password=password (also tried without domain, exact > same symptoms) > >   7. _chmod 400 /etc/auto.smb.fileserver01_ > >   8. Add fileserver01 to /etc/hosts > > I have supplied AutoFS with a full Domain Admin account for initial build and testing. **The Problem** The CIFS share mounts in _/mnt/fileserver01_ and I can see the contents of the share's root directory, but when I try to navigate inside any of the directories I receive the message: > bash: cd: /mnt/fileserver01/sharename: No such file or directory There aren't any particular errors showing up inside _/var/log/messages_. _Note: I'm new to Linux server administration, dusting off 10-year-old weekend classes in Debian CLI, so for answers and questions please be explicit in what I need to enter into the terminal._


title: Can <Location /> be for multiple virtual hosts in httpd.conf?

text: I have 5 virtual hosts in `httpd.conf`. All of them have the configuration below except for one.               <Location />         Order Deny,Allow         Deny from all         Allow from IP.ADDRESS.GOES.HERE     </Location>      I think it would be better to tell all virtual hosts to have this except for one. Currently, I am telling each virtual host one by one to have this. Is there a wild card method to apply this setting to all virtual hosts and then remove this stanza from one of the virtual hosts in `httpd.conf`?


title: What is type 'none' for mount points and why are mount points of the same type below /run?

text: In Ubuntu 14.04 when executing command mount I get following excerpt               tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)      I do not understand why subdirectories of `/run` are mounted separately inside already mounted parent directory (`/run`) and what `none` filesystem means. My `/etc/fstab` file is empty.


title: /etc/sysctl.conf Fedora {17-20}?

text: Since Fedora 16 or 17 there no longer file `/etc/sysctl.conf`. How do I setup `net.ipv4.ip_forward = 1`?


title: Convert xml subtitle file to srt format

text: I have a xml subtitle that looks like this:               <?xml version="1.0" encoding="utf-8" ?><transcript>       <Item from="1.16" duration="4.68"><![CDATA[(Dong-hyuk is coming     to see you now.)     ]]></Item>       <Item from="5.92" duration="1"><![CDATA[It's cold.     ]]></Item>       <Item from="9.04" duration="2.88"><![CDATA[- Hello.     - Hello.     ]]></Item>       <Item from="12.2" duration="1.76"><![CDATA[You're busy as always.     ]]></Item>       <Item from="14.04" duration="3.48"><![CDATA[Look what I have here. Ta-da!     ]]></Item>       <Item from="18.88" duration="1.5599999999999998"><![CDATA[Let me give it to you.     ]]></Item>       <Item from="20.919999999999998" duration="2.8"><![CDATA[I'll give you     the most valuable present...     ]]></Item>     </transcript>      It seems that `"]]></Item>"` always spreads to a new line. Would there be a way to convert this to srt format?


title: Search in mutt by date and time

text: I've been using `mutt` for some days now, and I think I have the basics by now. I'm able to search messages by date (`l`, `~d date ...`) but what I need is to also search by time. Is it even possible?


title: What does this regex mean?

text: I was working on the conversion of Unix newline to Windows newline. I tried to unix2dos but it gave me some binary error, so I looked it up and stumbled upon this regex               sed 's/$'"/`echo \\\r`/" input.txt > output.txt This regex is working but I have got no clue, how is it working? Obviously I am trying to interpret it through this form               sed 's/a/b/' Here > a refers $'" which I don't understand.   >  and b refers `echo \\\\\r` which means '\r' Also I don't understand why/how combination of single and double quote is being used? Can anyone explain this regular expression to me?


title: Searching multiple mysql tables for the same 2 fields in each table

text: I am trying to figure out how to search mysql tables for the same 2 fields. What I have is 2 tables in the same database. Below is what I have currently:- single search works ok               SELECT *  FROM `table1` WHERE `acked` != 1 AND `host_status` = 'HOSTDOWN'      returns results which is good and expected. Whereas trying to combine the 2 tables searching for the same although it does not error up, but at the same does not return any results which I can kind of understand as I am using 'AND'               SELECT `table1`.*, `table2`.*     FROM table1, table2     WHERE (`table1`.`acked` != '1' AND `table1`.`host_status` = 'HOSTDOWN')     AND (`table2`.`acked` != '1' AND `table2`.`host_status` = 'HOSTDOWN')         But if I use the following using 'OR' I get results but not the expected results, I also get the acked value of 1 and 0 but with the host_status of HOSTUP               SELECT `table1`.*, `table2`.*     FROM table1, table2     WHERE (`table1`.`acked` != '1' AND `table1`.`host_status` = 'HOSTDOWN')     OR (`table2`.`acked` != '1' AND `table2`.`host_status` = 'HOSTDOWN')        any pointers?


title: 'setfacl' permissions don't apply to directories created by git clone?

text: Here's how I am setting permissions for my website's root directory i.e. `~/public_html`, where the files that my website serves are placed:               sudo chgrp -R www-data ~/public_html     chmod g+s ~/public_html     chmod g+rwx ~/public_html     setfacl -m d:g:www-data:rwx ~/public_html        * **Command #1** gives "www-data" group ownership access to `~/public_html`;   * **#2** sets the group ID, so that all new directories/files within are also owned by "www-data" group   * **#3** sets access permissions for the group "www-data" on the directory to 775;   * **#4** makes sure that the same apply to all new directories/files created within `~/public_html`. It's working great, as it should. All new created directories and files inherit the forced permissions. The problem is with directories created by `git clone` (after I do `cd ~/public_html && git clone ....`). **UPDATED:** The directory **DOES** inherit the group ID (i.e. "www-data" owns the newly created directory), **BUT NOT** the access permissions (775 for directories and 664 for files). Also, it's just the top-level directory that git creates. Every directory and file withing inherit permissions just as they should. Could it be that the Debian git package doesn't have the fix for this bug yet? What am I doing wrong? Rather, how exactly should I be doing it?


title: how to upgrade software/program in fedora

text: I have valgrind on my computer which is with fedora OS. But it is with a old version. I want to upgrade it to a new version. my system is fedora 16. valgrind version: 3.6.1. I want to upgrade it to 3.8.1. It was installed by SA. I don't know how they installed it how to upgrade it?


title: exiting from webbrowser on debian(without GUI)

text: I fired up Debian 64 bit on a virtual machine and I did not download the GUI package.(partly because it took just too much time and partly because i wanted to experience the command line!). Anyway, I am here and then I go into python and do this:               >>> import webbrowser     >>> webbrowser.open('www.google.com')      And Now I am looking at a coloured(text only) page of Google like so: ![](http://i41.tinypic.com/2uy4won.png) I can see two text fields here. I wanted to ask the following two questions:   1. where do I enter the search thread?   2. How do I exit this so as to go back to the command line? **please** help me with this query. (P.S.: I am loving the command line and really think that the people who created programs on this were the real programmers. They could not run the program they write the thousands of time that we do now for debugging and at the same time created great applications. Hats off to those guys!)


title: How do I delete a file whose name begins with "-" (hyphen a.k.a. dash or minus)?

text: How do you remove a file whose filename begins with a dash (hyphen or minus) `-`? I'm ssh'd into a remote OSX server and I have this file in my directory:               tohru:~ $ ls -l     total 8     -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help     ...      How in the world can I delete `\--help` from a CLI? This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of. I have tried using backslash               rm \-\-help      I have tried quotes               rm "--help"      How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


title: How do I delete a unfortunately named folder?

text: In an unfortunate series of events, I happened to create a folder named `\--bindir=`. Thing is, I cannot `cd` to him because when I try to `cd` I get this message:               bash: cd: --: invalid option     cd: usage: cd [-L][-P [-e]]] [dir]      I also get similar messages for other binaries I am executing with that as a parameter, e.g `rm -rf`, `rmdir`, `ls` etc. I know this sounds funny, and like those epic fail stories, but I would be glad if you could propose a fix, because I'm all out of them. As a post of proof that I am not trolling or anything, here is a picture of that epic fail: ![enter image description here](http://i.stack.imgur.com/F59yH.png)


title: Linux Rename File Beginning with "--"

text: > **Possible Duplicate:**   >  How do I delete a file whose name begins with "-" (hyphen a.k.a. dash or > minus)? This is an awkward one, I have received some files from a windows machine which have been named things like               "----index.html"      When I try to grep hello * in a directory containing these files I get grep errors and when I try to mv ----index.html index.html there are similar errors:               mv: unrecognized option '----index.html'     Try `mv --help' for more information.      Can anyone shed any light on this? Thanks


title: How can I create a empty file whose name begins with a dash?

text: How can we create a empty file with the unix name `-stuff`. It means the name start with `-`. I tried with `touch -stuff` but it didn't work.


title: Handling an option-like filename in the shell

text: > **Possible Duplicate:**   >  How do I delete a file whose name begins with "--"? Due to mismatched switches when I was trying to run a command, I have a log file named `-w` in a directory. I want to see its contents with `cat` (or `less`) and then delete it. I've tried escaping it with backslashes, single-quotes, double-quotes, parentheses, and backticks, but `cat` always complains that `w` is an unknown option. How can I properly reference this file?


title: Why do many CLI apps take a single “--” argument?

text: > **Possible Duplicate:**   >  What does “--” (double-dash) mean? There are many command line tools that take a single "--" argument. For example:               gem install mysql -- —–with-mysql-config=/usr/local/mysql/bin/mysql_config      It seems to be used as some kind of separator. Does it have a special meaning? Is it a commonly used idiom? If so, what's its purpose? PS: I'm not talking about arguments of the form `\--argument`, I'm talking about when you have a `\--` followed by white characters and other arguments.


title: How can I remove a file called "--help" with bash command line?

text: I've somehow managed to create a file with the name "--help". If I try to remove the file using "rm" funny stuff happens. Please help here's a printout of the dir listing:               [pavel@localhost test]$ ls -la     total 3640     drwxrwxr-x.  5 pavel pavel    4096 Jun 19 18:33 .     drwxrwxr-x.  6 pavel pavel    4096 Jun  9 12:23 ..     -rw-rw-r--.  1 pavel pavel 1070592 Jun 12 09:40 --help


title: What does - mean with association to Linux files and directories

text: > **Possible Duplicate:**   >  What does “--” (double-dash) mean? What does '--' (two dashes) mean with association to Linux files and directories. I've found something else but not too sure if it is correct and relates to the same thing. "Another convention is to use '--' (two dashes) to indicate the end of flags, and the beginning of file names."


title: deal with file names with "-" as beginning on linux

text: > **Possible Duplicate:**   >  How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or > minus)? I'm using linux I have some files with file names like               -0fdlfld     -xfifd      I want to delete them using shell "rm" but it doesn't work are there anyways to deal with such file names? thanks!


title: What does "--" mean in Linux/Unix command line?

text: > **Possible Duplicate:**   >  What does “--” (double-dash) mean? `git diff [options] [<commit>] [--] [<path>…]` In here, how should I understand what [--] means? And when should I use it.


title: What good are the signs '-' (minus) in any Linux/UNIX commands?

text: > **Possible Duplicate:**   >  What does "--" (double-dash) mean?   >  Single dashes `-` for single-character options, but double dashes `\--` for > words? I was reading the man zip page and I found this examples: [...] using the command **unzip -p backup | tar xf -** When [...] For example, **tar cf - . | zip | dd of=/dev/nrst0 obs=16k** is equivalent to **tar cf - . | zip - - | dd of=/dev/nrst0 obs=16k** I' like know the minus utility of these cases. Why two minus signs are written in the third case?


title: zip a directory that name start with `-`

text: How can I zip a directory like `-foo`? `$ zip "-foo" "-foo"` shows only help page. I think `-foo` is recognized as a options, but I don't know how to solve it.


title: how to remove a file named "-f" from the command-line?

text: Here are some options a) rm -f b) rm "-f" (double quotes) c) rm '-f' (single quotes) d) all of the above e) none of the above


title: What does "--" (double-dash) mean? (also known as "bare double dash")

text: I have seen `\--` used in the `compgen` command. For example:               compgen -W "foo bar baz" -- b      What is the meaning of the `\--`.


title: Why cat, grep and other commands can't understand files starting with minus sign?

text: If I have a file which name starting with single or several minus sign, for example `\--1` it can't be used as a parameter of many commands. Even if I run               cat --1      instead of file content I get unrecognised option error message:               cat: unrecognized option '--1'      Same effect appears when I type               cat "--1"     cat '--1'     cat \-\-1      nothing works. Files starting with '-' is not illegal in file system, but it is quite hard to work with them in cli and scripts. OK, in case of `cat` or `grep` I can use               cat <--1      and this will work, but               rm --1      won't work either and it is quite hard to substitute this command with something else. Very uncomfortable after all. Is there any universal workaround different from not using such file names? BTW, if name file is single `-` and all most of commands will understand it as `stdin`, wouldn't they? And it would be hard not to use such file names since I can't rename them all in script using `mv` command either.


title: Why do we use double hyphen in "tar --anchored" and single hyphen in "tar -b"?

text: Why do we use double hyphen in `tar --anchored` and single hyphen in `tar -b`? I mean to say why some command line options have single hyphen (-) while some others have double (--)? Also a `git` example:               git commit --amend     git commit -a


title: delete file with name --help.tgz

text: I have file with name `\--help.tgz`. I want to delete but don't know how. I tried `rm "--help.tgz"`, `rm \\-\\-help.tgz` and it did not work. How can I delete a file with such name?


title: How to remove/rename file which contains special character eg. "-x" using command line

text: > **Possible Duplicate:**   >  What does “--” (double-dash) mean? Can anybody explain me below things i have file named "-xyz". if i try to remove or move that file using command line , it's unable to move. i tried below things :               [rahul@srv100 ~]# ls -lrt  -- "-xyz"     -rw-r--r-- 1 rahul rahul 0 Dec 19 08:06 -xyz     [rahul@srv100 ~]# mv "-xyz" xyz     mv: invalid option -- x     Try `mv --help' for more information.     [rahul@srv100 ~]# mv \-xyz xyz     mv: invalid option -- x     Try `mv --help' for more information.     [rahul@srv100 ~]# mv -\xyz xyz     mv: invalid option -- x     Try `mv --help' for more information.     [rahul@srv100 ~]# mv '-xyz' xyz     mv: invalid option -- x     Try `mv --help' for more information.      finally i rename that file using winscp, and after trying multiple ways i got one option and it's working.               mv -- '-xyz' xyz      Wish the help of "--", i created file/directory as below               mkdir -- --abc     touch -- -xyz      So my Question is what is this "--" in bash ? Please explain.


title: Single dashes `-` for single-character options, but double dashes `--` for words?

text: Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used? For example if I type in `ls --help`, you see:                 -a, --all                  do not ignore entries starting with .       -A, --almost-all           do not list implied . and ..           --author               with -l, print the author of each file       -b, --escape               print octal escapes for nongraphic characters           --block-size=SIZE      use SIZE-byte blocks       -B, --ignore-backups       do not list implied entries ending with ~     ...      I tried googling `\- and -- convention` even with quotes with little success.


title: How can I grep through files whose name begins with `-`?

text: I've tried this.               grep -r thanks *                                      slave-iv     grep: invalid option -- '@'     Usage: grep [OPTION]... PATTERN [FILE]...     Try `grep --help' for more information.      Here's what the directory looks like. They're log files from pidgin.               ls -1     -100000139702926@chat.facebook.com     -100001138571192@chat.facebook.com     -1021869012@chat.facebook.com     -12120618@chat.facebook.com     -1251570038@chat.facebook.com     -1269333626@chat.facebook.com     -1394365872@chat.facebook.com     -1657581332@chat.facebook.com     -211203163@chat.facebook.com     -505152641@chat.facebook.com     -549333601@chat.facebook.com     -557177029@chat.facebook.com     -573222477@chat.facebook.com     -584051302@chat.facebook.com     -65000319@chat.facebook.com     -663869224@chat.facebook.com     -664953132@chat.facebook.com     -755682783@chat.facebook.com


title: Accidently created a file called -X, how can I delete it?

text: > **Possible Duplicate:**   >  How do I delete a file whose name begins with "-" (hyphen a.k.a. dash or > minus)? Like an idiot, I ran this command:                   tar -cf -X awstats-icon icon tarfile.tar .      I was trying to use the -X switch to exclude awstats-icon and icon directories. Now I have a large file named -X and I cannot seem to delete it. I tried using:                   rm -X         rm `-X`         rm '-X'      However none of these have worked. Any suggestions?


title: SSH will not make a local connection without password prompt

text: While trying to set up a loop back ssh I am getting prompted for a password after a pub key install, this is a CentOS 6.4 server. ssh_config (`grep -v ^# /etc/ssh/sshd_config | grep -v ^$`) is here: http://pastebin.com/Wg6iuL3x The two users involved are root and git               # clean root dir     cd ~/.ssh/ && rm -f $(ls | grep -i 'rsa\|dsa')     echo '' > known_hosts          # clean git dir     /home/git/.ssh/ && rm -f $(ls | grep -v 'authorized_keys')     chmod 0700 /home/git/.ssh && chmod 0600 /home/git/.ssh/authorized_keys     echo '' > authorized_keys          # back to root     ssh-keygen -f ~/.ssh/git_dsa -t dsa -N ''     cat ~/.ssh/git_dsa.pub >> /home/git/.ssh/authorized_keys          ssh -vvv git@localhost     git@localhost's password:      ...      Here's the `-v` log               debug1: Next authentication method: publickey     debug1: Offering public key: git.rsa     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Offering public key: git.dsa     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Trying private key: /root/.ssh/identity     debug1: Trying private key: /root/.ssh/id_rsa     debug1: Trying private key: /root/.ssh/id_dsa     debug1: Next authentication method: password      The `-vvv` log is here: http://pastebin.com/j7iGvvMH **NOTE** this does not look like its seeing/recognizing the git_dsa.pub key, I'm sure that is the root of the problem?


title: Change permissions for LEDs (e.g. ThinkLight) with udev

text: /edit/ Getting the question more generic: **How can I change the permissions to alter the state of a LED/light using`udev`?** \edit\ * * * I've got a Thinkpad and would like to use the ThinkLight (the white flash light above the screen designed to light up the keyboard) for notifications on incoming Jabber messages. It is easy to realise as one only needs to change `/sys/class/leds/tpacpi::thinklight/brightness` to 255. I'll do it with a simple Bash script, which will let the light blink for three times. But to be able to do this, I need to change the permissions, that not only root is able to change this file.   And I do not want to `sudo chmod o+w /sys/class/leds/tpacpi::thinklight/brightness` after each and every boot. I think, the best solution is using `udev` for this. However, I've never used `udev` before and I'm quite confused by the tutorials I found online. I tried this `udev` rule:               KERNEL=="tpacpi::thinklight", MODE="0666"      as well as               KERNEL="thinklight", MODE="0666"      But it does not work. Though I'm not getting errors while running `udevadm test /class/leds` Thanks for any help and hits. Or maybe other solutions.


title: Install Linux on two hard drives

text: I am new to Linux. I have a machine with two hard drives, the first one has 80GB and the second has 120GB. I am about to format this machine and install Linux. I want to install all the main partitions (`/`,`/boot`,`/usr/`, etc..) on the first HD (`sda`) and mount the `/home` and `/var` partition on second disk (`sdb`). Is this possible by specifying the partitions manually (if so, how?) or is this done automatically? I am installing Ubuntu 12.04. Also, I won't do it but there is any problem to place `/boot` on the second HD?


title: How do I hide grub boot menu unless shift is pressed?

text: I've read the forum but it seems my grub boot menu doesn't follow the form of the config file. I would like the menu to not appear unless `Shift` is pressed. My grub menu appears every boot and stays there until you select a menu item. My current `/etc/default/grub` is:               GRUB_DEFAULT=0     GRUB_HIDDEN_TIMEOUT=3     GRUB_HIDDEN_TIMEOUT_QUIET=true     GRUB_TIMEOUT=0     GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomdmonddf nomdmonisw"     GRUB_CMDLINE_LINUX=""     GRUB_FORCE_HIDDEN_MENU="true"     export GRUB_FORCE_HIDDEN_MENU      (I've tried the `true`'s with both quotes and no quotes, it makes no difference) I've also done `update-grub` and `update-grub2`. Can anyone please tell me why, when my system boots, it just sits at a Grub menu? It's a headless system which isn't good as I have to add a keyboard to get it to reboot. This is not a dual-boot system.


title: How to disable emacs here document completion

text: When editing a bash script file with emacs, and trying to enter `<<<`, at the second `<` emacs insert a template for a here document, like in the following example:               <<EOF          EOF      This is not the desired output, because I would enter a literal `<<<`. For the moment I resort to entering `< < <`, and then deleting spaces, but I prefer to being allowed to enter it directly.


title: Before mounting an NFS share, can the NFS client know if it's NFS v3 or v4?

text: The mount command in linux requires -t nfs4 in order to mount version 4 NFS shares, so I need to know beforehand which version it is.


title: Linux snapshotting issues

text: Is there any way to deal with incoming writes while a backup is in progress in linux. Example, you are writing to your sql database and lvm snapshotting at the same time. This will result in corrupted data because the snapshot will include only parts of that write. VSS gets past this problem with having all services get to a clean state before snapshotting. I don't see of any real solution in Linux.


title: How to make a TCP socket time out

text: For network catastrophe simulations of our server environment, we are looking for a way to intentionally timeout a TCP socket. Are there any simple ways for existing sockets? Also, little C test-case program would be a plus. We have already tried putting down network interfaces during TCP buffer reading, and reading from disconnected mounted resources (samba). Out test server is Ubuntu 12.04.4.


title: Bash config files being read in contradiction to `man bash`

text: While trying to determine the differences between `.bashrc` and `.bash_profile` I notice that `.bashrc` is never read, and that `.bash_profile` is only read from SSH, but not from PHP. This seems to contradiction to the information in `man bash`. Could someone explain to me why this works as it does? The server seems to be a CentOS 5 variant.               local$ ssh user@server     Last login: Wed Jan 23 23:21:23 2013 from 1.2.3.4          $ cat .bashrc     alias br='echo fromBR'     $ cat .bash_profile     alias bp='echo fromBP'          $ br     -bash: br: command not found     $ bp     fromBP          $ cat public_html/bashtest.php      <?php     echo "hello\n";     echo shell_exec('bp');     echo shell_exec('br');     ?>     $ php public_html/bashtest.php     hello     sh: bp: command not found     sh: br: command not found          $ wget server/bashtest.php     23:35:13 (759.55 KB/s) - `bashtest.php' saved [7/7]     $ cat bashtest.php      hello!      So it seems that `.bashrc` is never read and `.bash_profile` is only read from the CLI (not from PHP either on the user's CLI nor through Apache). Furthermore, through Apache the "command not found" text isn't even returned! Is this expected behaviour (i.e. am I misinterpreting `man bash`) or is something amiss?


title: How to get the PID from a spawned process in expect?

text: Example: In a shell script I open a SSH tunnel whit this:               /usr/bin/expect <<EOD     set timeout -1     spawn ssh -fNL localhost:1873:localhost:873 HOST     expect "*?assword:" { send "$SSHPASS\r"}     sleep 2     exit [exp_pid]     EOD          export SSH_PID=$?     echo $SSH_PID      now $SSH_PID has some number, but it is not the PID of the spawned ssh. I tried different ways I found but non worked. Any Idea?


title: Bash completion for comma-separated values

text: I would like to create completion rule for comma-separated parameters list. E.g. I have command which receives list of server names:               myscript -s name1,name2,name3      At this moment I've managed to write following completion:               _myscript () {       local cur prev opts            _get_comp_words_by_ref cur prev            opts='-s'            servers='name1 name2 name3'            if [[ ${cur} == -* ]] ; then         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )       else         case "${prev}" in           -s)             if [[ "$cur" == *,* ]]; then               local realcur prefix               realcur=${cur##*,}               prefix=${cur%,*}               COMPREPLY=( $(compgen -W "${servers}" -P "${prefix}," -- ${realcur}) )             else               COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )             fi             ;;           *)             # do nothing             ;;         esac       fi     }      But it has at least 2 problems:   1. Suggestions for current value includes all previous values in their prefix.   2. It doesn't consider duplicate values. What is the best practices for such cases? Maybe bash-completions has some bundled functions for csv-lists?


title: sudo for users with empty passwords

text: I want sudo to behave like this, for all users:   1. If the user currently has a non-empty password, prompt for the password.   2. If the user currently has an empty password, either prompt for the password and accept the empty string, or don't prompt at all and permit. Is this possible? Right now, I have (1) but this is what happens for a user with an empty password:               $ sudo echo     Sorry, try again.     Sorry, try again.     Sorry, try again.     sudo: 3 incorrect password attempts      Alternatively, I can switch off password checking per-user, but that's not what I want, because the user might set a password later, and then sudo should prompt for it.


title: Solaris 11 pkg repository update fails

text: I want to install gcc in my solaris 11 working in virtualbox, I tried                   pkg install gcc-45      but I am getting :                   pkg: 0/1 catalogs successfully updated:              Unable to contact valid package repository         Encountered the following error(s):         Unable to contact any configured publishers.         This is likely a network configuration problem.         http protocol error: code: 503 reason: Service Unavailable         URL: 'http://pkg.oracle.com/solaris/release'      I tried to enter a proxy by entering                    export http_proxy=http://184.168.55.226:80      But did not work. How can I manage this?


title: Re-add accidently deleted system group

text: In my attempt to delete the `admin` user group I accidentally deleted the `adm` system group. I "added it back" by issuing `addgroup --system adm`. I have a feeling this is going to bite me back later. Is there anything else that has to be done? It was added with GID 126 and I couldn't find the default GIDs anywhere.


title: IBus sometimes not working in KDE

text: Sometimes (or usually) IBus does not work in KDE. I have autoremove it, install it with my language input (Vietnamese, both ibus-bogo or ibus-unikey), install ibus-m17n, restart many times but it still doesn't work. What should I do? I use Mint 16 with the newest KDE


title: Add a custom CRON job from the command line?

text: Debian seems to have directories for cron jobs such as `/etc/cron.daily` and `/etc/cron.hourly`, but is there a way for me to automate editing, removing, and updating cron jobs from an automated script? I'm working on a Docker container and I'd like to allow the user to specify the cron frequency of a specific task to be run in the background. Is there a way to do this?


title: linux tar listed-incremental untrustworthy

text: I'm looking for some way to troubleshoot incremental backups with tar on linux. I've got huge datasets (about 3TB) that need backing up to tape. For this I use the linux tar command and mt / mtx on LTO4 device. As the backup is very very very very slow (I suppose I'll have to put that in another question) there is no choice for me but to backup with incrementals to avoid it running during production time. basically, it goes like this:   1. A full tar is made: (with level 0)              tar --new-volume-script=changetape.sh \       --exclude=.zfs \       --listed-incremental=file.index \       --label=full_DS01 \       -cvf /dev/nst0 \       /mnt/storage/sharename >>filelisting.log 2>>errlisting.errlog        2. Incremental tar per day:              mtx -f /dev/sg1 load X #(load correct tape)     mt -f /dev/nst0 eod #(forward to end of data to write a new incremental tar)     tar --exclude=.zfs \       --listed-incremental=file.index \       --label=incremental_DS01 \       -czvf /dev/nst0 \       /mnt/storage/sharename >>filelisting.log 2>>errlisting.errlog        3. Repeat incremental tars. using the same process as in 2 so I always use the level 0 listed-incremental wich is adapted every time. This should mean that I always backup the files that have changed since my previous incrmental update. (as opposite to differential where you always compare with the full update) **Problem:** After a few iterations, the incrementals start to fail, meaning: the backup runs but it seems to think that ALL the files have been changed and it does a full backup in fact. This happened in different datasets. How can I troubleshoot this? And how is this possible? All seems to run well and then it thinks that all files have changed? for clarity:   1. the dataset is a readonly mountpoint   2. the folder structure is the same as in the full backup   3. the upper folder name has not changed How can I solve this issue?


title: Universal Access System Settings keep resetting after reboot

text: I am using Elementary OS Luna and each time I reboot my computer, the Universal Access settings keep getting reverted to the following state: ![enter image description here](http://i.stack.imgur.com/GYDIq.png) I do not want the Sticky Keys feature so I disable it, but after the next reboot the feature is enabled again. What can I do save my Universal Access settings so they do not get reverted after a reboot?


title: Can I configure bash to execute "clear" before every command typed in the console?

text: I would like to configure bash to execute `clear` command every time I type some command in the terminal (before executing my command). How can I do that? I'm using Debian Linux.


title: awk-Printing column value without new line and adding comma

text: input.txt                EN1      EN2      EN3      EN4      EN5      output               EN1,EN2,EN3,EN4,EN5      I have tried awk.But it is not printing with comma               awk 'BEGIN { OFS = ","} { printf $1}' input.txt      I have GNU Awk 4.0.0 version


title: Assigning awesome keybinding for more than 9 tags

text: I'm using the awesome WM and the nine default tags (or "virtual desktops") are not anywhere near enough for me: I've got a lot of VMs and remote VNCs etc. In the past I've used window managers with about 20 virtual desktops and that was about right. But now that I tried _awesome_ there's no way I'm ever going back to a non-tiling WM ; ) I managed to create more than nine tags in awesome by changing this line from my _rc.lua_ :               tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])      to this:               tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9, "a" }, s, layouts[1])      However I really don't understand how to add a keybinding so that I can directly switch to this new tag. I'd like to point out that going to the tag '9' and then 'going to the next tab' works perfectly, but I'm looking for a direct shortcut. Every single thing I tried ended up in _awesome_ basically either being unusable or defaulting to the default config. For example I tried a lot of variations on this:               awful.key({ modkey,           }, "a",      awful.tag.viewidx XXX,      but they all miserably failed. Note that seen that my lua-fu is not strong I'd need not only the exact line that would work but also a very precise location as to where I could put that line in my _rc.lua_ file. **EDIT** There's obviously some SNAFU when it comes to viewidx's documentation which does not match what the code does as I've found patches and mailing-list activity related to this issue. Yet I'd like to know what needs to be done to solve my problem...


title: Dell Latitude D630 Wireless Problem on Mint?

text: I've recently acquired a used Dell Latitude D630 and have put Mint on it. Everything seems to be operational except for the wireless. First, I don't know if the wireless card actually works (Ethernet does) and if it does, Mint is not recognizing it. I haven't figured out how to identify the card in Linux, so I am clueless as to what driver I actually need to download and install. Thanks in advance! * * * P.S., just saw this post and this page, and here is my results:               > lspci | grep net     09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02)          > ip link     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000     link/ether 00:21:70:ae:40:d4 brd ff:ff:ff:ff:ff:ff          > inxi -N     Network:   Card-1: Broadcom BCM4312 802.11b/g LP-PHY driver: b43-pci-bridge                Card-2: Broadcom NetXtreme BCM5755M Gigabit Ethernet PCI Express driver: tg3       Not sure how this helps me, but I'm sure someone out there knows how to find what I need (and/or much appreciated if you can tell me what part I need to be looking at). Thanks!


title: Should I use "apt-get remove" or "apt-get purge"?

text: For uninstalling an app (or package) should I use `apt-get remove package- name` or `apt-get purge package-name`? What is advantage of any of them to other one?


title: Basic rsync command for bit-identical copies

text: As far as I undstand, the following command:               sudo rsync --delete -azvr /home/oshiro/Desktop/source/ /home/oshiro/Desktop/destination      Is this all I need to create a simple synchronisation of files from 1 location to another? Or does the above command do anything more in the background which I don't know about? For example, does it create some sort of versioning, where I can specify a past time to get files how where were in the passed? That's a feature which I do not want to enable at this stage. All I want is bit-identical copy of the files from 1 location to another. Can I get rid of any of those parameters or do I need to add further parameters to make the copies bit-identical with no versioning. Basically, I don't want to create backups how the mac time machine backup system creates backups.


title: Issue with path to .so libraries

text: I have an issue with path to .so files. I have a server with two accounts user1 and user2. There is wget program, that is installed to user1 and I need it from user2. When I run it from user2 I get an error:               /export/apps/user1/local/bin/wget http://....     ld.so.1: wget: fatal: libiconv.so.2: open failed: No such file or directory       I checked output of ldd util for user1 (application works as expected): ldd /export/apps/user1/local/bin/wget libiconv.so.2 => /usr/local/lib/libiconv.so.2 For user2: **libiconv.so.2 => (file not found)** I updated LD_LIBRARY_PATH LD_LIBRARY_PATH=:/usr/sfw/lib:/export/apps/user1/local/lib: **/usr/local/lib** But after it I have the same problem. How can I fix it? Please note that I don't have admin access to this server and it is better to avoid modification of system-wide config files and solve this issue using non-root permissions.


title: Bash script for running python virtual environment does not execute

text: I am trying to wrap the following call into a script, which runs my Python virtual environment:               [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ source /home/lucas/Dropbox/projects/competitive-programming/kaggle/venv/ipython-notebook/bin/activate                                     (ipython-notebook) [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ deactivate     [lucas@lucas-ThinkPad-W520]/home/lucas/bin$       So, I created and ran the following bash script:               [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ cat venv_python3.sh      #!/bin/bash     #  /usr/bin/env bash     echo "starting python3 venv"     source /home/lucas/Dropbox/projects/competitiveprogramming/kaggle/venv/ipythonnotebook/bin/activate     [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ venv_python3.sh      starting python3 venv                                                                                [lucas@lucas-ThinkPad-W520]/home/lucas/bin$       As you can see, it executes the `echo` call, but does not start my virtual environment. Am I missing something? I've looked over several tutorials, but cannot find what is missing. Also, my `/home/lucas/bin/`, the location of my script, is in my `$PATH`. Here are the file's permissions:               [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ ls -la     total 52     drwxr-xr-x  3 lucas lucas 4096 Jun 28 23:14 .     drwxr-xr-x 79 lucas lucas 4096 Jun 28 23:13 ..     -rwxrw-r--  1 lucas lucas  164 Jun 28 23:13 venv_python3.sh


title: Sendmail not masquerading email "Received:" headers

text: I followed the instructions from NixCraft site and try to masquerade my emails with the following configuration:               MASQUERADE_AS(example.com)dnl     FEATURE(masquerade_envelope)dnl     FEATURE(masquerade_entire_domain)dnl     MASQUERADE_DOMAIN(example.com)dnl      and added the following also:               MASQUERADE_DOMAIN(localhost)dnl     MASQUERADE_DOMAIN(localhost6.localdomain6)dnl     MASQUERADE_DOMAIN(mail.server)dnl      I did a test with:               $ echo "Subject: test     From: no-reply@example.com     test" | sendmail -v -fuser@example.com -O NoRecipientAction=add-to check-auth@verifier.port25.com      and this is what I receive in the header:               Return-Path: <user@example.com>     Received: from mail.server (my.ip.add.ress) by verifier.port25.com id abcd1234 for <check-auth@verifier.port25.com>; Sun, 29 Jun 2014 01:23:45 -0400 (envelope-from <user@example.com>)     .....     Received: from mail.server (localhost6.localdomain6 [127.0.0.1])         by mail.server (8.14.8/8.14.8) with ESMTP id s5T5XgSa003053         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)         for <check-auth@verifier.port25.com>; Sun, 29 Jun 2014 12:34:56 +0800     Received: (from root@localhost)         by mail.server (8.14.8/8.14.8/Submit) id s5T5XfHR003052         for check-auth@verifier.port25.com; Sun, 29 Jun 2014 12:34:56 +0800      As can be observed, `mail.server`, `localhost` and `localhost6.localdomain6` are still showing up in the Received line. What more should I do to get Sendmail masquerading to work properly.


title: Printing in awk up to specific line and 5 more results

text: I'm trying to print out all the lines up to the appearance of a particular song and 5 more songs with that. The problem i'm new to the shell what I have to fix in the bellow commands?               RANK  NAME                    BAND  YEAR   GENERE  DOMESTIC/INTERNATIONAL        206:Reach Out, I'll Be There:The Four Tops:1978:Pop:3/2              207:Bye Bye Love:The Everly Brothers:1950:Classic:3/2          208:Gloria:Them:1965:Classic:1/1           209:In My Room:The Beach Boys:1985:Classic:5/7       210:96 Tears:? & the Mysterians:1964:Classic:20/15          211:Caroline, No:The Beach Boys:1975:Classic:5/7        212:1999:Prince:1958:Classic:5/7            213:Your Cheatin' Heart:Hank Williams:1988:Soul:7/6                     awk '{print * "For What It's Worth"} ' songs                 awk '/For What It's Worth/, {print $1 $2}' songs


title: masscan. how to configure Linux?

text: I've set this in my `sysctl.conf`:               net.netfilter.nf_conntrack_max=268435456      Because, this border `16,777,216` achieved very quick. Also, I've decrease timeouts:               net.ipv4.tcp_fin_timeout = 30     net.netfilter.nf_conntrack_tcp_timeout_established=54000      I'm trying to do this:               ./masscan 0.0.0.0/0 -p 80 --rate 500000 --exclude exclude.conf -oG output.txt      I want to increase the rate from `500,000` to `5,000,000`. I have 100 mbps. I'm trying to change the rate from `100,000` to upper borders. Nevertheless, my `net.netfilter.nf_conntrack_count` doesn't grow more than `1,609,909`. And remaining time 73 hours 20 minutes, with rate 100k or 500k, it doesn't matter. Other settings:               net.core.rmem_default = 4194304     net.core.wmem_default = 4194304     net.core.rmem_max = 4194304     net.core.wmem_max = 4194304     net.ipv4.tcp_rmem = 4096 65536 4194304     net.ipv4.tcp_wmem = 4096 16384 4194304      Seems like something else needs to be increased. Looks like somewhere insufficient memory or record fields. How do I find the bottle neck?


title: Privileges on Linux?

text: In Linux, I had created a userid. After creating this, I encountered a problem that the .EXE Files are not opened on simple click. They seem to be not privileged for my user account. How can I overcome from this?


title: shorten long lines in a log file

text: I keep a logfile of a program's output. The trouble is sometimes errors occur dumping very long lines of 7bit ascii data(encoded binary) I don't care to keep. These lines can be 200KB+ long before reaching a newline. What might be a short, pipeable way eg. with `sed` to change only lines exceeding 250 characters long, by keeping only the first 80 and last 40 characters of that line, possibly replacing the middle with only a ___?


title: How to set Cmnd_Alias properly?

text: I have one script to allow for one user to run. The string calling it from the command line looks like               ./script path/to/folder -a option='value'      When I try to add it to the other commands in Cmnd_Alias line, sudo blames sudoers file for incorrect syntax. How can I set such commands properly?


title: full linux (not android) 7-inch tablet?

text: are there any 7-inch tablets that can boot natively into a full version of linux? I want to remove Android. All traces of it. I don't want a jail. I want to program the hardware fully, without limitations. from bootup, not with sideloaded linux. it does not have to be ubuntu touch. I think pengod shut down. In a sense, we don't need new hardware. we need a software flash. Alibaba is full of cheap 7-inch android tablets in the $50-$100 range. HP, Toshiba, Hisense, and others are selling them around $120. can't any of these be flashed into linux of some form or another?? I would be happy to buy more than one of them. does this kind of device exist? /iaw


title: Installing extra packages of Debian Wheezy from terminal (after a net install)

text: I've installed the small image of Debian Wheezy from here but had to skip the mirror install of the extra packages. Now that I have the command line how do I get the rest of the stuff? When I tried `apt-get install ssh-server`, it told me to insert the CD.


title: RPM Operating System Binary Compatibility

text: When I read through the differences between Cent, OpenSuse, and Fedora, they frequently say that Cent and Red Hat are binary compatible. My experience has been (debian/ubuntu) that regardless of distro binary files will run and packages are compatible if they use the same package manager. So why do these articles emphasize that Cent and Red Hat are binary compatible or are my assumptions wrong.


title: What is the best tool for automating the building 32-64bit libraries for Unix & Windows building C++ software, replicable by users and machines?

text: Is there a system or product that can be used in automating the process of building 32bit and 64bit libraries for multiple platforms (Solaris (Sparc & x86), and windows) used in building C++ based software applications that is replicable by other users and on different machines? I'm searching to see if there is a product or system that is available to automate the process of compiling libraries as new ones come out for our software builds. We build software products in Solaris and Windows both 32bit and 64bit. We want to build the new libraries and then place them out in SVN or on a server for developers to grab. We need a process that is documentable and able to be done by any of our developers and able to be easily setup and reproduced on any machine. The two options we are using so far is OSC scripting and bash scripting. I'm looking for more options. All I am concerned mostly about building the libraries, not the applications. I want the new libraries available for the developers to use in their builds. This is C++ development.


title: resolve all ip addresses in command output using standard command line tools

text: I have several log files that contain a bunch of ip addresses. I would love to be able to pipe the data through a program that would match and resolve ip addresses. I.E. cat /var/log/somelogfile | host which would turn a line like > 10:45 accessed by 10.13.13.10 into > 10:45 accessed by myhostname.intranet My thought is there might be a way to do this with a combination of sed and host, but I have no idea how to do so. I know that I could write a simple script that would do it, but I would rather be able to use built in tools if possible. Any suggestions?


title: Do any "All In One" Printer/Scanners work on Linux?

text: > **Mod note** : The entire network is pretty against shopping recommendation > questions; there was an attempt to edit this one to avoid it, but it seems > to have failed. The goal is "how do I decide which printer to buy", not > "which printer should I buy". If you're naming a specific model in your > answer, you're probably doing it wrong I am interested in purchasing a printer and scanner and would very much like the convenience of using an all-in-one model. The issue is that I am a very strict user of Debian GNU/Linux. I have heard very bad things about all-in-one support. I'm looking for low-end (preferably even store-bought models) that I can safely print and scan with, using free software. If I have to install a non- free binary driver; I would do so, but it wouldn't be my preference. However, I do want to ensure it works with Debian. What resources can I consult before buying to ensure the model I select will work? And if only a few models work, how can I find the needle in the haystack?


title: Most reliable way to check for connected client?

text: I have an embedded Linux OS developed from scratch using Yocto. This talks to a Windows XP/7 client. The embedded OS runs a DHCP server and gives an address to the client. The problem is that the client is "locked down" and blocks many standard ports and methods of doing things. If the client is detected present by the embedded system, my startup script will launch the server that tests the system; otherwise I kexec to another OS. **What is the best way to detect if a client connected over Ethernet is there on startup (in Linux) without adding significant bootup time to the system?** Here are the things I've tried and what does not work:   1. ICMP packets are blocked on the client side so traditional pinging does not work    2. arping works (as well as nmap using ARP scan) but Windows clients try to be "smart" and dial out so it takes 20-25 seconds to actually establish the connection, which is unacceptable; ideally, it should detect something in 5-10 seconds. Is there anything I can set on the server side to speed this up? It always boots into this partition first so the quickest solution is the best solution.   3. ifplugd, ethtool, netplugd, and probing /sys/class/net/eth0/operstate and /sys/class/net/eth0/carrier do not work because the Ethernet port on the embedded system is connected to an internal switch so it is always "up" and "connected" hardware wise   4. A future solution will likely use Bonjour on the client side and Avahi on the server so we can have a connectionless protocol, but this will take time to implement and I need an interim solution because any software we add to the client side takes a very long time to get approval for. Again, I can't do anything on the client side because these units are configured by another company and locked down. So what else can I try on the server to detect if the client is present?


title: Distributed video encoding with ffmpeg

text: I'm in a process of giving form to a very old dream of mine - to create **an efficient and cheap video encoding platform**. And following the great examples such as SETI@home, BitTorrent and BitCoin, it's gotta be a _distributed one_ :) If anyone has some thoughts on my current concept, I would be glad to receive them. This is my toolset I chose for the task:   * Vagrant for the virtual box that will contain the whole thing   * ffmpeg for video conversions   * Transmission BitTorrent client to transfer splitted video files (partials) for distributed conversion   * bittorrent-dht for getting peers and their IP addresses in file transfers and to determine full nodes to connect to (with open ports) in order to join the actual distributed network   * Hazelcast in-memory data grid to manage messaging between nodes   * RHash to calculate and verify Magnet links   * PeerGuardian for general protection from government spies and manual blacklisting of malicious nodes   * Apache and PHP to create front-end interface used to actually manage the workflow A flowchart of how this all could work can be found here (careful, it's a bit scary :P): http://www.gliffy.com/go/publish/image/5726894/L.png The actual project repo is here: https://github.com/martinambrus/ffmpeg-dht


title: Extract audio from video in Linux with a GUI program?

text: When I use Thunar I like adding to custom actions command lines like those presented here, here and here to extract audio from videos. I mean **without transcoding/altering the sound, just putting it out of the video** (a flv or mp4 video, for example, is a aac audio - which cannot be played as such, but rapped into a m4a, like in the the command in the links posted. a webm video has a ogg audio which needs to be extracted.) Now, I am using elementayOS, and will not use Thunar, nor Nautilus, just Pantheon-Files. I want to know if there is a GUI solution to achieve this.


title: Hidden password is being displayed when invoking the su command?

text: This is the first time it has happened to me where I am using the su command and it actually displays the password on the terminal and doesn't stay hidden. Here is my code snippet:               sshpass -p "password" ssh -q username@74.11.11.11 "su -lc 'mkdir temp/'"      Code explanation: I am accessing a remote server and trying be root on that server to create a folder. In doing so I have to use the su command and it prompts me for the password. When I enter the password, it gets displayed and doesn't stay hidden.


title: "sudo service uwsgi restart" returns [fail] however uwsgi logs show processes have been created and python app is running

text: I'm running a local vagrant VM, Ubuntu 13.10 with nginx reverse proxying to uwsgi. Running               sudo /etc/init.d/nginx status       returns               * nginx is running      However running               sudo /etc/init.d/uwsgi status       returns               * which one?      If I take a look at the log file for the wsgi app I can see that uwsgi is running, worker processes have been created etc... so is there a hidden instance of uwsgi running somewhere that's confusing the service restart command? I installed uwsgi using:               apt-get install uwsgi      Here's the app.ini file:               [uwsgi]     plugin = python     socket  = /run/uwsgi/app/myapp/socket     chdir = /var/www/myapp     module = project.wsgi:application     pidfile = /tmp/myapp-master.pid     master = True     daemonize = /var/log/uwsgi/myapp.log      Any ideas?


title: Should Unix sub-command names be case sensitive?

text: Commands like `git`, `hg`, and `apt-get` all have sub-commands (is there a better name?), and they are all case-sensitive:               hg log                    # not hg Log     git status                # not git Status     sudo apt-get install nano # not sudo apt-get Install nano      Obviously a lot of things in Unix need to be case-sensitive, because that's kind of how Unix is. But in this case, there's no potential ambiguity. Those arguments can only be command names and can't be anything else (can they?). `git`'s error message suggests that this is the case:               > git Status     git: 'Status' is not a git command. See 'git --help'.          Did you mean this?             status      Besides adding just a little more frustration for beginners and conforming to Unix culture, is there any reason to be case-sensitive?


title: I don't want other users see my processes in ps aux. I have root. It's Debian. How to use grsec?

text: I installed 'linux-patch-grsecurity2' and it has some sort of interface.               ~$ sudo gradm2     gradm 2.1.14     grsecurity administration program          Usage: gradm [option] ...          Examples:             gradm -P             gradm -F -L /etc/grsec/learning.logs -O /etc/grsec/policy     Options:             -E, --enable    Enable the grsecurity RBAC system             -D, --disable   Disable the grsecurity RBAC system             -C, --check     Check RBAC policy for errors             -S, --status    Check status of RBAC system             -F, --fulllearn Enable full system learning             -P [rolename], --passwd                             Create password for RBAC administration                             or a special role             -R, --reload    Reload the RBAC system while in admin mode             -L <filename>, --learn                             Specify the pathname for learning logs             -O <filename>, --output                             Specify where to place policies generated from                             learning mode             -M <filename|uid>, --modsegv                             Remove a ban on a specific file or UID             -a <rolename> , --auth                             Authenticates to a special role that requires auth             -u, --unauth    Remove yourself from your current special role             -n <rolename> , --noauth                             Transitions to a special role that doesn't                             require authentication             -p <rolename> , --pamauth                             Authenticates to a special role through PAM             -V, --verbose   Display verbose policy statistics when enabling system             -h, --help      Display this help             -v, --version   Display version information      I didn't successfully find any documentation on how to use it to limit the 'ps aux' list for users?


title: Is it possible to save as sudo from nano after you've forgotten to run as sudo?

text: A lot of the time I edit a file with nano, try to save and get a permission error because I forgot to run it as sudo. Is there some quick way I can become sudo without having to re-open and re-edit the file?