Search This Blog

Wednesday, February 15, 2012

linux, ubuntu command, to move a file from one folder to other folder

To move files from one folder to other folder use 'mv' command.

For example:

To move file_1, file_2 from Trial_1 folder to Trial_2 folder use the following commands in terminal.


sada@titan:~/Trial_1$ ls
        file_1  file_2  Trial_2
sada@titan:~/Trial_1$ mv file_1 file_2 Trial_2/

sada@titan:~/Trial_1$ ls
      Trial_2

Tuesday, February 14, 2012

How to install gnuplot in ubuntu, linux, gnuplot, sofware installation, command to install gnuplot

Gnuplot is inbuilt software for ubuntu machine. We can directly install gnuplot sofware in ubuntu by using simple command. But in other linux machines we may have to download the software and install.

For ubuntu:

In ubuntu type the following command in termianl.

sudo apt-get install gnuplot (press 'enter')

How to install xmgrace in ubuntu, linux, xmgrace, sofware installation, command to install xmgrace

Xmgrace is inbuilt for ubuntu. we directly install xmgrace using a simple command in the terminal for ubuntu. But for other linux systems, we have to download the sofware version according to linux machine.

For ubuntu:

In ubuntu use the following command to install xmgrace software. Type the following command in the terminal of ubuntu.

sudo apt-get install grace ( press 'enter')

How to open microsoft word document in linux, ubuntu, command to open word document, in terminal

To open microsoft word document using linux terminal use 'soffice' command in the termianl.

Foe example:

If you want to open 'word.doc' file in terminal type the following command in linux terminal.

soffice word.doc (press 'enter')

How to open a pdf file in linux, ubuntu,linux command to open a pdf file, in terminal

To open a pdf file in ubuntu ( or linux machine) it requires 'okular' sofware. First install 'okular' in linux and then use the following command.

Installation of okular:  Type the following command in the termial. ( For ubuntu)

sudo apt-get install okular ( press 'enter')

Opening pdf file:

For example:

If you want to oen a file 'file.pdf' type the following command in termianl.

okular file.pdf ( press 'enter' )

How to change the file name, folder name, linux, ubuntu, change file name, rename a file, folder

To change file name use 'mv' command in the terminal.

For example:

If you want to change name ( rename) a file name 'filename_1' to 'filename_2' use the following command.

mv filename_1 filename_2 ( press 'enter')

To change the folder name from 'foldername_1' to foldername_2' use the following command in the termianl.

mv foldername_1 foldername_2 ( press 'enter' )

how to remove a file in ubuntu, linux, command to remove a file, romove a file, remove a folder

To remove a file from a folder in Ubuntu use 'rm' command in the terminal. In terminal type 'rm' and after that file name, which you want to delete.

For Example:

If you want to remove 'file_1' use the following command to remove the file.

rm file_1 ( press 'enter' )

To remove a folder from terminal use 'rm -rf ' in the terminal.

For example :

If you want to remove a folder of name "folder_1" use the following command.

rm -rf folder_1 ( press 'enter')

how to copy a file in linux, ubuntu, command to copy a file

In ubuntu use 'cp' keyword to copy the file.

For example:

To copy file_1 to file_2 use the following command.

cp file_1 file_2

Undo in vim, vi, how to undo the changes in linux, ubuntu

If we open a file using 'vim' or vi we can undo the changes by pressing 'u' key on the keyboard.

For example:

vi example (enter)

After changing some content if you want to undo the changes simply press 'u' bottom. By pressing 'u' button again and agian it will automatically undo the changes in last 10 sec.

Note: 'vi' must not be insert mode. If it is in insert mode press escape ( esc on keyboard) and press 'u' button on keyboard.