To run as a different user that may not have a login shell use; su -c SCRIPT -s /bin/sh USER eg; su -c /home/nginx/html/youtube/youtube_downloader.sh -s /bin/bash www-data
su - username -s shell -c "command" eg; su - www-data -s /bin/bash -c "/usr/bin/youtube-downloader.sh"
| install cheatsheet - worked on Centos 6
on a Windows server, Robocopy can be used to simply back local data up to a remote share; Place the following in a batch file and schedule to run via windows task scheduler: @ECHO OFF SETLOCAL SE...
use a function: CREATE FUNCTION [dbo].[fnAreas]( @candidate_id int ) RETURNS varchar(max) AS BEGIN -- returns a comma-delimited list of areas for a given candidate_id DECLARE @Areas varchar(max)...
usethe coalecse function in sql server eg. get a list of those db’s with recovery model full for use in auto-backup function for trans logs DECLARE @commalist varchar(max) SELECT @commalist = co...
use the ‘\r’ combo instead of ‘\n’ hostname,hostalias,hostaddress,hoststate :%s/,/\r/g hostname hostalias hostaddress hoststate To go back the other way, use ‘\n’ instead of ‘\r’..weird :%s/\n/...
on xubuntu the keyring program is called seahorse. run that from a terminal and you’ll be able to select which keys to forget.
find the inum of it via ls -il; root@server:/export/home/operator:> ls -il total 217 176546 -rw-r--r-- 1 root root 205 Nov 22 09:22 234262 -rwxr--r-- 1 root root ...
In a search, \s finds whitespace (a space or a tab), and \+ finds one or more occurrences. This removes whitespace from the end of the line :%s/\s\+$// This removes from the start of the line :...
A new version of content is available.