Ubuntu Search and Show Multiple Line On Text Base On Search Keyword

1. Using Grep Using grep you can do search with this format, grep -A number_of_line search_keyword file, example : grep -A 3 2016-07-13 file Command above will get 3 line from file, start from search keyword 2. Using Sed With sed you can search with this command, sed -n '/start_search_keyword/,/end_search_keyword/p' file, example : sed -n '/2016-07-13/,/2016-07-19/p'. . . selengkapnya>>

Crontab Suddenly Missing

Be carefull when using crontab, "crontab -e" could be handy for edit/write crontab command but also crontab have delete command "crontab -r", this command will delete all user crontab without prompt, the problem is e and r is very close, this problem happen to me , my crontab command suddenly missing, when i search for this problem, i found that crontab -r is. . . selengkapnya>>

Create Folder And It's Parent Directory

Create Folder And It's Parent Directory mkdir -p nested/folder/inside/ source : https://unix.stackexchange.com/questions/305844/how-to-create-a-file-and-parent-directories-in-one-command . . . selengkapnya>>

How to Install and Use Screen on an Ubuntu

How to Install and Use Screen on an Ubuntu, here are the link : https://www.digitalocean.com/community/tutorials/how-to-install-and-use-screen-on-an-ubuntu-cloud-server . . . selengkapnya>>

Ubuntu Recursive Search

grep -rl --null "Your Find" . | xargs -0 sed -i.bak -e "s/Your Find/Replace/"   Source : https://unix.stackexchange.com/questions/113746/test-recursive-sed-search-and-replace-before-running . . . selengkapnya>>

zuka.one
©2011