Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, June 12, 2014

paste: combine files horizontally

PASTE(1)                  BSD General Commands Manual                 PASTE(1)

NAME
     paste -- merge corresponding or subsequent lines of files

SYNOPSIS
     paste [-s] [-d list] file ...

Wednesday, April 30, 2014

count a character in each line

for example, if I want to check if a CSV file without quotes is valid, something like the following might help:

tr -d -c ',\n' < file | awk '{print length;}' | uniq


Friday, March 8, 2013

Friday, December 28, 2012

Sunday, November 4, 2012

centos sudo

http://www.tuxradar.com/answers/635

/etc/sudoers 

$user ALL=(ALL) ALL 

Saturday, November 3, 2012

display file with line number

http://www.commandlinefu.com/commands/view/2085/display-a-file-with-line-number


nl file > more 

or less -N,

the former is better since all are in the console windows

Friday, July 20, 2012

linux search manual

apropos 

for example
# apropos open 

ap·ro·pos

 prep \ˌa-prə-ˈpō, ˈa-prə-ˌ\

trace files accessed

using strace on linux 

what is fs_usage on mac?

Tuesday, July 3, 2012

Saturday, June 30, 2012

xfce application shortcuts

it turns our now <Primary> is the control key. :)

and <Super> is the windows key

Monday, June 11, 2012

dso how to

http://www.akkadia.org/drepper/dsohowto.pdf

.a to .so

ar -x mylib.a  gcc -shared *.o -o mylib.so

Wednesday, June 6, 2012

LMDE 12 disable beep

and the following to /etc/modeprob.d/blacklist.conf
blacklist pcspkr
 
add the following to alsa-base.conf
options snd_hda_intel beep_mode=0

not sure which one do the trick, but who cares?

Sunday, April 22, 2012

add date/time stamp to jpg

convert DSC00497.JPG -font Arial -pointsize 72 -fill white -annotate +100+100  %[exif:DateTimeOriginal] output.jpg