egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/* > ppa.txt
update-alternatives --display java
. In fact you can do this for other programs as well, like ruby … update-alternatives --display ruby
.gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=file-compressed.pdf file.pdf
less
commands{Key}……………{Command}
Space bar
………Next Page
b
……………..Previous Page
j or ↵ Enter
……Next Line
k
……………..Previous Line
g
……………..First Line
G
……………..Last Line
<n>G
…………..Line <n>
/<text>
………..Forward Search for <text>
. Text is interpreted as a regex.
?<text>
………..Backward Search like /
n
……………..Next Search Match
N
……………..Previous Search Match
Escu
…………..Turn off Match Highlighting (see -g command line option)
-<c>
…………..Toggle option <c>
, e.g., -i toggles option to match case in searches
m<c>
…………..Set Mark <c>
'<c>
…………..Go to Mark <c>
= or Ctrl+G
…….File information
h
……………..Help. This is presented with less, q to quit.
q
……………..Quit
http://stackoverflow.com/questions/8586648/going-to-a-specific-line-number-using-less-in-unix
or more ellaboratelly …
Find all direct dependencies for a Java project given that the source code is available. Run the following snippet of code in the source root of the target Java project.
grep -rh import . | sort | uniq > deps.txt
Run it without the -h
to display the file for a given dependency as well : grep -r import . | sort | uniq > deps.txt
http://stackoverflow.com/questions/109383/how-to-sort-a-mapkey-value-on-the-values-in-java