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

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2010-02-12 - JakubMoscicki
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ArdaGrid All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback