Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Use:
***git diff-index --quiet HEAD***

The return code reflects the state of the working directory (0 = clean, 1 = dirty). Untracked files are ignored.
3 years ago
***youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' url***
3 years ago
I don't think it's possible with **echo** command, use the following **sed** approach instead:
***sed -i '$ s/$/abc/' file.txt***

**-i** - modify the file inplace
**$** - indicate the last record/line
**s/$/abc/** - substitute the end of the line $ with substring abc (for the last record)
3 years ago
The simpliest method I've found : re-run the installer which downloads automaticaly the latest version :
***# apt-get install --reinstall flashplugin-nonfree***

then restart your browser
3 years ago
I had a similar problem that resolved when is changed StrictModes from yes to no. Open **/etc/ssh/sshd_config** and add
**StrictModes no**
3 years ago
Wheel is short for wheelhouse. If something is in your wheelhouse, it means you are permitted to use it and you are good at it.
3 years ago
**ps -eo pid,comm,cmd,start,etime | grep -i X**
X is the name of the process
3 years ago
This shell snippet generates an IP address.
***ip_address=$(dd if=/dev/urandom bs=4 count=1 2>/dev/null |
od -An -tu1 |
sed -e 's/^ *//' -e 's/ */./g')***
If you're not happy with it, try again in a loop.
***while
set $(dd if=/dev/urandom bs=4 count=1 2>/dev/null | od -An -tu1)
[ $1 -lt 224 ] &&
[ $1 -ne 10 ] &&
{ [ $1 -ne 192 ] || [ $2 -ne 168 ]; } &&
{ [ $1 -ne 172 ] || [ $2 -lt 16 ] || [ $2 -gt 31 ]; }
do :; done
ip_address=$1.$2.$3.$4***
3 years ago
For editing mp3's under linux, I'd recommend sox. It has a simple to use trim effect that will do what you ask for (see man sox for datails - search (press/) for "trim start"). Example:
**sox input.mp3 output.mp3 trim 1 5**
You didn't mention it, but if your aim is just to remove the silence at the beginning of files, you will find silence effect much more useful (man sox, search for "above-periods")
3 years ago
The easiest way I found was to select all torrents in Transmission, then go to the menu Torrent > Set Location and then choose the desired location for torrents. After which, Transmission takes care of moving torrents.
3 years ago
Solution for LXDE:
***vim $HOME/.config/autostart/LXinput-setup.desktop***

Change
***Exec=sh -c 'xset m 20/10 10 r rate 500 30 b on'***

to
***Exec=sh -c 'xset m 20/10 10 r rate 500 30 b off'***
3 years ago
It appears that the Windows 10 ISO image is also suitable for USB media without any changes. In that case, the steps are as follows:

Insert the flash drive.
Figure out what device the flash drive is. Don't guess here, since choosing the wrong device means you'll overwrite your hard drive. If the drive is mounted, run mount to see what the last line is, and pick the device portion of that (e.g., /dev/sdb if the line starts with something like /dev/sdb1). If it's not mounted, run dmesg (with sudo if necessary), scroll to the end, and find the entry for the device that starts with sd (sdb in the given example).
If your device is listed in the mount output, unmount it by running sudo umount /dev/sdb1 (assuming that was what was listed).
Run dd if=/home/jaakko/Downloads/Win10_1909_EnglishInternational_x64.iso of=/dev/sdb bs=1M, replacing /dev/sdb with the device you discovered in step 2 (without the digit on the end).
Run sync and wait until it finishes.
That will write the data to disk, and then you can use it as a normal bootable flash drive.
3 years ago