Tag Info

New answers tagged

0

Here's an improvement on lilton's answer: you don't need awk at all for lynx's got some useful options. lynx -listonly -nonumbers -dump http://www.google.com.br if you want numbers lynx -listonly -dump http://www.google.com.br


0

Easier if you do it more Unix-y, more shelly -- only 2 commands required: get list of the filenames (=Distinct Union of all dirs' files) cat all dirs' part-file(s) into Output dir's whole-file(s) #### get list of files as Distinct Union of all dirs' files # (alas, basename can only handle ONE filename at a time # so have to loop through them) ...


0

Much better solution then tunnelling is using ProxyCommand, as described here: Forward SSH traffic through a middle machine To match your use case: Host tunnel HostName 192.168.1.27 Host target HostName localhost Port 2003 ProxyCommand ssh tunnel -W %h:%p or ProxyCommand ssh tunnel nc %h %p Then doing just ssh target does everything for you. ...


0

if You log out, after entering your login-name to log in again, you can chose the wm to use (probably right above your name, not sure because I do not use Lubuntu, but it is there somewhere). If you chose a wm that is not the default, you will get a notification asking you if you want to set it as your default and next time if you boot up your system you ...


0

If the file has no special setuid flags (i.e. ls -l stop_iq shows only a mix of the chars "rwx-" in the first field) you can simply, as root, chown dev stop_iq and chmod u=rx,og= stop_iq so only user dev can execute the file. This assumes no one else but you can sudo to root.


0

Ultimately I agree with @user474521 ...but I guess what I was really looking for was an explanation of how to properly parallelize dd so I'm giving the check-mark to @Ole-Tange.


2

I was in your exact situation, dual-booting Windows 8.1 and Ubuntu (15.04). While I would not recommend attempting any sort of Windows OS upgrade without a backup (like I carelessly did), upgrading went miraculously well for me. Using the tool found at the Microsoft website, I simply ran it from my Windows 8.1 partition, let it download and configure its ...


0

You can try this bash script. It finds files named '.csv' in the first directory and concatenates it with the same filename found in the 2nd directory, after deleting (1d) its 1st line (csv header). The resulting file is in the 3rd directory. a=Folder_A b=Folder_B c=Folder_C mkdir -p $c (cd $a && find . -type f -name '*.csv') | while read file do ...


1

The above solutions are quite well described, however, none of them worked for me UNTIL I also edited PuTTY configuration to : Enable TCP keepalives (SO_KEEPALIVE option) I hadn't seen this anywhere else, and just found it by trial and error.


0

I got it. hosts.allow should be written like this sshd:/root/denylist:deny sshd:all and the deny list can be like this 31.101.16.127 31.101.16.45 I put this in hosts.deny ALL:ALL@ALL and now its working properly and banning IPs in the denylist


-1

OK, thanks to several folks on this and other forums, I found the answer. The key is to know the file system type of the partition of interest. The lsblk command shows where the (name:broken) volume is mounted. The mount command with no parameters provides the required information about file system type, which is ext4 in this case. Note that several ...


0

Whcih kernel are you using? This used to be an issue with 3.16, see this Arch Linux Wiki page, for instance. According to this contribution, According to this thread, https://lkml.org/lkml/2014/5/11/85 if the display doesn't blank out, everything is fine. However with the latest updates, the display occassionally blanks out while in use. which indeed ...


0

Deltik, you've misunderstood how Linux Software RAID (md) works. md makes a virtual block device out of multiple devices or partitions and has no awareness of what data you are transferring to and from the virtual device. You hoped that it could do things that it wasn't designed to do. Answers 1. Why doesn't md fail the unresponsive drive/partition? ...


0

Fixed this by moving /srv/www/wordpress to a subdirectory. The final URI is: /srv/www/html/blog with the Wordpress files in /srv/www/html/blog The server block then will have this instead: root /srv/www/html; # Redirects users from root to /blog location = / { return 301 http://example.com/blog; } location /blog { # index index.html index.htm ...


0

These two statements push "remote-gateway 52.58.43.124" push "remote-gateway 10.0.31.207" don't make any sense. First, they contradict each other. Second, this kind of push option does not exist: from the online manual This is a partial list of options which can currently be pushed: --route, --route-gateway, --route-delay, --redirect-gateway, ...


0

maybe you can use killcx, keep the pid alive but special connections closed. syntax : killcx [dest_ip:dest_port] {interface} dest_ip : remote IP dest_port : remote port interface (optional) : network interface (eth0, lo etc). example : killcx 120.121.122.123:1234 killcx 120.121.122.123:1234 eth0


0

Unless the underlying device driver supports scheduling two I/O operations at once through some bizzare ioctl stuff, you can't issue explicitly parallel I/O operations to a device. dd is the wrong tool for that anyway since it works by writing data to a file or block device sequentially - the best you can do is tell it to write a large block size which ...


0

Although this question is a tad old, I'd thought I'd share my solution since none of the other answers addressed how to have this work on boot. My situation: I have a Happy Hacking Keyboard that plugs in via usb that has keys moved around (control where caps lock is, etc). I use this most of the time, but sometimes I would like to use the standard laptop ...


1

I've found in urbackup the backup tool which fits my needs and was realy easy to install and configure. http://www.urbackup.org/ The first file-backup was finished in about 10minutes after the download.


0

It is possible that PATH still contains the old ruby location (/usr/bin/env). Try appending your new ruby bin before $PATH. Like follows: export PATH=/new_bin/:$PATH If another ruby bin path is before the new one, it will be of higher priority in PATH.


1

According to the documentation: "Any line beginning with a semicolon (“;”) or a hash (“#”) character is ignored, as are lines containing only whitespace." So unfortunately comments using (#) or (;) are not allowed unless the (#) or (;) occurs at the beginning of the line. If you remove the trailing #(Set this to your Windows workgroup) from your workgroup ...


0

Did you man netstat? It's pretty clear that --inet specifies tcp version 4 addresses. From the man page: address_family_options: [-4|--inet] [-6|--inet6] ... ...So if you want IPv6, you need to add the --inet6 or -6 options. Or leave off --inet entirely, as you have seen.


1

You may also want to look at Debian's kdump-tools package to automate some of the necessary boot-time steps. The steps are roughly, sudo apt-get install kdump-tools Set USE_KDUMP=1 in /etc/defaults/kdump-tools Add crashkernel=128M to the kernel command-line given in bootloader configuration (e.g. /etc/defaults/grub). It also doesn't hurt to pass ...


0

They remain linked in all cases, ie. whether moved or renamed, and even if the move is performed via cut&paste.


0

Well, I found the answer eventually after a lot of poking about with the kernel configuration - I had not included the following configuration directive: CONFIG_TCM_QLA2XXX=m and as such, targetcli would not load this module and create the relevant structures in /sys/kernel/config. Of course I had everything else required, just not that! Oh, the fun one ...


0

seq 0 600000 | parallel dd if=/dev/zero of=/dev/mapper/my60device bs=10M count=10 seek={}0 You already use if, of, bs, and count so I assume you know what they do. seek seeks n blocks into the output file before doing the dd. You do not write how the 60 TB device is physically arranged on spindles. That can have a huge impact. So this might be faster: ...


2

Instead of loading the isos into a virtual drive and trying to boot from that, have you tried just pointing the VirtualBox boot device to the iso file? AskUbuntu has the steps for that


0

Okay, so it seems that it can be done, however what is important is the graphics card and chipset that are being used. In my case, processor and motherboard are fine, but graphics card is not :( but good news for the rest of you. Also it seems that the feature is better supported in xen or kvm than virtual box, see ...


0

As it turns out forcepartial = Path paul/* -> ... does not match sub file- and foldernames beginning with a dot (e.g. paul/.config). However, one can use BelowPath paul or Regex paul/.* instead. The following use of BelowPath would achive my goal: ... forcepartial = BelowPath paul -> /sync forcepartial = BelowPath bob -> ssh://bob@host//sync The ...


1

You are missing the DNS for your wifi network. Add, to the file /etc/dhcpd.conf, a line like option domain-name-servers 8.8.4.4, 8.8.8.8; amidst all the option lines, then restart your dhcp server and you are done. Nothing else.


1

Yes. This is expected behaviour. You don't want to have processes from logged out users hanging around your system. For this use case, there are services. Internally, it is basically caused by the fact, that ssh is waiting for the time when the executed process will close file handles (stdin, stdout, stderr), which are redirected to client. By running ...


0

Add to hosts.deny: sshd: /root/denylist I've never gotten "ALL EXCEPT /file" to work, not sure why, might be a bug. You could try this in your hosts.deny for your specific case: ALL EXCEPT sshd: ALL sshd: /root/denylist


0

To list immediate subdirectories containing exactly $NUM files. find -maxdepth 2 -mindepth 2 -type f -printf '%h\0' | awk -v num="$NUM" 'BEGIN{RS="\0"} {array[$0]++} END{for (line in array) if (array[line]==num) printf "%s\n", line}' To list immediate subdirectories containing greater than $NUM files. find -maxdepth 2 -mindepth 2 -type f -printf '%h\0' | ...


0

If you are adding IP's in hosts.allow then it will allow the IP's. If you don't want to access those IP's put them in hosts.deny. If you want to add in hosts.allow use EXCEPT.


-1

ps -elf|grep root Try this. Third field shows the process is running with root privileges


0

We need to set mailserver as localhost in /etc/monit/monitrc file set mailserver localhost Then restart monit service /etc/init.d/monit restart


1

In the local mode, Administrator can change the ownership of any file/folder even he wasn't owner of files: To take ownership of a file or a folder, follow these steps: Right-click the folder that you want to take ownership of, then click Properties. Click the Security tab, click Advanced, then click the Owner tab. Click Edit. Note: If you are prompted for ...


1

AutoKey is a desktop automation utility for Linux and X11. It allows you to manage collection of scripts and phrases, and assign abbreviations and hotkeys to these. This allows you to execute a script or insert text on demand in whatever program you are using. Autokey is a best textexpander available for linux. It needs Python skills for the more advanced ...


1

You may not have permissions to access or write to the profile directory you are attempting to retrieve. Although you are (presumably) attempting to set the profile directory via --profile /tmp/slimerjs.gRAJJar6 the SlimerJS documentation indicates this should be -profile (single dash) By default, if you omit the profile option, as it appears you are doing ...


1

Of course it is encrypted! Just to understand well what is going on here: [ client $ ssh destination ] | '-> [ gateway $ nc destination 22 ] | '-> [ destination $ whatever] On client you run just ssh destination. This is translated into ssh gateway nc destination 22. So first executed command is ssh gateway with command. We have ...


11

No, the sd* names are assigned sequentially, based on which disk was detected first. If you need a persistent name, udev already provides them based on several properties such as filesystem labels / UUIDs; partition labels / UUIDs (GPT only); disk attachment paths; SCSI WWNs; and so on. Take a look at /dev/disk: ┌ rain ~ ┘ tree /dev/disk/ /dev/disk/ ├── ...


2

The filesystem itself most likely can't be copied online, as it is changing all the time. You can copy the files, preserving just about everything about every file, inside the filesystem pretty easily, though. Try rsync from your dedicated server: rsync -avzHXShPs --exclude sys/ --exclude dev/ --exclude proc/ root@VPS:/ /path/to/backup_folder/ , where ...


0

I haven't tested it, but it looks like the problem is that you are down-mixing and down-sampling (to 44100 Hz) at the same time. You should first down-mix to stereo @ 48000 Hz, then down-sample (or not).


2

Compile it and then install it locally. - Step-by-step: go to https://github.com/git/git and download the zip file. Extract it to a convenient place and cd into it. If you are fine with git installing to ~/bin, you can skip 2 and 3 (source) run make configure run ./configure --prefix=/some/absolut/path/to/your/private/bin where the path can be eg.: ...


1

You do not need to do that, but you can still do it by means of checking your apparent external IP address: the following command wget 216.146.38.70:80 queries checkip.dyndns.org for your external IP. You should be able to recognize the current status of your connection that way. Alternatively, you may check your routing table: $ ip route show ...


1

You could perhaps use a combination of openvpn's: up, down, uprestart and ping-restart config file (or their corresponding command-line) directives?


0

Assuming you have the necessary C development tools installed, you can compile your own version of git from sources, and install it in $HOME/bin/ then ensure that's at the front of your PATH (assuming PyCharm just looks for git in your PATH).


0

I use Xephyr for this, which you will have to download from the repos. On the screen of the machine where you want the display, issue the command: Xephyr -ac :7 -screen widthxheight (remember the x between width and height). The option ac abolishes further controls, the :7 instructs Xephyr to use the display #7. You can do this even from an ssh ...


2

You can try the same command, this time using multiple hacks to avoid buffering: ./gen-data | gawk '{printf $2 " "; printf $1=$2=$3=""; gsub (" ", "", $0);if(length($0) == 0){ print "0000"} else{print $0}; fflush(stdout)}' | stdbuf -o0 xargs -t -n2 -P1 bash -c 'datatojson "$@"' _ Mind the change from awk to gawk and the use of fflush. You can also try ...


0

MACs do not use "exactly" PXE; they use a similar environment called Boot Server Discovery Protocol (BSDP). The OS X Server includes a system tool called NetBoot. A NetBoot client uses BSDP to dynamically acquire resources that enable it to boot a suitable operating system. BSDP is crafted on top of DHCP using vendor-specific information to provide the ...



Top 50 recent answers are included