Tag Archives: linux shell

Learning Bash-Shell Commands-Tutorial-3

1. mv command : It is used for file from one directories to another.You have to first enter the file_name(that you want to move) and then
the new location of that file.
SYNTAX : mv filename new_location
rk10@rk-desktop:~/Desktop/log$ ls
rk10@rk-desktop:~/Desktop/log$ cd ../
rk10@rk-desktop:~/Desktop$ cd test
rk10@rk-desktop:~/Desktop/test$ ls
login.txt  xyz.txt
rk10@rk-desktop:~/Desktop/test$ mv login.txt /home/rk10/Desktop/log
rk10@rk-desktop:~/Desktop/test$ cd ../log
rk10@rk-desktop:~/Desktop/log$ ls
login.txt  passwd.txt

2. mkdir commmand : It is used for creating new directories.You have to just specify the name of the directory after mkdir,it will create a directory in the current working directory.
SYNTAX : mkdir : mkdir new_directory
rk10@rk-desktop:~/Desktop/log$ ls
login.txt  passwd.txt
rk10@rk-desktop:~/Desktop/log$ mkdir eagle
rk10@rk-desktop:~/Desktop/log$ ls
eagle login.txt  passwd.txt

3. less command : Its works as a text reader because it can display text files contents.
SYNTAX : less file_name.txt
rk10@rk-desktop:~/Desktop/log$ less login.txt //press CTRL+Z to come back to command promopt.
this is the content of the file login.txt….
[1]+  Stopped                 less login.txt

4. stat command : It is very usefull in veiwing file statistics,e.g creation date,modification date etc.stat command gives the complete status of the file.
SYNTAX : stat file_name
rk10@rk-desktop:~/Desktop/log$ stat login.txt
File: `login.txt’
Size: 37 Blocks: 8          IO Block: 4096   regular file
Device: 808h/2056d Inode: 1024062     Links: 1
Access: (0644/-rw-r–r–)  Uid: ( 1000/rk10)   Gid: ( 1000/rk10)
Access: 2010-03-14 19:31:46.000000000 +0530
Modify: 2010-03-14 19:31:25.000000000 +0530
Change: 2010-03-14 19:31:25.000000000 +0530

How To Learn Ubuntu-Linux Commands

Learning bash/zsh/ssh shell commands is not so complex and boring as it seems.In fact when you will start learning bash shell commands then its initial steps may  looks ugly but when you will have some basic idea about commands then afterwards you will feel a keen interest in learning further commands.Working on command  line  interface is really have its own taste and significance even though in high graphical environment era.In linux ubuntu, if you want to do some admininstrative  task which is related to the information contained within the system files,then you can’t do that directly;the reason behind this is- all the users of the linux have some restricted access by default.

If you want to finish that administrative task then you will have to login as a root user,which is really not so simple in linux because of the linux ubuntu security policy(That’s why linux operating system is secure by default in compare to other operating system like windows where a five year child can corrupt the whole system by deleting a system file).In other ways you can finish such administrative task by using command line in few minutes,by gaining  the temperory root power using sudo command followed by the user account password.

To learn the basic/advanced linux-ubuntu bash shell commands simply follow these basic steps :

STEP1 : Learn some simple bash-commands then Open the bash/terminal from Application=>accessories=>terminal or use CTRL+ALT+F2 to open a virtual console(Return  to the graphical interface by pressing CTRL+ALT+F7).

STEP2 : For more details on any command just type help command_name(about which you want to know more),bash itself is a great place to learn more about commands and their parameters, or use the man command to access the bash manual.

STEP3 : Try to use the commands frequently that you learned.

STEP4 : That’s all ! Enjoy learning about the commands.. and for more info and tutorial on the ubuntu-bash commands visit the next posts,which contains

Start Learning Basics Linux Commands