Hot answers tagged

56

Use this kernel module to disable the kill system call on amd64. Use at your own risk. Devastating side effects are expected. #include <linux/module.h> MODULE_LICENSE("GPL"); int __init init(void) __attribute__((noreturn)) { unsigned long long cr0 = read_cr0(); write_cr0(cr0 & ~(1 << 4)); /* Clear Extension Type (ET) bit */ ...


47

"Disabling" kill for root, even if it was possible, would most likely have unwanted side-effects, like system scripts malfunctioning, and in the worst (but likely) scenario it would prevent your computer from starting up properly (or even shutting down properly). For a user, too, it would cause issues. I have, for example, scripts that I run as an ...


8

Every adapter I have seen has been a simple assembly of physical contacts with no other circuit elements. However, I have seen a lot of them (including name brand ones) arrive or subsequently go bad, which is presumably a failure of the contacts to contact. stefandz makes an interesting point about the write protect switch, but the failures I have seen ...


7

You should not disable it system-wide because it's used in system scripts (e.g., in /etc/init.d/functions in initscripts package). You can disable it for login shell (and its subshells) by alias'ing it to, say, true/false (or something like kill_disabled if you wish to get an error rather than a no-op). Note that this way is not fool-proof: it will only ...


7

If you issue a type kill the response will be: kill is a shell builtin Kill is contained within the bash shell itself. It is executed directly in the shell directly, without invoking another program. To know all the commands within the bash shell use help | less.


5

Several scripts exist for converting a list of path names into tree form: my own treeify.pl treeify.rs by Loïc Damien treeify.py by Hakril All these scripts work with tar -tf … output; for example: $ tar -tf foo.tar | treeify foo ├─bar │ ├─myfile.txt │ └─yourfile.txt └─baz └─qux └─hisfile.txt Also: $ bsdtar -tf foo.zip | treeify $ ...


5

Those aren’t processes but kernel threads: Threads are "light weight processes" (LWPs). [...] [...] Kernel-space threads often are implemented in the kernel using several tables (each task gets a table of threads). In this case, the kernel schedules each thread within the timeslice of each process. There is a little more overhead with mode ...


4

Because visudo is using vi as a default editor.


4

sudo apt-get install nethogs sudo nethogs From the man page: NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups band‐width by process - and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up ...


4

In fish the alias command just creates a trivial function. For example, alias cmd 'cd ~/user' Is simply shorthand for function cmd cd ~/user end Because it's a function in fish you can't expand the body in the command line as you type the alias. For your situation I recommend an abbreviation; e.g., abbr cmd 'cd ~/user'.


4

Try: find . -mindepth 2 -type f -name '*.pdf' -exec bash -c 'f=${1#./}; mv "$1" "./${f//\//_}"' None {} \; This is safe for all file names, even ones with newlines in their names. How it works -mindepth 2 This tells find not to process any files that are already in the current directory. -type f -name '*.pdf' This restricts the search to regular ...


4

Your file should be named: robots.txt If you can see the content of the file on line : http://youwebsite/robots.txt, then it should be working. Otherwise you can test it with this google tool: https://support.google.com/webmasters/answer/6062598?hl=en


3

Recovering data To recover data you can use photorec , or ddrescue To fix the MBR You can use testdisk to fix the MBR , or you can delete the existing partition an rewrite the MBR table using GPARTED. Edit Open the terminal and type: sudo testdisk Select "create a new log file" Select your micro-sd and press enter select the partition type In the ...


3

I'd suspect, that those drives haven't failed at all - they were just running out of their specs and should be fine when plugged into a different computer. Let me explain: You use the USB ports of your Yoga for two purpouses: As a data connection, all fine with that As a power source for the drives, and that might be the problem. Now the Yogas are ...


3

Depends on what Linux distro you are using. Typically, you can force reinstall a package, and hence, get back all its files. For example, in a Debian based system, like Ubuntu, you'll see: dpkg -S /bin/ls "ls" belongs to "coreutils". Therefore, force reinstall the package: sudo apt-get --reinstall install coreutils And, your accident will be fixed!


3

If your RHEL 7 system has SELinux enforcing, you need to enable the SELinux boolean values to get NFS working. To check if your system is utilizing SELinux: # getenforce If the above returns enforcing, please continue: # getsebool -a | grep httpd_use_nfs If the above returns httpd_use_nfs --> off, run the following command to permanently allow ...


3

The client reports the sha1 hash of the server's key as a sequence of 16 pairs of hex digits, like this: a7:b1:3e:3d:84:24:a2:5a:91:5f:6f:e9:cf:dd:2b:6a This is MD5 hash. As you can see running ssh-keygen -l -E md5 -f ssh_host_ecdsa_key.pub will get you the same fingerprint you need without such harakiri you are explaining in your answer.


3

Practically, the whole point of desktop virtualization is being able to do that. So, yes, it should work fine, especially if its both on VMware workstation. The hardware the VM sees would be identical.


3

Invoke Bash with a shell option set According to the Invoking Bash section of the Bash manual, All of the single-character options used with the set builtin (see The Set Builtin) can be used as options when the shell is invoked This means you can run a Bash script with the xtrace option set by directly invoking bash with the -x option and the file ...


3

Device nodes like /dev/sd* only show up in /dev after the device is connected, not before. (Also, they aren't called "registers".) So when you ran dd of=/dev/sdb it didn't actually touch any device – instead, since the output file didn't exist, dd created a new file by that name. $ sudo dd if=archlinux-2016.04.01-dual.iso of=/dev/sdc 1482752+0 records in ...


3

From http://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-ssh-to-allow-or-deny-specify-host-ip-address-610246/ Add sshd: 116.31.116.20 to /etc/hosts.deny


3

In general Linux logs such failure in /var/log/messages . Or install the package mcelog which logs these kind of errors under /var/log/mcelog (Machine Check Events log) RHEL,CentOS,Fedora Linux yum install mcelog Debian,Ubuntu apt-get update && apt-get install mcelog


3

I have a possible theory for this. When you run the application as $ rake resque:work QUEUE='*' & [1] 13031 The application internally does a fork+exit, to run in background. C code equivalent of that would be: if(fork()) exit(0); So, the process with PID==13031 will spawn a child process & exit itself. The child will keep running in ...


3

Your system is probably using NFS. The NFS client implementation creates these directories when a file is removed, but still in use by an application. From http://nfs.sourceforge.net/#faq_d2: A. Unix applications often open a scratch file and then unlink it. They do this so that the file is not visible in the file system name space to any other ...


3

I might be completely on the wrong path here, but... I'm unsure why it'd be asking for your windows password, that doesn't make sense unless you had some kind of encryption on the files. More than likely it's asking for the Tails Linux root password. There maybe a default on tails, or you might need to set it using sudo passwd root


2

This is a lot easier in newer versions of tmux: set -g status-right '#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)'


2

Well, the reason for this problem is because the file is >4.0 GB in size and the USB is formatted in FAT32 format. The max file size for FAT32 is 4GB. The max file size for FAT16 is only 2GB. So how do you fix this problem? Well there are two ways you can go about it. You can either split the file into smaller pieces and then copy it to your external hard ...


2

As @JesseChisholm suggested, it is way easier to ask the right thing to the DHCP server instead of making complex network setups. For OpenWRT I could simply run: # udhcpc -i eth0:1 -x 0x3d:0100BEEFC0FFEE Which resulted in having two ip addresses from the same dhcp server. The 0x36 is option 61 which is the client id option. After the : there is an hex ...


2

There is also the option to specify the compression program using -I. This can include the compression level option. tar -I 'gzip -9' -cvf file.tar.gz /path/to/directory



Only top voted, non community-wiki answers of a minimum length are eligible