Tag Info

New answers tagged

3

You can get it by typing capital V instead of small v: $ pgrep -V pgrep from procps-ng 3.3.3 $ pkill -V pkill from procps-ng 3.3.4


2

To get some version information, find pgrep in your PATH and run the command what. I get: % what /usr/bin/pgrep /usr/bin/pgrep PROGRAM:pkill PROJECT:adv_cmds-149 Note that the program name is pkill. pkill and pgrep are hard links to the same binary on my system (OS X). Explanation (from the manual): NAME what -- show what versions of ...


0

Nothing (fundamentally) wrong with that code, your problem is you've reset "IFS" somewhere else, it's probably empty (so the output of seq is treated as a single token). Long time since I've seen $[], it's obsolete (and undocumented). Use $(( )). Instead of seq use for (( )), and instead of adding 1, use let var++, so we have: for (( i1=1 ; i1<5; ...


-1

you can do addition in bash script currentSet=0; current=`expr $current + 1`


2

Seems like you have some problems with your ${team_two[*]} & ${team_two[k1]} arrays. You can turn the Bash debugging on by adding a set -x before you enter the outer for loop. And then disable it afterwards with a set +x. set -x ... for loop block ... set +x Example When I run your code through Bash in this manner I get the following output: $ bash ...


2

You can make a more sophisticated script, which allows you to run under a specific user's permissions, as follows: #!/bin/sh NAME=myservice DESC="My Service" USERGROUP="myservice:myservice" #Helper functions start() { start-stop-daemon --start --quiet --background --make-pidfile \ --pidfile /var/run/$NAME.pid --chuid $USERGROUP \ ...


3

USB 2.0 or 3.0 is a hardware specification and has little to do with the OS. There's no way to downgrade (or upgrade) an specific USB version. What you can do is plugging your device in a 2.0 hub. USB 3.0 is totally backwards compatible with 2.0 and 1.1 devices, but some glichs can appear in the kernel implementation of the specification, in such cases is ...


0

I had this very same problem, what i found was my IP keept getting added to the etc/hosts.deny file. I resolved this by simply logging into another VPS server then connecting ssh into the blocked VPS and removed my (home static) IP from the hosts.deny file.


3

In bash while read -r word do grep -q "$word" file.before if [ $? -ne "0" ] then echo "$word not in file" fi done < <(cut -f1 -d" " file.after) The -q to grep tells it to be quiet, you can then interrogate $? to see if there was a match 0 or not 1.


3

You'll want to do something more like this: for i in $(cat /tmp/10218.after) do grep $(echo ${i} | cut -f1) /tmp/10218.before done If you want to get a bit more fancy and output something if the grep fails you cand do something like: for i in $(cat /tmp/10218.after) do COUNT=grep -c $(echo ${i} | cut -f1) /tmp/10218.before if [[ ${COUNT} ...


1

Use perl. #!/usr/bin/perl use strict; use warnings; my %words_to_find; open ( my $input, "<", "/tmp/10218.after" ); while ( my $line = <$input> ) { my ( $word ) = ( $line =~ m/\A(\S+)\s/ ); $words_to_find{$word}++; } close ( $input ); open ( my $search, "<", "/tmp/10218.before" ); while ( my $line = <$search> ) { foreach my ...


0

The error message is because it is asking a yes/no question, and "1" is not yes or no. Don't use parted's mkfs command: it is incomplete ( doesn't even support ntfs ), broken, and was removed from parted upstream several releases/years ago beacuse of this. Use mkntfs instead.


0

While the documentation in various sources states that "mkfs 1 fat32" is the correct command, and I've even found screenshots of people successfully using it, it doesn't work in real life. However, as mentioned in my comments if you don't specify the information ahead of time Parted will prompt you to input it later, and that will work. This of course means ...


0

Here is a step by step tutorial to make it a VPN server. VPN will send all your internet traffic through an encrypted tunnel to your VPS: First, install the pptpd package. pptpd offers a PPTP-type VPN which is supported by Microsoft and other network vendors. This is also the easiest to setup. sudo apt-get install pptpd Next up, edit /etc/pptpd.conf with ...


1

I don't know about Parted, but try something like this in the shell: $ mkfs -t ntfs /dev/sdXX Do not use /dev/sdXX . First find the partition. df -H lists currently mounted ones and their size. The partition should look something like /dev/sda1 or /dev/hda1. From the man page: mkfs [options] [-t type] [fs-options] device [size] ... The device argument ...


1

Check out SUSE Studio. It basically lets you choose a base and customize it, appearance-wise and package-wise.


8

I think you can use UDEV to do what you want. Creating a rules file such as/etc/udev/rules.d/99-thumbdrives.rules you'd simply add a rule that will allow either a Unix group or user access to arbitrary USB thumb drives. KERNEL=="sd*", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", OWNER="<user>", GROUP="<group>", MODE="0660" Would create the device ...


0

I am using Ubuntu 13.10 as the host and I had the same issue. I found that docker installs a rc script for docker in /etc/init.d/docker and at the same time installs an upstart script at /etc/init/docker.conf. I just had to remove the rc script /etc/init.d/docker for this issue to go away. Hope this works for you as well.


1

d="${MAPPED_LOCATION}/$(python_script)" [ -d "$d" ] && echo "$d" || exit 1


0

I asked a very similar question not so long ago - fstrim trims more than half of partition size even though partition mounted with discard. There is a more detailed explanation/discussion of what happens on this question, but basically the record of what has been trimmed with fstrim (and the underlying FITRIM ioctl) is kept in kernel memory and is not ...


0

You can put them in a simple bash script. As an example we will use /root/startup.sh #!/bin/sh cap development unicorn:start cap development unicorn:stop cap development sidekiq:start cap development sidekiq:stop The make sure the script is executable: $ chmod +x /root/startup.sh Now you can run it and it will execute all the commands one after ...


3

I would take a look at this guide from the CrashPlan website titled: CONFIGURING A HEADLESS CLIENT. It spells out the details of how one would go about installing CrashPlan for use in a headless situation, which is really what you want. But I just want to disable the GUI If you're using a desktop environment such as GNOME you can launch the configuration ...


0

First, set-up squid - sudo apt-get install squid Follow the directions at the above link to configure it. Allow only localhost to be secure. Then, set-up port-forwarding - from local port 3128 to remote port 3128 (to use the squid defaults); then configure your web-browser to use port 3128 and localhost as your proxy. Requests will go over the ssh port ...


0

You do not have access to the shutdown command. Try this executing this: sudo chmod u+s /sbin/shutdown then in your crontab, specify the full path to shutdown 0 22 * * 1-5 /sbin/shutdown now


3

In short, Linux Mint does uses exactly the same base as Ubuntu. In fact, if you check the contents of /etc/apt/sources.list, you will see that Mint uses the Ubuntu archives for most of its software. Most likely you have made an error in installing the software. Particularly when you say that you 'downloaded' the software, it implies that you didn't use ...


3

I think the major misconception here is that issuing TRIM will cause the blocks to be erased then and there. Really all that the TRIM command is doing is informing the SSD that the OS no longer needs the data at this location, exactly what happens after that is up to the firmware Ideally the firmware should use this information to: Avoid copying and ...


1

There is almost certainly a better way of doing this, probably through limits.conf but I don't know it so here's a dirty hack. This command will kill all processes owned by the user terdon that are using more than 3G of RAM: ps -u terdon -o vsize= -o pid= | while read mem pid; do [ $mem -gt 3145728 ] && kill $pid; done The ps -u terdon -o ...


0

Commenting # all lines responsible for command-not-found in /etc/bash.bashrc solved problem, wich was created by switching python versions.


1

It's an old system, so I would avoid anything with a fancy window manager. You could try running Xubuntu, since it has a light-weight window manager. I would advise you to steer clear of older Linux versions because they might not be supported anymore (especially security patches). When installing Ubuntu/Xubuntu, let it use the entire drive. It will ...


1

Partial success. I was able to get the system to register to spacewalk by manually adding the upstream sources to my /etc/apt/sources.list: deb http://ftp.de.debian.org/debian sid main Importing the GPG key: gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 gpg -a --export 8B48AD6246925553 | apt-key add - Then I did an apt-get update for good ...


0

/proc/meminfo will tell you how free works, but /proc/kcore can tell you what the kernel uses. From the same page: /proc/kcore This file represents the physical memory of the system and is stored in the ELF core file format. With this pseudo-file, and an unstripped kernel (/usr/src/linux/vmlinux) binary, GDB can be ...


2

This website tells you that the package is in the repository. You should not download the package from the website to install it. You should use your package manager : sudo apt-get install patch


3

".deb" files are not executable binaries. Use dpkg command to install your package : dpkg -i your_package.deb


2

You can put your command in file /etc/rc.local: #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. java -jar ...


1

It looks as if those packages just aren't available to 12.04 LTS (Precise). Searching via Ubuntu Packages seems to bear this out. excerpt Exact hits - Package apt-transport-spacewalk         Since you're probably comfortable rolling your own RPMs I might be inclined to roll my own .deb file here, taking the package files ...


1

You are missing one of the drivers that is necessary to access your root filesystem. The code in the initramfs is looking for a block device to mount and failing, so the problem is in accessing that device. You won't get a more explicit message because the code in the initramfs can only see what it has access to and the problem is that it doesn't have access ...


0

Found it!!! It was the drivers for my hard disk controller, SATA AHCI was not added while configuring kernel before compilation. Now I added, recompiled and viola! new installed kernel booted up. :)


0

Ok, instead of the method you mentioned at first try this: First, make sure you have deb-src entries in your sources.list file and you have run apt-get update. It will make the steps below easier. Now install building tools: sudo apt-get install devscripts install your build dependencies: sudo apt-get build-dep php5 Get the sources of php5: apt-get ...


1

There are several alternatives here: Add the --prefix=/usr/local to the configure script (assuming this is what PHP uses) or otherwise ensure that your PHP is installed to /usr/local. This would mean that you would have your own build of PHP installed alongside the system one. Since, for example, /usr/local/bin takes precedence over /usr/bin in PATH, your ...


0

The problem turned out to be that UDP packets were not being passed. I don't know why. TCP DNS works just fine. In the end I used network-manager-openconnect and only retained one virtual adapter in VirtualBox, and it works.


2

The poster successfully rebuilt the Okular PPA sources on his system. Some versions of the build dependencies were not quite correct for his system, so he had to adjust them. It is unclear why this was necessary, since the posters system is Precise and so is the PPA. @Graeme and I walked him through the process in the unix.sx chat room. The transcript of ...


2

Channel bonding What you're talking about is channel bonding. That won't do what you're describing however. Bonding like this combines 2 NICs together so that they're combined into a unified NIC device which is then assigned a single IP address. Routing To do what you want you'd need to either do it using traditional routing rules, setting things up so ...


3

What makes you think X-related processes are still running? When you log in remotely xrdp (re-)connects you to your GUI environment. If you don't have one running already then xrdp-sesman will cause a GUI environment to get initialized. (If you want to prevent that you could sudo service xrdp stop although it will likely come back on re-boot unless you ...


1

No it's not. Bonding mashes the two in to a single pseudo interface and load balances across them. What you want is sort of the opposite of bonding. It looks like what you want is more like what is discussed in this thread.


2

Definitely looks like you have everything from the ppa that you need (sometimes you may not if the dependencies aren't versioned correctly). Grepping my own system, it seems the missing symbol is in libkactivities6. There is no versioned dependency here so I can't tell which one it is built against. I would check to see what other versions of the package ...


4

It sounds like you want something like this (although it's not clear what you mean when distinguishing "iterative command" from "recursive command", since rm -rf is both recursive and iterative): find . -type d -name '.[^.]*' -prune -exec echo rm -rf {} + Once you're happy, remove echo from the option arguments to -exec to remove the listed directories.


0

I'd actually recommend sticking with Filezilla. It's one of the most feature-rich graphical FTP clients on any platform, and the GUI is continually improving. Installation on Ubuntu / Debian / Linux Mint is as simple as sudo apt-get install filezilla.


2

Since you're running it inside of VMware you need to install VMware Tools into the VM Guest (Ubuntu). Typically this would be done via a pulldown but since you're using what looks to be VMware Player you'll need to copy the ISO file into the VM and then mount it and install it yourself manually. You can read more about how to do this on the VMware Kowledge ...


1

Take a look at the openbox man page. I would start with the --debug switch when you invoke it. excerpt --debug Display debugging output. --debug-focus Display debugging output for focus handling. --debug-xinerama Split the display into two fake xinerama regions, if xinerama is not already enabled. This is for debugging ...


0

Using all your answers, I found my way in this order : Installation : HDD configuration like Sergey said. When creating the VM with virt-manager, don't create the disk immediately (unclick "enable storage..."), clic "customize configuration before install" on the next screen, and create the HDD manually just after, with this options : - Storage format: ...



Top 50 recent answers are included