Last active
February 22, 2018 13:43
-
-
Save dnsang/8f17f6cc1f9b9f39368b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#search text in file in directory | |
grep -Ril "text-to-find-here" / | |
find . -name "*.txt" | xargs grep -i "text_pattern" | |
find . -name '*.py' -exec grep -n "text_pattern" {} \; -print | |
#understand xargs: find . -name "*.py" | xargs -n 1 echo | |
#sed | |
sed -i 's/test/test/g' file1.a | |
#awk: | |
http://code.linuxnix.com/2013/04/awk-scripting-learn-awk-built-in-variables-with-examples.html | |
awk -F’,’ ‘{print $4}’ db.txt | |
#Add New Application shortcut | |
vi /usr/share/applications/newitem.desktop | |
[Desktop Entry] | |
Version=1.0 | |
Name=My Program | |
Exec=/home/danny/some/path/myprog/prog | |
Terminal=false | |
Type=Application | |
StartupNotify=true | |
Categories=Network;WebBrowser; | |
X-Desktop-File-Install-Version=0.15 | |
Icon=/path/to/icon.ico |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment