same as above, however without the chmod, you wont be able to SSH to the machine as the openssh server will require tigther permissions
This is not exhaustive but after checking /etc/cron* is a good way to see if there are any other jobs any users may have set. Note: this is a repost from a comment "flatcap" made on http://www.commandlinefu.com/commands/view/3726/print-crontab-entries-for-all-the-users-that-actually-have-a-crontab#comment, for which I am grateful and I take no credit.
Given a list of filenames, one per line, in /tmp/filelist, calculate the total sum disk usage.
One liner that basically duplicates ssh-copy-id functionality by taking care of most common issues of SSH password-less ssh logins: - missing key on the remote server - braindead permissions *cough* RHEL *cough* Show Sample Output
This helps me determine which repo I want to use for downloading ISO files Show Sample Output
Add this to your bash profile, then quickly & easily (regex) search for and highlight keywords, with full text output.
opens the output of some command as a file so this also works with graphical editors like meld, kdiff3 etc
meld <(ssh $remote_site cat .zshrc) .zshrc
In addition one can evaluate the formulas in the venerable spreadsheet command sc, with an additional command. function csvev () { cat $1 | sed -e '1i,,,,,,,' |sed -e 's/=sum/@sum/g' -e 's/=SUM/@SUM/g' | psc -k -d, | sed -e 's/\"@SUM(/@SUM(/' -e 's/)"/)/' | sed '/@SUM/ { s/rightstring/let/; }' | sed -e '/= "=/s/rightstring/let/' -e '/= "=/s/"//g' | sed 's/= =/= /g' | sc ; } I will post this command separately as well. Show Sample Output
Requires psc, sed, sc, and cat. Working with csv spreadsheets with formulas in them to evaluate the formulas using sc. View the formulas in a numbered and lettered formated in command line. function sheet () { cat "$1" | sed '1s/^/a,b,c,d,e,f,g,h,j,k,l,m,n,o,p\n/' | column -s , -tn | nl -v 0 ; }
Need to change values of 'field 1'...'field 3' to column names. input_file.tsv is the tab file you want to conver output_file.json is the file that is created with the json output. Assumes your tsv has no headers.
Outputs unique error messages from the apache log, sorted by frequency. Tested on log format: [Wed Aug 26 00:00:00 2015] [error] [client xx.xx.xx.xx] Error message here Show Sample Output
I have modified the original one-liner to allow it to manage multiple PIDs. However, I haven't found the way it can work properly with the watch command. NOTE: brace expand must be activated via "set -B" in order to this script can work. Show Sample Output
4.1.6-1-ARCH Info cpu
Files contain operating system identification data Show Sample Output
finds all xml files greps them for extracts the bean id sorts the ids creates a list of distinct entries, a unique list of bean ids Show Sample Output
Useful to see login name, UID, GID, home dir, and login shells of all users. Show Sample Output
rhyme time
mime
rhyme lowrez
Juarez
This command is useful for sending mp3-sound by the quick way using SSH.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: