extend reiserfs filesystem size

I have a VM server with an extra disk mounted on it. I have increased size on it from VMWare. The disk uses reiserfs file system.                /dev/sdb1 /data/mysql_data reiserfs rw,relatime 0 0  After expanding disk size, I run this               # fdisk -l     Disk /dev/sdb: 39.3 GB, 39322648576 bytes     255 heads, 63 sectors/track, 4780 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1        2611    20971488+  83  Linux      After this, I run               # resize_reiserfs -f /dev/sdb1     resize_reiserfs 3.6.21 (2009 www.namesys.com)          /dev/sdb1 already is of the needed size. Nothing to be done      and then df -h but still file system size hasn't increased.               # df -h     Filesystem            Size  Used Avail Use% Mounted on     /dev/mapper/vg_0-lv_root                            21G   12G  7.9G  60% /     tmpfs                1004M     0 1004M   0% /dev/shm     /dev/sda1             485M  156M  305M  34% /boot     /dev/sdb1              20G   15G  5.6G  73% /data/mysql_data      At the moment, my partition table says this               # cat ~/sfdisk_sdb.txt      # partition table of /dev/sdb     unit: sectors          /dev/sdb1 : start=       63, size= 41942977, Id=83     /dev/sdb2 : start=        0, size=        0, Id= 0     /dev/sdb3 : start=        0, size=        0, Id= 0     /dev/sdb4 : start=        0, size=        0, Id= 0      So, what am I doing wrong?


free video editing software for Linux with audio tracks auto matching

I have a few video files which basically cover the same action from different perspectives. I would like to merge them into one "split-screen" kind of video (two or four panes). The problem is videos are different lengths and align partially, for example one is 40mins long and the other one is only 5mins long somewhere in the middle, another one covers 10mins from the end of the first one and a few mins after that. I am not able to precisely match the tracks visually, I need the software that will match/align/sync the videos based on the audio tracks which contain some common "events". Is there anything available for Linux that will do the job?


Can't pin Wheezy on Linux Mint Debian Edition (LMDE)

I'd like to have your advice on yet another pinning problem that hit me recently. I've been through `man apt_preferences` several times, and I can't find anything wrong in what I did. I was having kernel panics in Linux Mint Debian Edition (LMDE), when I decided that I wanted to use packages from Debian Wheezy to get a newer kernel that could fix them. I decided to try with pinning. The plan was to add a deb source for wheezy, and pin it with a very small priority, so that Wheezy packages would be installed only if explicitly requested for. Then, I would install the kernel- image from Wheezy. I added this source:               deb http://ftp.uninett.no/pub/linux/debian wheezy main contrib non-free      And this pin:               Explanation: Disable Wheezy     Package: *     Pin: origin "ftp.uninett.no"     Pin-Priority: 1      But didn't work. I tried several other approaches like:               Explanation: Disable Wheezy     Package: *     Pin:  release o=Debian,n=wheezy     Pin-Priority: 1      or even               Explanation: Disable Wheezy     Package: *     Pin:  release n=wheezy     Pin-Priority: 1      No matter what, and even with negative priorities, Wheezy packages still had the same priority (500) as the LMDE's, and they were preferred to LMDE's since they were newer. Can you see anything that I missed so far? PS: If you're interested in the specific panic problem, you can read the full story here


How much success can I expect with Qemu On PowerPC Linux?

I'm on Ubuntu 12.04 for PowerPC and I installed Qemu just for kicks, having experience using it in the past to build an iso for an arm tablet, and upon doing a search I found this installed on my system:               /usr/bin/qemu-alpha     /usr/bin/qemu-arm     /usr/bin/qemu-armeb     /usr/bin/qemu-cris     /usr/bin/qemu-ga     /usr/bin/qemu-i386     /usr/bin/qemu-ifdown     /usr/bin/qemu-ifup     /usr/bin/qemu-img     /usr/bin/qemu-io     /usr/bin/qemu-launcher     /usr/bin/qemu-m68k     /usr/bin/qemu-microblaze     /usr/bin/qemu-mips     /usr/bin/qemu-mipsel     /usr/bin/qemu-nbd     /usr/bin/qemu-ppc     /usr/bin/qemu-ppc64     /usr/bin/qemu-ppc64abi32     /usr/bin/qemu-sh4     /usr/bin/qemu-sh4eb     /usr/bin/qemu-sparc     /usr/bin/qemu-sparc32plus     /usr/bin/qemu-sparc64     /usr/bin/qemu-system-arm     /usr/bin/qemu-system-cris     /usr/bin/qemu-system-i386     /usr/bin/qemu-system-m68k     /usr/bin/qemu-system-microblaze     /usr/bin/qemu-system-mips     /usr/bin/qemu-system-mips64     /usr/bin/qemu-system-mips64el     /usr/bin/qemu-system-mipsel     /usr/bin/qemu-system-ppc     /usr/bin/qemu-system-ppc64     /usr/bin/qemu-system-ppcemb     /usr/bin/qemu-system-sh4     /usr/bin/qemu-system-sh4eb     /usr/bin/qemu-system-sparc     /usr/bin/qemu-system-sparc64     /usr/bin/qemu-system-x86_64     /usr/bin/qemu-x86_64      But these can't all work for real can they? On PowerPC? Sure they are installed but… what actually works? Anyone know which architecture I would have fair success emulating with qemu on my PowerPC Ubuntu G4 Powerbook?


List all files with the same inode number?

Lets say, when I do `ls -li` inside a directory, I get this:               12353538 -rw-r--r-- 6 me me 1650 2013-01-10 16:33 fun.txt      As the output shows, the file _fun.txt_ has _**6**_ hard links; and the inode number is _12353538_. Given the case, how do I find all the hard links for the file i.e. files with the same inode number?


Can I duplicate my Apache server settings on a new Linux install?

I have an Apache 2 server set up on my computer that I use for local testing. To be clear, it is _not_ hosting sites on the internet. It's just for local debugging and designing. I was using Ubuntu Linux, but now I have a new computer using Linux Mint. What I'd like to do is take all the Apache sites and settings that I have on the old Ubuntu machine and reproduce them on the new Linux Mint machine. I only know how to do this manually, one site at a time, starting from scratch. Creating a file for each site in the `sites-available` directory and activating them with `a2ensite`. And then making edits to any configuration files, like adding some lines to my `php.ini` file to enable Xdebug, and hoping I haven't missed anything. I'm sure I'm doing this inefficiently and in a way that's prone to human error. Is it not possible to in some way copy the entirety of the Apache 2 settings and sites on my Ubuntu machine and put them on my Linux Mint machine in one go? Or at least, in a minimum of steps that is less than recreating each site and setting from scratch? Please note that I am more of a designer than an administrator, so please assume my knowledge of Linux commands and server settings is minimal.


What difference between openssh key and putty key?

I've found ssh-keygen ("ssh" package) comand produce another keys that puttygen command ("putty" package). If I create public and private keys with ssh-keygen some ssh-servers can not accept my keys. If I create keys with puttygen one server accept it. Why linux repositories don't propose some common solution (package) for it? I've found another package ssh-3.2.9.1 which produce another keys that must work with putty. But why there is no handy solution in SSH?


Do you recognize this audio panel?

Wondering if anyone recognizes the app in the images presented at the top of this question? Change PulseAudio Input/Output from Shell? I loaded Fedora 18 - MATE and don't see this app. Your assistance is appreciated. If you are able to post the name of the app to the question, as well, that would be helpful to future users struggling with ASLA issues.


Was my CPU kinda broken?

Today I've received some message from `mcelog` utility,               Processor 3 heated above trip temperature. Throttling enabled.     Please check your system cooling. Performance will be impacted      It happens when I build a huge program, I'm not sure if it means something. Did I broke my CPU in some way? Or was it just a normal message


Change a value in a config file, or add the setting if it doesn't exist?

When modifying config files from the command line, I often want to find the setting in the config file and modify that line if that setting exists. If that setting doesn't exist, I want to add it to the end of the file. I end up doing something like:               if [ `grep -c '^setting=' example.conf` == 0 ]     then          echo "setting=value" >> example.conf     else          sed -i 's/^setting=.*/setting=value/g' example.conf     fi      Which seems like an awful lot of code for something so simple. This doesn't even do basic things like check that the config file already ends in a new line before appending to it. Surely there is a utility that does this, or a simpler command that I can use.


How do I sort the signal buses with bits in ascending order?

I am trying to sort a file with signal buses. I am looking for result where the bits are in ascending order -- 2 followed by 3 and not 20.               cat file1 |sort          file1     cls_16_snap[2]     cls_16_snap[20]     cls_16_snap[21]     cls_16_snap[22]     cls_16_snap[23]     cls_16_snap[24]     cls_16_snap[25]     cls_16_snap[26]     cls_16_snap[27]     cls_16_snap[28]     cls_16_snap[29]     cls_16_snap[3]     cls_16_snap[30]      result               -------     cls_16_snap[2]     cls_16_snap[20]     cls_16_snap[21]     cls_16_snap[22]     cls_16_snap[23]     cls_16_snap[24]     cls_16_snap[25]     cls_16_snap[26]     cls_16_snap[27]     cls_16_snap[28]     cls_16_snap[29]     cls_16_snap[3]     cls_16_snap[30]


Copy-paste for vim is not working when mouse (:set mouse=a) is on?

I was trying to copy paste something from vim to another application and also, from that application to `vim` using right click with mouse and then copy and paste (or with `Ctrl`+`v` and `Ctrl`+`c` and also tried the `Command` version for mac OSX, obviously.). However, when I try doing it, it only copies the first word when I do it from `vim` or when I copy from the application to `vim`, it copies everything, but inserts strange tabs and spaces. I think this happened when I decided to set my mouse on in the terminal. As in:               :set mouse=a      I have that line on my `.vimrc` file on iTerm (mac os x). Though, is it possible to make my copy paste with other applications that are not in `vim` not to break with the `mouse=a` on? Or is it at least possible to set my mouse off while I do the copy paste? I did `:help` mouse but the comments were not useful for me. I would paste them here but... my copy paste tool is broken! I did try `:set mouse!` and `:set mouse=a!` but these did nothing useful... :( * * * Additional info of my environment: I am also using tmux most of the time, though, I tested this error/bug without a tmux session, thats why I posted this mainly as a vim question. * * * Bounty Message: Please ask for more information of my environment if you need it (forgot to put this in the bounty message sorry).


What does "command1 -> command2" indicate in results from my ls -al?

when I do a `ls -al` in `/usr/sfw/bin` I see: `make -> gmake` What does this indicate? Is this a symbolic link? I've googled and have not found the answer to this question.


How does Fedora name wireless interfaces?

Until recently, my network interfaces were always named `eth{0..x}` or `wlan{0..x}` depending on what type they were. However, now I see that I have `em1` for the ethernet card and `wlp3s0` for the wireless. Also, the interface name never used to change but it seems inconsistent now. Why is this? How does Fedora and/or Linux name these interfaces? Is this a Fedora thing or a Linux in general thing?


System freezes when browsing internet

About a week ago my system began to freeze (deadlock, only manual shutdown with laptop button helped) from time to time. The frequency of deadlock is increasing. Today it was about 10 deadlocks with only browsing the internet and terminal emulator and vim. It usually happens when loading new url and then all the system is dead. It's very annoying for me as it happens more often. My system is `Lubuntu 11.10` with `xmonad` window manager. Could you help me to find the cause of this problem? Are there some logs associated with deadlocks? Could it be hardware problem? (the system was dead twice while writing this question too) thank you


Installing opensuse through an USB

Can anyone explain **BRIEFLY** as to how to install OpenSUSE through an USB?. I searched in lot of forums, but i couldn't find anything helpful. Moreover, there was something written about installing it with the dd_rescue command, but that doesn't seem to work. So please give me a brief idea for installing OpenSUSE, through an USB.


How to use three monitors on a laptop?

I have a laptop running Ubuntu 9.04 with a dual-head setup: laptop panel + external monitor. I'd like to add another monitor but the laptop has a single VGA port, so my question is:   what are my options for setting up a triple-head system on a Linux laptop? (note that I'm open to "distributed display" systems such as xdmx, if it's not too messy to set up :) )


Multiple distros in VM with encrypted disk

I want to have a GNU/Linux setup on my computer, where I could use different distributions and isolated environments inside an operating system-level virtual machine. Then I also want to share my personal data between all of the OSes and their configurations. And also this data needs to be encrypted. **What should my setup look like?** I thought of the following:   1. Install minimal base distribution like Parabola or Debian.   2. Install VM on it - for example OpenVZ.   3. Install multiple distros inside VM.   4. Create a separate /home partition, which will be encrypted - for example dm-crypt.   5. Share /home partition between distros. Any reason for encrypted /? gave me an idea to use LVM instead of physical partitions, but I had no experience with it. Answers in Different linux distros sharing the same /home folder? state that sharing /home can be problematic. What are alternatives or clarifications to the scheme above?


apt-get install openssl doesn't upgrade openssl

re heartbleed, I'm trying to upgrade openssl, **WITHOUT** upgrading all packages on my system so I am running `apt-get install openssl` as shown here, it's implied that doing this should upgrade openssl: How to upgrade a single package using apt- get? I verify via apt-cache that it's installed:               root@nyc2-04-www:~# apt-cache policy openssl         openssl:           Installed: 1.0.1g-1           Candidate: 1.0.1g-2           Version table:              1.0.1g-2 0                 500 http://http.debian.net/debian/ sid/main amd64 Packages          *** 1.0.1g-1 0                 100 /var/lib/dpkg/status              1.0.1e-2+deb7u6 0                 500 http://security.debian.org/ wheezy/updates/main amd64 Packages              1.0.1e-2+deb7u4 0                 500 http://ftp.us.debian.org/debian/ wheezy/main amd64 Packages                 500 http://http.debian.net/debian/ wheezy/main amd64 Packages      however after rebooting, **i see that the old vunerable openssl is still active**. running `openssl version -a` shows that **1.0.1f** is still active. also confirmed that my server is still vunerable to heartbleed via http://filippo.io/Heartbleed/#www.uat.phantomjscloud.com **EDIT: fyi i took down nginx so I'm not leaving a vunerable server on the internet.** That's my uat server. I already did a full `apt-get upgrade` on my production server and that succsesfully updates openssl. but back to my question: how can I upgrade openssl without upgrading all packages?


Rsync specific pattern, but exclude other files in same path

There are lots of files in `/dapp/parsD/parsapp/object`. I only want to `rsync` the files in this directory that match * _.sql_ , * _.pl_ and * _.sh_ , but I also want to exclude 2 specific patterns in the same directory that end in _.sh_. Is this possible? I am running **HP-UX 11i** on both source and destination. `rsync` version is _3.1.0_. The below may be easier to visualize. On the dev server, the ' _x_ ' or ' _X_ ' is replaced by ' _d_ ' or ' _D_ ', and on production server, it will be ' _p_ ' or ' _P_ '. Include the following files:               /xapp/parsX/parsapp/object/*.sql     /xapp/parsX/parsapp/object/*.pl     /xapp/parsX/parsapp/object/*.sh      But exclude the following files:                /xapp/parsX/parsapp/object/getbackdate*autosys.sh      /xapp/parsX/parsapp/object/parssendevent*.sh


What does ^Z mean?

I tried using ^Z to send and application to the background(to then use `fg` to restore) but I notice that it says "Stopped" and in another terminal while monitoring htop, everything just freezes. Is there a way I can send to background without stopping/suspending the process?


openfire chat server Deamon not getting start while server up every time

we using a Chat server, its installed with openfire, for local office use we installed it, every day morning while server getting ON openfire service is not getting started, I have added it in run levels too, Using command , chkconfig , Operating system we using is Centos 6.5 final.               chkconfig --level 0123456 openfire on      The output of chkconfig was below               openfire        0:on    1:on    2:on    3:on    4:on    5:on    6:on      And still its not getting started when ever the Server was up and running, Every time i have to start the service manually using               /etc/init.d/openfire start      So this Step's not worked for me, so what i edited the rc.local file and added the service too, its too not working for me               vim /etc/rc.local      Entered like below in the rc.local               sh /etc/init.d/openfire start      If any one face the same issue please let me know how can i get fix.


How to install Ubuntu Software Center on Kali Linux

Each time I try installing * _software-center *_ on Kali, I get: > E: Package 'software-center' has no installation candidate


pkg2ng throwing tons of errors about unknown keywords

So... the `pkg_*` tools are deprecated, EOL scheduled for September 2014. Time to convert to pkgng. They have provided the `pkg2ng` tool provided for that. But when I run it, it throws tons of error messages. I don't know if I can ignore them or if that will introduce subtle errors.               # pkg2ng     Converting packages from /var/db/pkg     Converting libsigsegv-2.10...     pkg: fopen(/usr/ports/Keywords/display.yaml): No such file or directory     pkg: unknown keyword display, ignoring @display     Installing libsigsegv-2.10... done     Converting m4-1.4.17,1...     pkg: fopen(/usr/ports/Keywords/mtree.yaml): No such file or directory     pkg: unknown keyword mtree, ignoring @mtree     Installing m4-1.4.17,1... done     Converting libiconv-1.14_2...     pkg: fopen(/usr/ports/Keywords/mtree.yaml): No such file or directory     pkg: unknown keyword mtree, ignoring @mtree     Installing libiconv-1.14_2... done     Converting tdb-1.2.12,1...     pkg: fopen(/usr/ports/Keywords/conflicts.yaml): No such file or directory     pkg: unknown keyword conflicts, ignoring @conflicts     Installing tdb-1.2.12,1... done          (and so on)      Google doesn't give me much, only numerous repetitions of the thread that this post stems from: http://lists.freebsd.org/pipermail/freebsd- pkg/2013-June/000052.html I find that pretty weird, it looks as if there were only 2 or 3 people on the planet having this problem, one of whom would be me. So...   * Anyone had this problem, too?   * Can the error messages be ignored? (But why are they printed, then? Remember, this is the package database, which is pretty central to the system.)   * What can I do to rectify the situation.


Removing a directory that has no files in it

I recently created a username and a group called `gamesForAdmin`. Since then I deleted it and the folder I made for it is still there:               drwxr-xr-x  5 root     root       4096 Jul  4 11:28 .     drwxr-xr-x 23 root     root       4096 May 29 12:41 ..     drwxr-xr-x  2 sftpuser sftpaccess 4096 Jul  4 11:24 gamesForAdmin     drwxr-xr-x 27 ryan     ryan       4096 Jul  4 11:31 ryan     drwxr-xr-x  3 root     sftpaccess 4096 Jul  4 11:29 sftpuser      When I try to run a `sudo rmdir gamesForAdmin`, I get this error message:               rmdir: failed to remove ‘gamesForAdmin’: Directory not empty      But theres nothing in the directory! When I run an `ls`, there is nothing listed.   * Why does this occur?   * How I can successfully remove this directory? Output of `ls -la gamesForAdmin`:               total 28     drwxr-xr-x 2 sftpuser sftpaccess 4096 Jul  4 11:24 .     drwxr-xr-x 5 root     root       4096 Jul  4 11:28 ..     -rw------- 1 sftpuser sftpaccess  471 Jun  9 19:49 .bash_history     -rw-r--r-- 1 sftpuser sftpaccess  220 Apr  8 21:03 .bash_logout     -rw-r--r-- 1 sftpuser sftpaccess 3637 Apr  8 21:03 .bashrc     -rw-r--r-- 1 sftpuser sftpaccess  675 Apr  8 21:03 .profile     -rw------- 1 sftpuser sftpaccess  644 Jun  9 17:48 .viminfo


Location of wifi password/ssid in OpenELEC (Rasperry Pi version)

Where OpenELEC stores wifi password/ssid? Is it protected somehow or anybody who can get my SD card can read it? I unpacked my OpenELEC's squashfs image so I can browse freely inside its contents but I can't find the location where my password/ssid are stored.


Removing lines with a single common field

I have a tab separated file that looks like this:               123   some text     123   some different text     334   some other text     341   more text      and I want to do two things. One is to order everything numerically (this is easy to do) and the other is to remove a line if it's number is already present. I.e. the output would look like this:               123   some text     334   some other text     341   more text      I tried getting a file of just the unique numbers, i.e.               123     334     341      and joining it with the original file with:               join -j 1 justNumbers.txt original.txt      but this gave me the original file back. Any ideas?


insert value at the end of every record based on unique IDs

I have 2 files , one with Delimited and other one is Positional file. These two files shares same unique ID's as shown below but both the files contains different information. `del.txt`               11111|abc|01|||||||||          22222|xyz|09|||||||||      `pos.txt`               11111  abc newyork US           22222  xyz dallas  US      The del.txt file consist of unique member id followed by name and Alternative ID separated by | (delimited) and similarly pos.txt has unique ID along with name except alternative id in positional format. I want to insert alternative ID in pos.txt only if Unique Member ID matches in both the file as shown below `pos.txt`               11111  abc newyork US 01          22222  xyz  dallas US 09      How can we achieve this using shell script?


How do I get absolute path from using find unix command

How to get absolute path by using find command.   actually I am running the following script:-                 find . -size +20M | while read a     do          i=$(echo $a | sed 's:/: :g')          echo $a;          j=($i)          fileName=${j[${#j[@]}-1]}          userName=${j[${#j[@]}-3]}     done      but here variable `$a` showing path starting from `./Downloads/filename` but I want absolute path from `/`.


Error with a file name containing parentheses

when I tried to change file name from `old.file(1).gz` to `new.file.gz`, It says syntax error, I am using ubuntu 12.04.               mv old.file(1).gz new.file.gz     bash: syntax error near unexpected token `('


How to find out a process gets end?

How can I tell when a given process exits? Like when it's done running and stuff. For instance:               # Command 1     wget http://releases.ubuntu.com/14.04/ubuntu-14.04-desktop-amd64.iso                    # Command 2     echo "I'm a command"      How would I schedule to have `Command 2` run when `Command 1` exits?


Passing data from kernel space to user space in FreeBSD

I need some information regarding write requests from all applications on FreeBSD. I put a function inside the file system write call `ffs_write()` which collects the information into an array of structures. So I want to pass this information to the user space now. There can be a process running in the user space which can collect this gathered info, process it and put it into a file which can be accessed later. I tried finding ways to establish a channel between user space and kernel space, but I couldn't find anything helpful. Can somebody elaborate on this subject?


Locating files and displaying their owner

I have to search for a specific file type on a storage unit and also want to know their owners. With `locate '*.txt' >> result.txt` I find all files I'm looking for but I'm missing the owner this way. Any suggestions on how I could do it properly?


HTTP tunnel on debian through a web UI

Using webmin today I noticed that it has an interesting feature: an HTTP tunnel. I usually use openVPN (installed on a VPS that i rent) to access my home computer (which does not have a public IP). In my university though I can use no VPN (I tried l2tp and openVPN) because of the firewall that restricts internet access through port 80 and 443 only. Since I could not make my openVPN server listen on port 80 or 443 for obvious reasons, initially I used a SSH reverse tunnel, which I don't like because my home pc is running Windows and it's a pain to keep the ssh session alive. **So the question is:** is there an HTTP tunneling software that can run on Debian (Wheezy) which works like webmin's http tunnel? I would like it to have a web user interface, so I can access to it from any computer. If you think this does not exist, anyone who comes up with an alternative solution is very welcome.


Mac equivalent application "shortcat"

There is a mac application called Shortcat and it make me envious. For those of you averse to clicking links here is a summary: > Keep your hands on the keyboard and boost your productivity! Shortcat is a > keyboard tool for Mac OS X that lets you "click" buttons and control your > apps with a few keystrokes. Think of it as Spotlight for the user interface. So basically it lets you search within a GUI application. As I prefer typing for things than looking for things it sounds quite useful. I will probably be dreaming about this tonight.. and maybe looking for APIs to make it possible tomorrow. Unless of course... there an equivelant available for gnome?


how to copy and rename files with ":" and incrementing number in the filename

I need to copy and rename (and then edit) a group of files in the `/etc/sysconfig/network-scripts` folder. The files are `ifcfg-eth1:*` I have `ifcfg-eth1` through `ifcfg-eth1:121` but need to extend with more addresses, so I want to copy e.g `ifcfg-eth1:22` and `ifcfg-eth1:23` into `ifcfg-eth1:122` and `ifcfg-eth1:123` and then edit the copy. I know how to edit, but not how to copy and rename. Found a lot of renaming info on this site, but I think I don't get the : part right... How do I handle filenames including ":" ??


Install system to Disk on Chip

I'm looking for an easy way to install linux on a PC104 (x86 no cmov) system with a Disk-on-Chip. It can be a very simple system (BusyBox, etc) or a distro the installs in under 512mb. I just need to boot to a prompt. Does anyone know a simple path to get this done?


Issues with process substitution

I am quite new to Linux and currently I am using Cygwin on my Windows machine. My problem is I made a script to automate my analytics work and used process substitution in it and it worked fine when running on Cygwin. But when running that same script on a Linux machine it is showing problems with process substitution. So I'm bit confused. Snippet of my script is:               echo "enter url"     read val     echo "enter file name "     read file     let cnt=0     while read -r line     do         arr[$cnt]="$line"         x=${arr[cnt]}         cnt=$(( $cnt + 1 ))         cd /cygdrive/c/nutch         bin/nutch readseg -get crawl/segments/$x $val -nogenerate -noparse \           -nocontent -noparsetext >>out.txt      done < <(ls -1 /cygdrive/c/nutch/crawl/segments)


Ubuntu : unable to copy file to dir created under same credentials

I am Windows 7 remoting to Ubuntu 12.04.2 LTS I am new to Ubuntu ( and *nix in general ) and need to understand how permissions are assigned to newly created dirs. Via Putty ssh session :               $bash     myaccount@mybox:/$ cd /etc/puppet     myaccount@mybox:/etc/puppet$ sudo mkdir device     myaccount@mybox:/etc/puppet/device$      myaccount@mybox:/etc/puppet/device$ ls -ld     drwxr-xr-x 2 root root 4096 Jul 2 17:57      Then via WinSCP session ( SCP mode , also logged-in as myaccount@mybox ) I attempt to copy a file to /etc/puppet/device However this operation fails with an error displayed in pop-up:               Error     Copying file 'myfile' failed.     scp: /etc/puppet/device/myfile: Permission denied      It seems logical to me that if my account is assigned sufficient rights to create a dir then it should also have rights to copy a file into that dir ? Or do creating dirs and moving files fall under separate roles ? NOTE: If you are going to down-tick my post, please explain why in a comment. Just anonymously down-ticking doesn't help me understand how these forums work. Seems like I'm playing by the rules, full details, following-up on comments, etc.


Recommended Linux Distro for 'MMO' Server

Given its UNIX ancestry (the de facto standard for mainframes, back in the days when I first learned programming), using Linux as the OS for an experimental MMO is something of a no-brainer. That being said, there are so many distros out now that trying to figure which to try is pretty daunting. Therefore, I turn to more experienced voices for their perspectives. Some of the criteria includes:   1. Efficient utilization of multi-core CPUs (it's for an MMO server, after all)   2. Light-weight with minimal overhead (initial development is on an older system)   3. Stable enough to run indefinitely (I suspect some distros leak as bad as Windows)   4. Can use a simple Window Manager instead of a full Desktop Environment (preferably one which gets along well with Code::Blocks)   5. Gigabit+ networking support is key; some USB/video for basic use; everything else is negligible   6. Good community support (I know I'm diving into a rough ocean - I'd feel better knowing there's a life preserver nearby) I've sort of narrowed things down to Debian, CentOS (RHEL-based), Gentoo, and Slackware. Of course, each of these (excepting CentOS) have numerous derivatives, which means I haven't really narrowed things down much at all. DSL has obvious appeal, but I haven't found much in the way of a community or third-party documentation. Any advice and/or recommendations in this endeavor would be greatly appreciated. **EDIT:** It seems that the question I should have asked was "Which _KERNEL_ should I look for in a distro?" I don't have much experience with Linux (primarily using Ubuntu via DE), so I'm concerned that trying to remove extraneous features may compromise its integrity. Adding features still entails risks, but less than removing them.


Do Links to /tmp files get deleted?

I have a script that creates a temp directory using `mktemp -d`. A folder generated in the temp directory is the output of the script that will be copied to another part of the machine. I was considering using `ln` to use the same folder instead copying the contents somewhere else. I was wondering if it would still be around if the version of the folder in the `/tmp` directory got cleaned up by the OS?


How to load virtualbox video kernel module?

I have a virtual quantal (12.10) Ubuntu machine. Upon starting, it says in it its `boot.log`                Loading VirtualBox video kernel module                                [fail]      What is this component and do I need it if I only want to ssh the virtual machine anyway. And for completeness sake, how would I fix it?


passing dd skip|seek offset as hexadecimal

# dd if=2013-Aug-uptime.csv bs=1 count=1 skip=3 2> /dev/null     d     # dd if=2013-Aug-uptime.csv bs=1 count=1 skip=0x3 2> /dev/null     f      Why the second command outputs a different value? Is it possible to pass the skip|seek offset to dd as an hexadecimal value?


Assigning an identity to an IPsec policy in Linux

Page 36 of RFC2367 (PF_KEYv2 Key Management API) states that when the kernel needs an IPsec security association for an outbound packet, but does not have one, it will ask the key management daemon (usually an IKEv2 daemon like racoon or charon) for an association. It does this by sending an SADB_ACQUIRE message to all registered key management daemons for the IPsec protocol in question (AH or ESP). The layout of the message indicates that identity headers can be included in the SADB_ACQUIRE message, and I am wondering how you would get the kernel to pass that information to the key management daemon, because I am writing such a daemon and require a strong level of authentication with the remote machine. The most scalable way I can think of to do this is to have X.509v3 certificates with the CommonName set to an identifier of the remote machine, usually the hostname. However, the machines have multiple IP addresses, and different PTR records for each of those, so confirming their identity by reverse lookup of their IP address and matching it to the CommonName is impractical; it would require multiple certificates per machine. I toyed with the idea of implementing RFC3779 IP address extensions in the certificates, so the remote machine could attest that it is allowed to negotiate security associations for those addresses (which would prevent another trusted, malicious machine from pretending to be the one we are trying to negotiate an association with), but upon reflection of RFC2367's mentioning of the fact that the SADB_ACQUIRE message can include an identity header, that seems the better approach: a policy could be created for each of the IP addresses, with the policy containing the CommonName that should be expected, and the kernel would relay this CommonName as the identity header. My question is, under what circumstances would the kernel present such an identity header, and can I attach an expected CommonName to a security policy so that it would be included? I could then simply receive the identity in the SADB_ACQUIRE message, begin the negotiation with the remote machine, and compare the CommonName in their certificate to it. If this is not possible (because Linux does not implement it), I shall have to go with RFC3779 extensions, which means re-issuing a machine's certificate whenever it obtains or loses an IP address...


tar a specific number of files listed in a text file

I have a text file which contains a list of files. I use.               tar --null --no-recursion -uf abc.tar --directory= /tmp/temp --files-from abc.txt      This command simply creates a tar with all the files listed in the text file. Is there any way where I can tar only selected number of files from the list? Say for example only first 50 files listed in the text file.


find subdirectories with lowest number

I am trying to list all subdirectories with the lowest number. For example, for the following list:               /100/2001       /100/2003       /101/2001       /101/2004       /102/2000       /102/2003       /102/2005        I am looking to obtain only:               /100/2001       /101/2001       /102/2000


emacs meta key and Mint window manager

First, I'm not sure what window manager is running on my Mint installation. The "Control Center" yields no clues. Nevertheless - whatever I have is grabbing the emacs "meta" key (the option key on my Mac) and dropping down a window menu. Being a Mac person, I could do without _any_ of those option key shortcuts into the menus. Is there a way to turn them off completely? Barring that, is there a way to at least tell the manager to listen for some obscure key, so that I can get my meta keystrokes into emacs?


GlusterFS use Geo-replication or normal gluster?

We have 4 offices with ipsec lan2lan over fibre net (20-100 mbit on eache office, except one office with 10 mbit fibre). Latency is below 20 ms (between to of the offices with fastest network we have 2 ms). All offices have lan2lan between each other. iperf between offices is typical 50-80 mbit. We will have 0,5 - 1 tb data with little daily changes. Is it recomended to use Geo-replication, or normal gluster replication?


Test for monitor resolutions

I want to buy a new display device, but I don't know if it will be supported by my card because the weirder/higher resolutions: 2560 x 1080, or 2560 x 1440. Is there any method to create a virtual display with that resolutions to prove that is actually possible to get that resolutions with this card? Of course, a testing method that works for any graphics card is welcomed. But for instance, the graphics card is an Intel from a i5-M520 processor. Using Ubuntu 12.04.


How can a version of a package conflict with itself?

I want to install `fillup` and get:                rpm -i fillup-1.42-268.1.x86_64.rpm          file /usr/bin/fillup conflicts between attempted installs of \         fillup-1.42-268.1.x86_64 and fillup-1.42-268.1.x86_64      It looks like it's the same package that conflicts itself. Why does this happen, and what can be done about it so that I can install `fillup`?


shell command to get pixel size of an image

Is there a shell command that returns the pixel size of an image? I'm trying to produce an animated gif starting from different gifs with different sizes using `convert` (e.g. `convert -delay 50 1.gif 2.gif -loop 0 animated.gif`). The problem is that convert simply overlaps the images using the first image's size as the size of the animated gif, and since they have different sizes the result is a bit of a mess, with bits of the old frames showing under the new ones.


Excluding kernel modules through /etc/modprobe.d/blacklist.conf does not work

I don't want to load the kernel module nouveau on my debian box at startup, so I put the following in /etc/modprobe.d/blacklist.conf:               blacklist ttm     blacklist drm     blacklist nouveau      I even did a `update-initramfs -u` but nonetheless those three modules get loaded each time I boot. Does anyone know why and how to fix this.


Replace string with contents of a file using sed

I have two different files: ### File1               /home/user1/       /home/user2/bin       /home/user1/a/b/c      ### File2               <TEXT1>     <TEXT2>      I want to replace the `<TEXT1>` of _File2_ with the contents of _File1_ using `sed`. I tried this command, but not getting proper output:               cat File2|sed "s/<TEXT1>/$(cat File1|sed 's/\//\\\//g'|sed 's/$/\\n/g'|tr -d "\n")/g"      You can use other tools also to solve this problem.


Rsync - Corrupted MAC on input

**Background**   I have a script on my NAS which is a Synology DS212J which is running on a special distro where `uname -a` gives me `Linux DS212J 2.6.32.12 #4493 Wed Jul 16 11:37:16 CST 2014 armv5tel GNU/Linux synology_88f6281_212j` which is suppose to run `rsync` to backup my Raspberry Pi running Raspbian (based on Debian). The backup script looks like this                 /usr/syno/bin/rsync -aEv --ignore-errors --delete --rsync-path="sudo usr/bin/rsync" --exclude-from=/volume1/backup_hdd1/rsync-pi/rsync-exclude.txt -e "ssh -p 22" pi@192.168.0.103:/ /volume1/backup_hdd1/rsync-pi/backup >> /volume1/backup_hdd1/rsync-pi/rpi_backup.log 2>&1      **Problem**   The backup script was working until recently when I checked the logs where I'm getting multiple errors but they all can be traced back to these two lines:               Corrupted MAC on input.     Disconnecting: Packet corrupt      **What I've tried**   Disabled TCP checksum offload by this command               ethtool -K eth0 tx off rx off      And basically trying everything Google suggest. Sometimes it transfers up to 50 MBs where sometimes it only reaches a few MBs before aborting. I'm completely lost since it was working flawlessly the other day. Only thing that I've done on the system is update a few programs - nothing major. I've also tried removing these programs but it didn't help. Does anyone have any ideas or tips of what I can do to get it working again?


Why is brk(0) called?

On a first shell I run the command `tail` with no argument. On a second shell I kill the first tail using strace to monitor the system calls.               qdii@nomada ~ $ strace kill 1713     execve("/bin/kill", ["kill", "1713"], [/* 82 vars */]) = 0     brk(0)                                  = 0x2533000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9dacfe8000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3      I didn’t know the `brk` command so I looked it up and found that it changes the end of the data segment of the process. Why would `kill` do that? especially setting the data segment to `0` seems to make little sense.


Pattern repetition and regexp

Take the pattern               [UGLER]*      Can the string UUG match against it? I mean to say, is repetition allowed?


Tools to inspect local network, and find local IP address of device?

This is my specific context (Latex/TikZ code for the diagram below): ![netlan.png](http://i.stack.imgur.com/fPpAh.png) Now this local "Router", has broke down several times, and several different devices have had its role (sometimes they have a wireless interface too, sometimes not; currently, as on the image, they don't). The same goes for the "Cable modem". However, regardless of such differences, I typically experience that:   * I can just wire this setup, and I get internet on the (Ubuntu GNU/Linux) PCs without any further tinkering with setups   * The local addresses of the PCs and the Router are always known (e.g. I can use tools like `nmap` to list the addresses of the local PCs and the local router).    * The "global"/Public IP is always known on the local PCs (through the use of whatismyip.com and such)  The problem is the cable modem. I know it serves an administration page on port 80, because I've seen it before, when I had a different router. But, the thing is, I had forgotten what local IP is this cablemodem webpage supposed to be served on - I think with my previous local router, there was a page on its web interface which listed the cable modem local IP; I cannot find the same in the current router. So, the thing is - I want to access the administration page of the cable modem from PC1-3, but don't know what its local address should be; the other addresses are known as on the image. What tools (command-line or GUI) and approaches could I use, to find the cable modem's web server local IP address? Code for diagram:               % drawn with tikzedt; to compile,     % save as test.tex, and call: `pdflatex test.tex`     \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes.symbols}     \pagecolor{yellow!15}          \begin{document}     \begin{tikzpicture}          \tikzstyle{rcn} = [draw,rectangle,inner sep=10pt,line width=1pt,align=center];     \tikzstyle{ln} = [line width=1pt]     \tikzstyle{cln} = [shape=cloud,draw,line width=1pt,fill=black!10,minimum width=10em,aspect=1.2]     \tikzstyle{cln2} = [shape=cloud,cloud puffs=20,draw,line width=0.5pt,inner sep=0pt,align=center,aspect=3]          \node[rcn] (PC1) at (1,4) {PC1\\Local IP: 10.0.0.2};     \node[rcn] (PC2) at (1,2.5) {PC2\\Local IP: 10.0.0.3};     \node[rcn] (PC3) at (1,1) {PC3\\Local IP :10.0.0.4};          \node[rcn] (Router) at (6,2.5) {Router\\Local IP: 10.0.0.1\\\small(wired,LAN)};     \node[rcn] (Modem) at (10.5,2.5) {Cable modem\\Local IP: ??.??.??.??\\\small(wired,wireless,router)};     \node[cln] (Internet) at (15,2.5) {\Large Internet};               \draw[ln] (PC1) -| (3.5,3) -| (Router.west);     \draw[ln] (PC2) -| (Router.west);     \draw[ln] (PC3) -| (3.5,2) -| (Router.west);          \draw [ln](Router) -- (Modem) -- (Internet);     \node [cln2] at (10.5121,4.7455) {Public IP (known):\\AAA.AAA.AAA.AAA};          \end{tikzpicture}     \end{document}


killall <processname> throughout the system

I'm opening two terminal windows. **Terminal 1** - I run process1 **Terminal 2** - I run process2 I then terminate both process using `Ctrl`+`Z` in each window. I type `killall -9 process1` in Terminal 2 , and there's no feedback. I realise later that in Terminal 1, process1 is not really killed. How do I kill process1 in Terminal 1 from Terminal 2 console?


How to set a Thunar window as the desktop in XFce?

I want to setup one computer ask a kiosk for eBooks. I'd like any user to be able to see all available books right on the desktop. These can be clicked on and loaded in the PDF software. Is there some way to place a fullscreen Thunar window, at a specific folder, as the desktop of XFce, so that the desktop has a folder showing all of the PDFs and can be navigated like a file manager?


SSH tunnel hanging

I'm trying to use an SSH tunnel from home to a computer in the university so I can access some articles. Both machines are running Ubuntu 11.04, the university machine runs `openssh- server`. I my home machine I followed these instructions:   1. open an ssh session:              ssh -D 9999 -C user@my_addr.com         2. Then I configured Firefox to user SOCKS5 connection on port `9999` of `localhost`. This works for some time. Then suddenly it hangs and the terminal where the SSH session was opened freezes, too. What am I missing here?


Restart GNOME without restarting Xorg?

sometimes happens that some applications crash and make Gnome desktop unstable for example the upper bar vanishes. by restarting X ctrl+shift+backspace i can reset it. but is there a way just to re enable the bar or Gnome entirely?


archlinux check disks on boot

How can I check and mark bad blocks on Linux startup? There are a number of options available and most of them require accessing hardware and running live CD's. But I would like to avoid and perform everything using command line without going to the server room and talking to admins who have the keys. I have ArchLinux with `/` on `ext4fs`.


Is there a way to tell how many times my computer has rebooted in a 24 hour period?

I was doing a 24 hour code-a-thon and had to reboot numerous times and was wondering if there was a way to tell exactly how many the computer was rebooted or crashed.


ffmpeg hardcode subs on flv

Giving up on trying to use `videosub.js`, I am now trying to hard code subtitles to the video file using `ffmpeg`. Have run into trouble with configuration files not found, when trying to hard code the `srt` type of subtitle on `flv` type of video file.I decided to convert the `srt` file to an `ass` type subtitle but that didn't work either. Now I am wondering, if it is because you can't do it with an `flv` type video or I need to go back to fixing the error I'm getting when trying to run the command. I am using Linux `CentOS 6.4` using latest static release of `ffmpeg` for 32bit. That being : > `Fontconfig error: Cannot load default config file` This is what I see in `ffmpeg` static folder:               -bash-4.1# cd ffmpeg-static     -bash-4.1#      -bash-4.1# ls     32bit     -bash-4.1# cd 32bit     -bash-4.1# ls     var     -bash-4.1# cd var     -bash-4.1# ls     cache     -bash-4.1# cd cache     -bash-4.1# ls     fontconfig     -bash-4.1# cd fontconfig     -bash-4.1# ls     3830d5c3ddfd5cd38a049b759396e72e-.cache-3  CACHEDIR.TAG      I have since noticed besides the ffmpeg script residing in /usr/bin there is only one other folder at root being the listed one above with only the cache so obviously I have missed many added installs because also I have no fplayer.


where to put binaries so they are always in path and can be found easily

I am making quite some binaries, scripts etc that I want to install easily (using my own rpms). Since I want them accessible for everyone, my intuition would be to put them in /usr/bin;   * no need to change PATH however; my executables now disappear in a pool of all the others; how can I find back all the executables I put there in an easy way. I was thinking of:   * a subdirectory in /usr/bin (I know I cannot do this; just to illustrate my thinking)   * another directory (/opt/myself/bin) and linking each executable to /usr/bin (lots of work)   * another directory (/opt/myself/bin) and linking the directory to /usr/bin (is this possible?) what would be the "best, most linux-compliant way" to do this? EDIT: we had a discussion on this in the company and came up with this sub- optimal option: put binaries in /usr/bin/company with a symbolic link from /usr/bin. I'm not thrilled with this solution (disussion ongoing)


System got stuck,  cannot return to console

I am using Solaris on a Sun Netra 240 box. In the ok prompt I ran `init 3` by accident, and now the system is stuck and I can't write anything. I have access to the ALOM prompt, but when I run a console command the system gets stuck again. How can I return to a normal console without physically rebooting the system?


Setting maximum volume

I usually work in a WM (i.e., i3wm) and use `alsamixer` to adjust sound volume. The recent Linux installation on a Dell t5500 machine gives a very loud sound when set the maximum volume in `alsamixer`. It would damage my eardrum, if I mistakenly set the volume to be maximum as I usually use in-ear earphone. Is there anyway to set the peak sound volume?


How to rename filename with ' or ? in file name?

I have a problem renaming a file that I'm not even sure which special characters I have in the file. I'm using CentOS 6 64bit. When I `ls` the file:               Giko Suzo San?e - Ep1.avi      but when view it in FTP:               Giko Suzo San’e - Ep1.avi      When I try to `mv` it:               [root@server ]# mv 'Giko Suzo San?e - Ep1.avi' 'Giko Suzo Sane - Ep1.avi' mv: cannot stat `Giko Suzo San?e - Ep1.avi': No such file or directory I also tried renaming it in FTP using FlashFXP. I get:               [L] 550 Giko Suzo San’e - Ep1.avi: No such file or directory Rename Failure! How can I rename with this problem?


Create animated WebP file from WebP files?

I have converted a sequence of images to WebP, and I want to compile them into an animation. I downloaded `libwebp`, but it's a `tar.gz` archive and I don't know how to install those. Is there another way to create an animated WebP file some other way?


Typing punctuation adds an accent to the preceding letter after my laptop is docked for a few minutes

I am running Manjaro XFCE. Everything worked like a charm for months now, but 2 weeks ago the keyboard configuration from my external keyboard seems damaged. Writing on my laptop itself works flawlessly. But when my laptop is docked and I use my usb keyboard for like 10 minutes, it suddenly starts to behave weird. Typing `e`+`.` yields `ė`. `e`+`,` yields `ę`. And, there are many more. Typing with this is unbelievable disapointinġ. The last written letter is always composed with the preceding punctuation. The only thing I can do in this case is to open my laptop lid so the screen turns on. Then I can write just as usual with my USB keyboard. Also, it changes back to normal sometimes without even doing anything.


Linux Mint brightness has too few settings

There are many questions to do with screen brightness on Linux Mint (this and this refer to default brightness being zero, and this to there being only two brightness levels.) My problem is a bit different: I have _too few_ brightness levels to choose from when using the function keys. There are only three settings between full and completely off! If I'm working in a dark room, I need a very low brightness, but it still needs to be more than off! I have Linux Mint 17 running on an HP Envy 14. The brightness settings in `Screensaver and Lock Settings` works better than the function keys do (I can get a dimmer level there) but it's still not brilliant.


Is LILO still usable on modern PC?

How does LILO work on modern hardware with today's kernels? Do I have to fulfill any preconditions, or is it just about writing the configuration file and running `lilo` command like in the old days? Does the kernel package update (Debian/Ubuntu) update LILO as it does with GRUB2?


How does iptables recognize packet state?

Consider these two sets of rules: Set A               -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT     -A INPUT -j REJECT     -A OUTPUT -j ACCEPT      Set B               -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT     -A INPUT -j REJECT     -A OUTPUT -m conntrack --ctstate NEW,ESTABLISHED,RELATED -j ACCEPT      Previously I was under the impression that the two were functionally the same, however someone recently remarked to me: > To have an **ESTABLISHED,RELATED** connection you have to have a rule that > add the connection into the db that this rule looks at. This is done with > the **NEW** rule. Once the connection is accepted it is placed into the db > so the **ESTABLISHED,RELATED** rules can match against it. Without the > **NEW** rules nothing is laced into the db and thus **ESTABLISHED,RELATED** > will never match anything. So I admit I'm a bit confused as to how the internals of `iptables` operate, exactly how does `iptables` go about tagging packets based on the packet state?


can we know the password for the other users if we have root access?

If a person has root access to a particular RHEL machine, will they be able to retrieve the password of the other users?


Debian: Can I remount / read-only in single user mode?

I'd like to use fsarchiver in the safest way possible but have no live medium for booting from. I vaguely remember having read something like this though:   Is it possible to remount / readonly when in single user mode?


diff -r only for certain file types

Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate? E.g. I would like to do _something_ like               diff -r dir-a dir-b -filenames *.java, ivy.xml, build.xml      ... or even better:               diff -r dir-a dir-b -filetype text      Clearly it is not mandatory to use `diff` as I suppose an incantation with `find` and `-exec diff` might also do the trick (I just don't know how to generate the complementary filepaths in the latter case).


arping equivalent for IPv6

What is an equivalent for IPv6 of   `arping -q -c 3 -A -I [device] [ip]`? I know, there is not an arp in IPv6 and Neighbor solicitation used instead, but which linux user space tool can send such solicitation?


IPv6 NDP timer problem

Need to change Fedora Linux's IPv6 stack for NDP DAD timer changes. How to locate the Fedora's IPv6 and IPv4 stack in Fedora distribution dvd/site so that, we can recompile and generate new stack ?


Why does Vim have different cursor positions for different modes?

Why does vim have different cursor positions for the different modes? First, in insert mode, the cursor is between characters (like every other editor), second, in command mode, the cursor is under a character, thus requiring an 'i' or 'a' to put it between characters for writing mode. I mean, why isn't the cursor always positioned between characters regardless of mode? This is related to the question Why does `ESC` move the cursor back in vim?


Automatic Volume settings?

When I watch a Movie on my Desktop PC - Fedora 14 - In many times the Movie is too quiet to hear, but sometimes....it's too loud - Because there's suddenly music, or an explosion, that's really loud... Are there any solutions/script or anything to make the sound volume constant? E.g.: the volume automatically turns down, if there is a loud explosion in the Movie, or something?


Alternatives for "lsof" command?

In many cases "lsof" is not installed on the machines that with I have to work, but the "function" of lsof would be needed very much (ex. on AIX). :\ Are there any "lsof" like applications in the non-windows world? UPDATE: for ex.: I need to know that what processes use the "/home/username" directory?


Align Partition Of HDD Using fdisk?

I first asked this question on SuperUser.com but got no responses. I have found how to align the partition of my SSD using fdisk (SSD article on Gentoo Wiki) but haven't been able to find any resources about aligning the partitions of a HDD. Is this practice necessary, or should I just let something like GPartEd align them as default? If it's something I should do to the HDD as well, where can I find a resource for the size to use for the sector and head portion of the command?


Is there a way to redirect nohup output to a log file other than nohup.out?

I frequently use the program `nohup` so that my processes are immune to hangups. So if I want to make the program `program` immune to hangups, I use the command               nohup program &      where `&` puts the process in the background. When starting, `nohup` gives me the message: > nohup: appending output to `nohup.out' Is there any way to send the output to a file other than `nohup.out`? Often I want to run many processes in the same directory using `nohup`, but if I do this, all the output gets lumped together in a single `nohup.out` file. The manual page (for example, here) does not seem to have an option for specifying the log file. Can you please confirm this? Also, do you have any thoughts of how I can work around this problem?


What is the relation between DISPLAY :1.0 and port 5901

When I start a new X server using vncserver I can connect it using port 5901. From, say, a terminal, I can also do a: export DISPLAY=:1.0 xterm _(it's just an example)_ And I get an xterm on the Xvncserver. What is the relation between :1.0 and port 5901?


Where Is MySQL installed on My Machine?

What is going on, everybody? Recently I have installed MySQL server on my Debian machine using Advanced Packaging Tool, and I am curious where it is installed and how I can find all the source files and user databases. I have only been able to find the configuration at /etc/mysql, and to find some other small pieces using "whereis" command and 'find / -name "mysql"', but besides that, nothing much exciting appears on screen.


I have a vps, and I try to run the comand in CentOs 6.5 32 bits:               sudo yum install sd-agent      And I Get:               Loaded pluings: fasestmirrors     Determining fastest mirrors     Error: cannot find a valid baseurl for repo: rpmfusion-free      I have try to update yum but I get the same error. If I try to `ping` or `gid` a host all works fine. How I can fix this error?


UDP sending two strings in a datagram

I'm wondering if its possible to send two strings within one datagram in a UDP packet. Assume I had string 1 with text: unix and string 2 with text: linux. I don't want to merge the strings but keep them separate when there transferred This is my working code that succesfully reads on the server unix                String name1 = "unix";          String name2 = "linux";                      toSend = name1.getBytes();                     DatagramPacket packSend = new DatagramPacket (toSend, toSend.length, ipConn, 9876);                      connection.send(packSend);      Would it be wise two create 2 separate datagram packets and send the data separately?


find and rysnc?

I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination. Is there a way to combine these two commands?               find ./ -mtime +14 -size +10k      rsync --remove-sent-files -avz /src /dest


Is it safe to use lvresize -r to reduce LVM

I know I can increase the size of file system and LV in one go using `lvresize -r` but is it safe to use the sam approach to reduce a LV file system ? here is the man page of `-r`               -r, --resizefs         Resize underlying file system together with the logical volume using fsadm(8).      I would thought it should be safe if file system gets reduce first. Thanks


Command in a variable

I am trying to run a statement where the name of the command is in a variable. For example:               my_command='/path/to/some/command'          $my_command -f foo -b bar -s something else       But the above does not work. I get errors that suggest that the shell is trying to interpret my arguments as commands. How can I do this in Bash and Zsh?


how to install VMware vSphere Client on centos 6.5

How can I install "VMware vSphere Client" on CentOS 6.5?


Linux Networking routing to virtual ip addresses from a different subnet

New to linux networking, had a question about routing to virtual ip addresses from a different subnet. I have three servers (they can all ping each other): > **A** 10.10.51.182 (connected to router Y)   >  **B** 10.10.51.183 (connected to router Y)   >  **C** 10.10.60.10 (connected to router Z) On server **A** , I created 1000 virtual interfaces:               # ifconfig eth0:0 192.168.1.1 netmask 255.255.0.0       # ifconfig eth0:1 192.168.1.2 netmask 255.255.0.0       ....       # ifconfig eth0:999 192.168.5.200 netmask 255.255.0.0        Each virtual interface is simulating a camera device, with camera simulation software. On server **B** , I added the following route:               # route add -net 192.168.0.0 netmask 255.255.0.0 eth0      And voila, **B** can access/ping the virtual interfaces of machine **A**. Server **C** that is on a different subnet (10.10.60.0), added this route, but even I had super low hope for it to work:               # route add -net 192.168.0.0 netmask 255.255.0.0 eth0      As expected, I wasn't able to reach the virtual interfaces of server **A** , so I removed the route and added the following route using gateway ip of router **Y** :               # route add -net 192.168.0.0 netmask 255.255.0.0 gw 10.10.51.1 eth0     SIOCADDRT: Network is unreachable      The gateway 10.10.51.1 is pingable by server **C** , however I think the error message implies that the _gw_ is not directly on the same subnet (10.10.60). What configuration/route can be configured on server **A** and/or **C** for **C** to ping/access the virtual interfaces of server **A**. I don't have access to change the configuration of the routers. Though, if it's absolutely not possible using changing just the configuration of the servers, could someone please explain in networking terms why **B** can access virtual interfaces of **A** , but **C** cannot access them. Does the router **Y** see packets bound to '192.168.0.0' from **C** and automatically drop them, whereas when packets originating from the same subnet ( **B** ) get allowed?


how to use qemu to run build root linux images?

I have compiled an embedded linux with build root for i386. I didn't edited much, just defaults. Now I want to run it under qemu. But the only thing I see is this: ![enter image description here](http://i.stack.imgur.com/Kgwl1.jpg) I'm running qemu with these options:               qemu-system-i386 -kernel vmlinux -hda rootfs.ext2 -m 256      Why this is happening? I have compiled like the example in the buildroot documentation.


"Requires: perl(:MODULE_COMPAT_5.8.8)"

I use CentOS 6.5 for my server with below repository:   * IUS   * epel   * ces-standard-*   * base/upgrade/extras When I tried to update today (it's been a while I haven't updated this server), I got the following errors:               ---> Package perl-Clone.x86_64 0:0.31-3.1.el6 will be installed     ---> Package perl-DBI.x86_64 0:1.616-1.of.el5 will be an update     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-DBI-1.616-1.of.el5.x86_64     ---> Package perl-MLDBM.noarch 0:2.04-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-MLDBM-2.04-1.of.el5.noarch     --> Processing Dependency: perl(FreezeThaw) for package: perl-MLDBM-2.04-1.of.el5.noarch     ---> Package perl-SQL-Statement.noarch 0:1.33-1.of.el5 will be installed     --> Processing Dependency: perl(Params::Util) >= 1.00 for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Processing Dependency: perl(Params::Util) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     ---> Package perl-YAML.noarch 0:0.72-1.el5.rf will be installed     ---> Package subversion-perl.x86_64 0:1.6.11-10.el6_5 will be installed     --> Running transaction check     ---> Package git.x86_64 0:1.7.11.3-1.el5.rf will be an update     --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.11.3-1.el5.rf.x86_64     ---> Package perl-DBI.x86_64 0:1.616-1.of.el5 will be an update     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-DBI-1.616-1.of.el5.x86_64     ---> Package perl-FreezeThaw.noarch 0:0.5001-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-FreezeThaw-0.5001-1.of.el5.noarch     ---> Package perl-MLDBM.noarch 0:2.04-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-MLDBM-2.04-1.of.el5.noarch     ---> Package perl-Params-Util.x86_64 0:1.07-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Params-Util-1.07-1.of.el5.x86_64     ---> Package perl-SQL-Statement.noarch 0:1.33-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Finished Dependency Resolution     Error: Package: perl-DBI-1.616-1.of.el5.x86_64 (ces-standard)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-Params-Util-1.07-1.of.el5.x86_64 (ces-standard)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-FreezeThaw-0.5001-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: git-1.7.11.3-1.el5.rf.x86_64 (ces-standard-deps)                Requires: libcurl.so.3()(64bit)     Error: Package: perl-MLDBM-2.04-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-SQL-Statement-1.33-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      _I use IOS repo to get PHP5.5 so I would understand getting conflicts on it but the error concerns PERL which I never used…_ Am I supposed to report this in repository mailing list? I could try `skip- boken` but I don't consider it as a good solution.


Which wiki software does CentOS.org use?

Like the title says, if you goto CentOS.org and hit up the wiki, I am trying to figure out which wiki software it is. Usually I can scroll to the bottom and get the wiki software name and version from the footer.


How to have a newline before bash prompt?

How can I configure my bash prompt to have a newline before it? Instead of:               Output1     Output2     kshitiz@ksh$      It should have:               Output1     Output2          kshitiz@ksh$


How can I set a top limit for the PCM value when changing the loudness with pulseaudio?

when I change the loudness with pulseaudio, pulseaudio acts on several of the values I can see when I use `alsamixer -c0` I have a problem: when the PCM loudness exceeds a certain value (80%), the sound crackles (or soaks? I don't know if this is the word). I'd like to make sure the PCM value is fixed to 80%, so that pulseaudio only changes the value of the "Front" channel. How can I achieve that? My configuration: Fedora, KDE


Vim: How to get rid of filetype-specific map?

Edit: Working version. I've mapped `[[` and `]]` to my own functions:               nmap <silent> ]] :let &tabstop += 1 <CR> :echo 'tabstop =' &tabstop <CR>     nmap <silent> [[ :let &tabstop -= &tabstop > 1 ? 1 : 0 <CR> :echo 'tabstop =' &tabstop <CR>      However, according to `:verbose map [[` these are overridden by `/usr/share/vim/vim72/ftplugin/php.vim`. How do I get rid of the PHP mappings while keeping my own? I've tried               autocmd FileType php unmap! [[     autocmd FileType php unmap! ]]      according to the tutorial, but then I get error messages at Vim startup:               Error detected while processing FileType Auto commands for "php":     E31: No such mapping     E31: No such mapping     Press ENTER or type command to continue      Using `nnoremap` instead of `nmap` doesn't help. Putting the mappings in `~/.vim/after/ftplugin/php.vim` also didn't work. `vim -V` shows:               ...     finished sourcing /usr/share/vim/vim72/ftplugin/php.vim     ...     finished sourcing /home/user/.vim/after/ftplugin/php/php.vim      So it does find the supposed override. Combining `nnoremap` and the "after" script doesn't work either.


How to copy all html files from a directory tree to a single directory?

I want to copy all the `.html` files in `myDir` and its subdirectories to `~/otherDir`. Here's what I tried (it doesn't work):               $ find myDir -name *.html -print | xargs -0 cp ~/otherDir     usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file            cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory


wdfs mount problem

I'm running Fedora/Gnome 3.4.2 64bit and I'm trying to mount a webdav file system to work with. As root, I run the command               #mkdir /mnt/webdav     #wdfs https://www.webiste.com:port/directory /mnt/webdav -o allow_other      It asks for the user and pass which I provide and then gives me back the prompt. Then I go and check /mnt/webdav and there are no files. Either as root or my normal user. Then, to try and see what is happening I try               #cd /mnt     #ls     ls: cannot access webdav: No such file or directory     webdav     #      So webdav doesn't exist but bash lists it as a folder? What am I doing wrong?


Preloading the OOM Killer

I don't have any swap partition/file on my machine, and only 2GB of RAM. Sometimes it happens that the memory gets saturated by some process (Xorg+browser+compiler+...) and the system hangs indefinitely, and the only way to restart it (other than hard reset) is with SysRq. I understood that the Out Of Memory Killer won't help me because when the memory is completely full, kernel cannot allocate the OOM Killer itself. Is there any way to preload the OOM Killer, so that it can actually work when memory is completely full?   Or is it possible to tweak the kernel so that OOM Killer gets activated when my ram is full at `${TOTAL_RAM} - 10MB`?


Edit the .config file when en/disabling a particular option like CONFIG_CPU_FREQ?

From here: http://www.xenomai.org/index.php/FAQs#Which_kernel_settings_should_be_avoided.3F > Which kernel settings should be avoided?   >  Note that Xenomai will warn you about known invalid combinations during > kernel configuration.   >  - CONFIG_CPU_FREQ   >  - CONFIG_APM   >  - CONFIG_ACPI_PROCESSOR Now, when I look in the `.config`, I do find these options clearly but I don't know their dependencies. So, it is wise to simply put a `n` next to these options in the `.config` file? Will the make procedure take care of the dependencies? The `make menuconfig` window do not present these options _explicitly_.


Garbage characters appear on screen when typing

When typing, garbage characters somehow appear on the screen for all the letters that I type. The garbage character is a small rectangle box, and this prevents me from executing any commands on the terminal. This happens when I login as root. However, when I log in as a different user, I can type and view the normal characters on the screen. I am using SUSE Linux Professional 10. I am a newbie to Linux, and I am going into circle for several days trying to figure this problem. Any responses will help. Thanks.


How to fix "login: no shell: No such file or directory" when I can not even login?

I installed fishfish(a user-friendly interactive command line shell) on a Linux server, later somebody uninstalled it but I don't know it. After I run `chsh -s /usr/local/bin/fish` without caution, I cannot login the server now. Error message "login: no shell: No such file or directory" showed up which apparently says that shell fish do not exist anymore. The server provides only a CLI interface, so how can I change the login shell when I cannot even login?


How to get Xorg to use the wacom driver for my graphics tablet?

I just got a Wacom graphics tablet, plugged it in, installed the drivers and it mostly works. However `xsetwacom` and the KDE tablet settings module don't recognize it. Upon inspection of `Xorg.0.log` I have discovered that Xorg uses the `evdev` driver instead of the proper `wacom` one. What do I have to do in order to use the correct driver?


Wifi AP with ASUS USB-N10

I am trying to configure wifi AP with subj device. According documentation in web, it requires `master mode` hardware support and `hostapd` software. It seems I have master mode:               # iwconfig     ...     wlp0s29u1u2  unassociated  Nickname:"rtl_wifi"           Mode:Master  Access Point: Not-Associated   Sensitivity:0/0             Retry:off   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:off           Link Quality:0  Signal level:0  Noise level:0           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:0   Missed beacon:0      But, when I try to start hostapd `hostapd -dd /etc/hostapd/hostapd.conf`, it silently exits with `$? = 1`. When I tried it on laptop, it works out of a box, but, probably it worth noting that I had to build N10 driver(8712u) from source. `Linux Dungeon 3.7.10-gentoo-gnu #11 SMP Sun Mar 31 23:12:28 MSK 2013 i686 Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz GenuineIntel GNU/Linux` Here is content of `/etc/hostapd/hostapd.conf`:               ssid=YourWifiName     interface=wlan0     bridge=br0     auth_algs=3     channel=7     hw_mode=g     logger_stdout=-1     logger_stdout_level=2     max_num_sta=5     rsn_pairwise=CCMP      Also, I found probably intresting thing in `$(dmesg)`:               [193240.231986] WARNING: at kernel/timer.c:1056 del_timer_sync+0x2b/0x50()     [193240.231988] Hardware name: System Product Name     [193240.231990] Modules linked in: 8712u(O)     [193240.231995] Pid: 0, comm: swapper/0 Tainted: G        W  O 3.7.10-gentoo-gnu #11     [193240.231998] Call Trace:     [193240.232005]  [<c103170d>] warn_slowpath_common+0x6d/0xa0     [193240.232008]  [<c104001b>] ? del_timer_sync+0x2b/0x50     [193240.232011]  [<c104001b>] ? del_timer_sync+0x2b/0x50     [193240.232015]  [<c103175d>] warn_slowpath_null+0x1d/0x20     [193240.232018]  [<c104001b>] del_timer_sync+0x2b/0x50     [193240.232032]  [<f880f460>] surveydone_event_callback+0x2e/0x130 [8712u]     [193240.232041]  [<f87ffc52>] ? fwdbg_event_callback+0x2d/0x33 [8712u]     [193240.232048]  [<f8800373>] event_handle+0xf3/0x107 [8712u]     [193240.232063]  [<f88198e5>] rxcmd_event_hdl+0x21/0x31 [8712u]     [193240.232068]  [<f88047d4>] usb_read_port_complete+0x84/0x182 [8712u]     [193240.232071]  [<c147d626>] usb_hcd_giveback_urb+0x36/0x90     [193240.232073]  [<c148cb14>] ehci_urb_done+0x64/0xa0     [193240.232076]  [<c148ef7a>] qh_completions+0x26a/0x500     [193240.232078]  [<c1054b31>] ? hrtimer_start_range_ns+0x21/0x30     [193240.232081]  [<c14901b1>] ehci_work+0x641/0x850     [193240.232083]  [<c13da5bb>] ? ata_qc_complete+0x7b/0x1d0     [193240.232086]  [<c13eae50>] ? ata_sff_error_handler+0xf0/0xf0     [193240.232088]  [<c148e7fb>] ? qh_link_async+0x2b/0xb0     [193240.232090]  [<c109ca00>] ? unmask_irq+0x20/0x20     [193240.232092]  [<c14911c7>] ehci_irq+0x1c7/0x3a0     [193240.232095]  [<c105b220>] ? __wake_up+0x40/0x50     [193240.232098]  [<c12ed068>] ? __mix_pool_bytes+0x38/0x70     [193240.232100]  [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160     [193240.232102]  [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160     [193240.232104]  [<c109ca00>] ? unmask_irq+0x20/0x20      Any advices?


shell scripting escaping madness - sending single quotes to subshell

I'm beyond my skill level in getting this to work properly...               #!/bin/bash -x     # mxfbc.sh - mxf video file batch converter     # pass at the command line ...     # (1) the directory to batch convert (typically called CLIPS00X from the Canon XF100 and,      # (2)the file type to convert (typically MXF from the Canon XF100)          # updated 2012-Feb-18          CLIPS_dir="$1"     type="$2"               function ffconvert()     {     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV         ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec copy -threads 0 -map 0:0 -map 0:1 -acodec copy -map 0:2 -acodec copy "${1%%.*}"\.MOV     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec copy -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV     }     #12          SAVEIFS=$IFS     IFS=$(echo -en "\n\b")          date     for item in $CLIPS_dir* ; do          if [ -d $item ]; then              inputs=""         map=""         count=0              #echo -e "Item: $item"                 for file in $item/* ; do                          if [ ${file#*.} = "$type" ]; then                         #date                         #echo -e "Now processing: ${file##*/} \n"                         #echo "File name: ${file%%.*}"                         #echo "File type: ${file##*.}"                         #inputs="$inputs -i ${file##*/}"                         inputs="$inputs -i ""'""$file""'"                         map="$map[$count:0] [$count:1] [$count:2] "                         count=$(($count+1))                               # ffconvert "$CLIPS_dir$item/$file"                 #       echo -e "Finished processing: ${file##*/} \n"                          fi                 done                 filter=$map                 #echo -e $inputs                 echo -e $count                 #echo -e $map                 #echo -e $filter               echo ffmpeg "$inputs"" -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex ""'""$filter""concat=n=""$count"":v=1:a=2 [v] [a1] [a2]'" -map \'[v]\' -map \'[a1]\' -map \'[a2]\' "'""$item"\.MOV"'"     fi          done                    # restore $IFS     IFS=$SAVEIFS      this script currently echos the ffmpeg command with perfect formatting, but I can't get it to execute the command. It always complains with an error about "Invalid Argument". Basically, I need to pass a lot of single quote characters in the command that goes to the subshell. The final product to send to subshell looks like this:               ffmpeg  -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071501.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071502.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071503.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071504.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071505.MXF' -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2] [3:0] [3:1] [3:2] [4:0] [4:1] [4:2] concat=n=5:v=1:a=2 [v] [a1] [a2]' -map '[v]' -map '[a1]' -map '[a2]' '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715.MOV'      ## Edit: Ok... nevermind .... Got it... thanks for listening. And for anyone who is looking to take files from a video camera (which automatically segments the files) and rejoin or concatenate them into a continuous video using ffmpeg, here's a script. ...               #!/bin/bash -x     # mxfbcc.sh - mxf video file batch converter and concatenate parts into a whole     # pass at the command line ...     # (1) the directory to batch convert (typically called CLIPS00X from the Canon XF100 and, nothing else          # updated 2013-April-3          CLIPS_dir="$1"               function ffconvert()     {     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV              ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec copy -threads 0 -map 0:0 -map 0:1 -acodec copy -map 0:2 -acodec copy "${1%%.*}"\.MOV     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec copy -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV          }     #12          SAVEIFS=$IFS     IFS=$(echo -en "\n\b")          date     for item in $CLIPS_dir* ; do          if [ -d $item ]; then              inputs=""         map=""         count=0              #echo -e "Item: $item"                 for file in $item/* ; do                          if [ ${file#*.} = "MXF" ]; then                         #date                         #echo -e "Now processing: ${file##*/} \n"                         #echo "File name: ${file%%.*}"                         #echo "File type: ${file##*.}"                         #inputs="$inputs -i ${file##*/}"                         input+="-i '${file}' "                         map="$map[$count:0] [$count:1] [$count:2] "                         count=$(($count+1))                               # ffconvert "$CLIPS_dir$item/$file"                 #       echo -e "Finished processing: ${file##*/} \n"                          fi                 done                 filter=$map                 #echo -e $inputs                 #echo -e $count                 #echo -e $map                 #echo -e $filter                 #echo -e                eval ffmpeg ${input} -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex \'$filter concat=n=$count:v=1:a=2 [v] [a1] [a2]\' -map \'[v]\' -map \'[a1]\' -map \'[a2]\' \'$item\.MOV\'     fi          done                    # restore $IFS     IFS=$SAVEIFS


Variable scope in multiple pipes

I was trying to do something following,               find . -name "*.dat" | get the basename of file | move filename returned by first command to basename returned by second command      To give a concrete example, I want `./mydir1/dir2/file1.dat` to be renamed as `file1.dat` . Can I do it using pipes. If yes, how to I store output of first command in a variable in first pipe and use it in second pipe. I hope that I am using the term pipe correctly.


How to insert the result of a command into the text in vim?

For instance, `:echo strftime(%c)` will show the current time on the bottom, but how to insert this time string to the text (right after the cursor)?


How to change the Linux Mint Nadia splash screen?

I was wondering if it is possible for me to change the splash screen when Linux Mint is loading? I am talking about the logo of mint which appears when you start the computer. If so what kind of file format is it? And is it difficult to do?


| Grep, Find which file the strings came from

I have a set of PDFs, and I am running               strings * | grep message      This returns the strings containing that method, is there anyway I can get grep to tell me which file it is from?


How to use IBus with kde

The KDE install on my PC includes IBus and the Japanese Anthy IME. In the IBus preference, I have enabled the Anthy IME. The IBus daemon is running and there is an IBus icon in the system tray, however, there does not appear to be any way of switching IMEs. This is on PC-BSD 8.2. What am I doing wrong here? Thanks


Will a "customized" initrd survive a kernel update via yum?

I have a CentOS 5.5 installation with the stock CentOS 5.5 kernel. I have modified the init script in the initrd, commenting out some unneeded modules, lowering the interval time of the "stabilized" command , etc. My question is, what will happen in the future when Yum updates the kernel? Will my initrd modifications make it into the initrd of the new kernel?


More free blocks than reserved, but still I get "no space on device"

As you see in this dumpe2fs -h output (snipped the end, left the head in case something is important), I have more (about 86000 more, in fact) 'Free blocks' than are reserved, but I get a "no space on device" error even for a little tiny file (echoing something into a file for testing). Color me stumped.               dumpe2fs 1.41.12 (17-May-2010)     Filesystem volume name:        Last mounted on:               Filesystem UUID:          b7d8fde6-faa4-4c13-b310-32f302cc6db6     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file     Filesystem flags:         signed_directory_hash     Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              9707520     Block count:              38808000     Reserved block count:     1940400     Free blocks:              2026361     Free inodes:              9583170     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      1014     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512


understanding /dev/disk/by- folders

**Question** : What does `/dev/disk/by-path`describe? And where is this documented? Going through the meaning of what is displayed in the folders `/dev/disk/by-` I've got that far, and I wonder **is this correct**?   * `by-id` -> based upon the serial number of the hardware devices   * `by-label` -> Whatever name was set manually for this disk   * `by-path` -> **?!**   * `by-uuid` -> Universal Unique Identifier: a uniquely created string to identify the disk [done so through the system]    [Note: I work on GNU/Linux Debian 7, Crunchbang, if this matters…]


Bash function to scp a file not working

I am new to bash scripting and read basic tutorials online and wrote following simple bash function:               function to_company()      {         scp ${1} username@long.server.name.company.com://home/username      }      When I do:               $ to_company code_diff.txt       It asks for password and then fails with following message:               scp: //home/username: not a regular file       I tried giving `//home/username/` & `//home/username/${1}` in the script but got the same result. If I manually execute above command and pass `code_diff.txt` in place of `${1}`, file is transferred without issues. What mistake am I making?


How to change default permissions of files created by a process?

I'm running a game server (unreal tournament 2004) on Centos 6 x86. I use a sh script to start it in a background process. This process (game server) creates different files (demos, logs) and they all come with 0600 permission by default. I have to process them with some applications so what I want is to change their default permission (to 0644 for example). I'm root, I have umask 022 and files I create are 0644 by default. But it seems like this game server process don't inherit my umask. How can I change it? I'm pretty new to linux so a detailed answer would be appreciated. Script used for running server:               #!/bin/sh     # Set the following to your UT2004 directory.     UT2004HOME=/home/ut2004          LOG=Server1.log          if [ ! -d "$UT2004HOME/Logs" ]; then     mkdir $UT2004HOME/Logs     fi          cd $UT2004HOME/System          while true; do          ./ucc-bin server DM-Rankin-FE?game=XGame.xDeathMatch?Mutator=UTzoneTAv1.MutUTzoneTA,utcompv17a.MutUTComp,XWeapons.MutNoSuperWeapon,XGame.MutNoAdrenaline?MaxPlayers=2?DoubleDamage=False?TimedOverTimeLength=0?GameStats=True?AntiTCCSettings=NoMidGameChecks ini=server1.ini -nohomedir -lanplay &> $UT2004HOME/Logs/$LOG          DATE=20`date +%y%m%d`-`date +%H%M%S`     mv $UT2004HOME/Logs/$LOG $UT2004HOME/Logs/crash-$DATE.log          done;      I put it in an sh file and then start it in putty shell as root as a background process using & on the end of string. ### UPDATE #1 Output from `ls -ld $UT2004HOME/Logs`:               drwxr-xr-x 2 root root 4096 Sep 1 10:22 /home/ut2004/Logs      files in this directory are `rw-r--r--`. The output for 2 other directories that contain files I need to be `rwxr-xr-x` is the same:               drwxr-xr-x 2 root root 45056 Sep 26 14:16 /home/ut2004/Demos      drwxr-xr-x 2 root root 28672 Sep 26 18:03 /home/ut2004/UserLogs       but files in them are `rw-------` When I ran the command `file ./ucc-bin` it was reported to be a binary file.


Why does Tmux Space leader also make 2 a leader?

I have a very simple tmux config file that contains the following:               set -g prefix C-Space      This works great for using my spacebar as a leader, however it also makes C-2 and C-@ leaders. This is really messing with some of my other commands (in vim specifically). Can anyone explain why this is happening and tell me what I need to do to get the spacebar to be the leader without magically also accepting 2 and @ as leaders? I've tried to specifically `unbind` C-2 and C-@ to no avail. Any help would be greatly appreciated!


Linaro toolchain libstdc++.so.6 missing

I'm trying to run the arm linux gcc (linaro 2013 toolchain) and am getting the following error:               arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory      It's building 32 bit on a 64 bit operating system. I'm running Ubuntu Precise.


How do I log in as non-interactive user? (e.g. mysql)

I need to run a command `mysql_upgrade` which, when ran as root, returns               Looking for 'mysql' as: mysql     Looking for 'mysqlcheck' as: mysqlcheck     Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/lib/mysql/mysql.sock'      mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect     FATAL ERROR: Upgrade failed      So I decided I need to log in as user `mysql`. How can I do it? I set up the password for the user `mysql` with `passwd` and try to log in:               $ ssh -l mysql 12.34.56.78     mysql@12.34.56.78's password:      Permission denied, please try again.      I logged in as root and set shell for `mysql` with `chsh -s /bin/bash mysql`. I checked that `/etc/ssh/sshd_config`'s `AllowUsers` entry contains user `mysql` and `DenyGroups` contains only `deniedssh`; the latter group doesn't contain user `mysql`:               # getent group deniedssh     deniedssh:x:500:      What can I do to log in as the non-interactive user `mysql`?


Remove multiline text with special chars from all files in a folder

I have multi-line text with special characters (`i.e. //*(): etc`) looking like following in multiple files in a folder that I'm trying to remove. Tried all different solutions using `sed` and `awk` but none of them seem to like `//`.               // Some text with (something else) and a clack 6*5.      // Rest on the next line with some more       // etc. http://website.com/helloworld.php      // and just another line.      All I need is to search and get rid of this text from all of the files in `data` folder.


Linux Alternatives to Windows Spiceworks?

I really like Spiceworks for managing our network at work; but there's a problem with it; it runs on Windows, and I don't want to have to buy a copy of Windows just so I can manage, ticketing, scans, etc on my home network. Is there anything similar to this that can be run on Linux?


Why doesn't the SSL_CERT_FILE trick works on Ubuntu?

$ echo | openssl s_client -connect foo.com:443 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.foo.com.pem     $ function S { export SSL_CERT_FILE=/home/user/.foo.com.pem; /usr/bin/lynx -width=9999 -force-secure -dump https://www.foo.com/list.txt | fgrep -i $1; unset SSL_CERT_FILE; }     $ S bar          Looking up www.foo.com     Making HTTPS connection to www.foo.com          lynx: Can't access startfile https://www.foo.com/list.txt     $       **My question:** This works perfectly on Scientific Linux 6.5. But it gives the mentioned error message on Ubuntu 12.04. Why?


Window title centered fluxbox

I'd like to center the window titles in fluxbox. Now they are all at the right side. How can I change this option? ![enter image description here](http://i.stack.imgur.com/asABP.jpg)


Temporarily use something else as home directory

If it is possible, should be pretty basic, but I am puzzled how to ask Google the right question (or it is impossible). Lets say we have               /home/user/     ...conf     /home/user/candidate/     ...conf      We have homedir and some subdir.. programs will use naturally from homedir(`*/home/user*`) What I need is to temporarily change home user to `*/home/user/candidate*`, so programs will call `*/home/user/candidate/conf*`, instead `*/home/user/conf*` Now, I don't need usermod or anything else to change permanently `/etc/passwd`, i want to temporarily force programs to use my directory, thinking it is home, but on reboot fetch `*/home/user*` and act normal. Using `*/home/user/candidate*` as home only session long, no usermod stuff.


Parse,Manipulate Data In linux/Unix

I want to have exactly the same output in this post(http://unix.stackexchange.com/questions/126139/extract-data-in-linux- unix)as above,but I have a new input file,which is below:               ABCB11  4   ACE 11     ABCB11  4   CHRM1   114     ABCB11  4   CHRM2   115     ABCB11  4   DRD2    158     ABCB11  4   EGF 164     ABCC8   5   ACE 11     ABCC8   5   ADRA1A  21     ABCC8   5   ADRA1B  22     ABCC8   5   ADRA1D  23     ABCC8   5   CHRM1   114      Taking all the unique genes and creating the output. I want all rows to have fromid,after taking distinct values from both. The exact output is what I want below:               ABCB11 = fromid=4,from=ABCB11     ABCC8 = fromid=5,from=ABCC8     ACE = fromid=11,from=ACE     CHRM1 = fromid=114,from=CHRM1     CHRM2 = fromid=115,from=CHRM2     DRD2 = fromid=158,from=DRD2     EGF = fromid=164,from=EGF     ADRA1A = fromid=21,from=ADRA1A     ADRA1B = fromid=22,from=ADRA1B     ADRA1D = fromid=23,from=ADRA1D


Nvidia HDMI audio not visible on system

I recently installed Arch Linux on my pc. I'm using a Nvidia GTX 660 Ti connected to a receiver over HDMI. I can't get audio to work over this HDMI connection. Next to my video card I have an onboard realtek audiochip which I really don't want to disable and a AMD R7 videocard which is disabled in efi. I'm using the Nvidia proprietary drivers and my wholse system is updated as of today. `lspci -k` reports:               01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)     Subsystem: ASUSTeK Computer Inc. Device 841e     Kernel driver in use: snd_hda_intel     Kernel modules: snd_hda_intel      `aplay -l` reports:               card 0: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]     card 0: Generic [HD-Audio Generic], device 3: ALC887-VD Digital [ALC887-VD Digital]      how can I get my HDMI port to show up as an audio device?


How to map Unix Directories to Windows Server

I have a Windows Server 2008 R2 machine and an AIX 6.1 server. Now I would like to map 2 AIX folders to Windows for an application to access - The application on Windows is IBM Connect:Direct and needs to permanently transfer files to and from the Directories on the Unix server. On windows-to-windows this is easy, you just specify in the UNC paths in the Connect:Direct config files eg: `\\\192.168.30.30\d$\BARC\Input\`               STEP1 COPY          FROM (             FILE="&F"         )         TO (             FILE="\\192.168.30.30\d$\BARC\Input\&DF"             DISP=RPL         )      How is this done?


qtconfig tool for Qt 5?

I've just installed QT 5 in Arch Linux, but only `qtconfig` doesn't work:               %> qtconfig     qtconfig: could not exec '/usr/lib/qt/bin/qtconfig': No such file or directory      Yes, there's no such file, not even `/usr/lib/qt5/bin/qtconfig` Any ideas where to locate it? I need to adjust the font of `smplayer`, which is linked with QT 5 libraries now.


what does getline do inside awk?

I have this following `awk` script that takes the following input file, `input.txt` and produces the output below. Can someone please take the time to break down how this `awk` script works? I've spent a bit of time on it and it's not making a whole lot of sense. * * * **Input:** `$ cat input.txt`               FINISHED     RSYNCJOBNA     20140502 0021 2182096 2082096 6 5     2014820905820902 10:02:15     2014820905820902 10:56:42     0:54:27          INITIATED     RSYNCJOBNA     20140502 0022 3282096 3182096 6 5     2014820905820902 15:31:06     0:06:04 ce eque**      **Output:**               RSYNCJOBNA|0021|20140502|10:02:15|10:56:42|0:54:27|FINISHED     RSYNCJOBNA|0022|20140502|15:31:06|        |0:06:04|INITIATED      **Command to get the above ouput:**               awk -v OFS='|' '/FINISHED|INITIATED/ {             status = $1; getline;             jobname = $1; getline;             sequence = $2; date = $1; getline;             start = $2; getline;             if (status == "FINISHED") { end = $2; getline } else { end = "        " }             runtime = $1;             print jobname, sequence, date, start, end, runtime, status;         }' input.txt      My understanding is that `/FINISHED|INITIATED/ {}` means that the commands inside the curly braces will only be run on lines matching either `FINISHED` or `INITIATED` but as far as I can tell from the output, the script seems to be parsing from _all_ lines. What's going on?


When speaking about cache size of a CPU, we only need the size of the cache at the furthest level

When speaking about cache size of a CPU, do we only need to know the size of the cache at the furthest level (such as at level 3, when the cache hierachy is 3-level)? Instead of the sum of all the caches at all levels? This is what I observe from comparing the output of `lstopo` and content of `/proc/cpuinfo`. Thanks!