Shell Tips
How to see the full command for a given process?
env COLUMNS=200 ps -o pid,command
How to delete a specific line from a file?
# delete the line 18 from '~/.ssh/known_hosts' file
sed -i '18 d' ~/.ssh/known_hosts
# also
sed -i 18d ~/.ssh/known_hosts
# delete few lines
# delete 6 lines from line 8
sed -i 8,+6d file.txt
# delete the line where is 'TO DELETE'
sed -i '/TO DELETE/ d' file.txt
How to remove a wrong host key in SSH known_hosts file?
ssh-keygen -R hostname
--
JakubMoscicki - 05 Oct 2006