Linux Commands

1. How to open file in linux using terminal ?
cd  // change directory 
ls  // list all file and directory

cat > filename.txt    // create new file and open, you can write file content
Press Ctrl+Z   // this will save you file.

vi filename    // openfile in vi editor
                       // press i to insert mode and the modifiy file content.
                       // press :w and hit [Enter] to save a file
                     // To exit Vi, use the :q command and hit [Enter]
                      // To save a file and exit Vi simultaneously, use the :wq command

2. How to copy file or directory from one machine to another machine ?

scp user1@host1.com:/files/file.txt user2@host2.com:/files

3. grep command in linux ?
grep command usage is for search in file


No comments:

Post a Comment