Tag Info

Hot answers tagged

39

What you need is an FXO card for your PC. This is a PCI card with a phone socket in it, and it effectively works as a PSTN (public switched telephone network) phone on a card. You plug this into your wall socket just as you would a telephone. Then you use PBX software (such as Asterisk) to mediate the calls. You would need a way to interact with the PBX, ...


28

In simple terms, a command is an instruction (or a set of instructions) to be carried out by a computer. Stand-alone commands Fundamental Unix utilities such as ls, ln, etc. are (usually) written in C and compiled to be stand-alone executable programs that don’t require an interpreter to be executed; they usually require certain library files to be ...


17

Why does it take so long (relatively) to say "incorrect password" ? It doesn't. Or rather, it doesn't take the computer any longer to determine that your password is incorrect compared to it being correct. The work involved for the computer is, ideally, exactly the same. (Any password verification scheme that takes a different amount of time based on ...


15

You can use netstat for this. See the example (I grepped for ssh): netstat -putan | grep ssh tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1725/sshd tcp 0 0 1.2.3.4:45734 1.2.3.5:22 ESTABLISHED 2491/ssh tcp6 0 0 :::22 :::* LISTEN ...


12

The simple answer is no, you cannot make a typical computer into a PSTN-connected PBX without a new piece of hardware: an "FXO card". An analog modem cannot perform as a voice-service FXO as they are designed only to process data bits asynchronously (i.e., V.92 protocol) – that's why modems are much cheaper and more common than FXO cards. A LAN card's port ...


12

The shell attempts expansion of the glob pattern before it passes the expanded result to cp (actually, it is passing the result to sudo which then passes it unchanged to cp). Since the shell (it is running as you, not root) is not able to traverse the directory, cp ends up receiving the unexpanded pattern in its argument list. cp does not perform any glob ...


6

This is not how Fn keys work. If you press Fn+5, it is not going to send any special signal to the system. It is only going to send 5 as the keystroke. The thing to understand here is that Fn keys are hardcoded in your laptop keyboard. So, if you press Fn key with, let's say F5 key, and if F5 key has a small icon below it marked as mute, then it is going ...


6

Another tool that can do this is lsof: # lsof -i -a -p 1981 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sshd 1981 root 3u IPv4 917 0t0 TCP host.example.com:ssh (LISTEN) # lsof -i -a -p 1981 -n COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sshd 1981 root 3u IPv4 917 0t0 TCP 10.1.2.3:ssh (LISTEN) # lsof -i ...


5

The SO Post was in the right direction, but there are several environment variables which can be tested by an application. I use this script for example to reliably set the locale for commands: #!/bin/sh # $Id: with-locale,v 1.6 2011/10/27 22:51:45 tom Exp $ unset LANG unset LC_ALL unset LC_CTYPE unset LESSCHARSET unset LANGUAGE LANG=$1 LC_ALL=$1 ...


4

You can use sudo. This command is very flexible and will permit you to specify the exact commands and users to be able to use escalated privileges


4

Maybe i'm getting old but should . and .. not be ignored by any command ? AFAIK these are there because of the filesystem and serve no other purpose. That would make no sense, simply because you specifically fed the names . and .. to chown by your chown <...> .*. In such an instance, why should chown think that you didn't do what you wanted to do? ...


4

You can start Chromium with the --no-displaying-insecure-content command-line option. Visit SSL Labs with and without this switch, and check the last result on the page "Mixed Content Handling", especially the Images result, which should change. To persist this in configuration in preferences, locate your Preferences JSON file, ...


4

The best guess so far seems to be that you are asking: The command ret="$(ls "my dir")" is a pretty terrible example of a command that contains four double-quote (") marks.  One might naïvely expect that the second quote would match the first one, and the fourth would match the third, like this: ret="$(ls "my dir")" ↑-----↑ ...


4

Just press return, to leave the prompt and go back to your session.


4

This sounds like a boot order issue, each time the hard drive is swapped the boot order will have to be changed in bios. UEFI entries in bios are separate from Legacy hard disks in the bios boot order. Each time you disconnect the UEFI disk and replace it with the legacy disk its entry will be deleted from the boot order. After installing the UEFI disk you ...


4

Afaik, it's not possible to write directly in SSH on the console of a remote screen. However, it's possible to circumvent it with screen. You will just need an initial access to the PC you connect on. On the desktop PC, open a screen session with the command screen -s sessionName Then, in SSH, you can connect on this shell with the command screen -x ...


4

The complaint about "admin" being nonexistant is unrelated to what's in the sudoers file. It is referring to usergroup, as listed in /etc/group. To create a group named admin, type sudo groupadd admin. After that, your command as listed should function as intended. You of course only need to create the admin group once. To add an existing user to the admin ...


4

For a kernel-level mechanism for this, you need to read up on Linux Control Groups. This is an area still in active development, so you'll need to ensure that what you read is consistent with the kernel you have (or are willing to install). Although you said not to install anything additional, you might consider installing cgred to automate moving ...


4

Let's start with a file of 10MB of pseudo-random data and make two copies of it: $ dd if=/dev/urandom of=f1 bs=1M count=10 $ cp f1 f2 $ cp f1 f3 Let's alter those copies so that they are "almost completely identical" (as you said): $ # Avoid typos and improve readability $ alias random='od -t u4 -N 4 /dev/urandom | sed -n ...


3

To interpret the date in Sydney to a date in Los Angeles, USA: $ sec=$(TZ="Australia/Sydney" date +'%s' -d "2015-05-20 18:05:02") $ TZ="America/Los_Angeles" date -d "@$sec" Wed May 20 01:05:02 PDT 2015 Here is the result for Brisbane: $ TZ="Australia/Brisbane" date -d "@$sec" Wed May 20 18:05:02 AEST 2015 How it works TZ="Australia/Sydney" date +'%s' ...


3

Under Linux, Samba can intercept file deletes and move the files to another repository, using the vfs_recycle module. See these links : The vfs_recycle module vfs_recycle example Samba vfs recycle feature: clean up script tmpwatch - removes files which haven't been accessed for a period of time


3

You can add them to the group that owns the file. Make sure it's executable. // Add user to group usermod -a -G groupName userName // Create a group if you like groupadd groupName // Change group ownership of exe chown [user]:[group] /path/to/exe // Make exe exe-utable chmod +x /path/to/exe Enjoy


3

A unix system's text-mode console can usually be accessed through a TTY device. On Linux, you'd normally access /dev/console or /dev/ttyN, where "N" is a number starting with 1. This page gives a pretty comprehensive description of the TTY devices representing the Linux console. TTY devices have owners and file permissions like any other file, and these ...


3

It would be incorrect to assume that a connection has to be either dead or alive and that you can reliably tell the difference. This kind of assumption leads to unreliable systems because you may end up relying on a heuristic that doesn't actually check the aliveness property you expected it to. A better approach is to monitor whether the thing you need to ...


3

You can do that with this simple find command : find . ! -readable Pay attention to use it as your user and not as root or all files would appear as readable...


3

Your CPU has Intel Hyper-Threading Technology, which takes advantage of otherwise unused resources on each core to enhance performance. Hyper-Threading Technology duplicates a limited set of CPU resources, such as registers, to enable each core to handle multiple threads. Modern CPUs have many different execution units in each core and not all of them may ...


3

If you look under the Performance section on the Intel specs page you linked to, you'll see: # of Cores: 2 # of Threads: 4 Intel® Hyper-Threading Technology: Yes Hyper threading on Intel Core i-x series allows the processor to run two threads simultaneously on a single processor core. Most operating systems will see this as four cores, ...


3

What you want is to use is the a command instead of the i command to enter insert mode. Or if you want to jump to the end of the line and start insert mode, use A. Note that I will jump to the beginning of the line and enter insert mode.


3

You shouldn't copy them to C:\windows\system32. Instead, place them in a sensible location and add that location to your %PATH% environment variable. If you don't install the utilities in their default location (specified by the website or installer), you might place such utilities in a dedicated folder such as C:\bin\ or C:\programs\. I prefer this to a ...


3

You have an alias! Maybe it's better to have a script that does sync / unmount and then calls hdparm. Add the script to the sudoers file. cat >/usr/local/sbin/spindown disk=/dev/disk/by-uuid/c542a956-fbfe-42f7-ac8f-44c029a35a69 sync && unmount /bigdisk/volume && hdparam -y $disk The && makes sure the previous command exits ...



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