- 3,132 hits
Place for playing with commands…
ODOC : $ cat > filenae. this cat command used to create new file,with contents. After typed the above line press Enter. Now you type the contents of the file in many lines. You can end up the file content by pressing the file content by pressing control+D keys.Now that file is created with the contents what you typed before.
$ cat filename. This cmd just view the content of the file. Note : Here > symbol is not used. 🙂
ODOC : $ touch a.txt . This cmd just create one empty file by nae as a.txt. We can give multiple file name as arguments.Using this touch cmd, we can identify either we have write permission in particular directory or not.
To know more about touch cmd, $ man touch or $ info touch … 🙂
ODOC : $ rm file name. rm means remove.we can delete any file using rm command. $rm -r directory name. using -r option, we can delete directory (folder). -r means recursive. It will delete folder content permanently.
eg: $ rm a.txt, $ rm -r Musics.
we can delete multiple files/directories by giving many arguments as files/directories name to be remove . 🙂
ODOC : $mkdir directory name. This ‘mkdir’ cmd will create directory (folder) from terminal. we have to give dir name to create folder. we can create directory by using path also. eg: $ mkdir /home/arul/me.
This will create folder with name ‘me’ in that path.we can create multiple directories by single cmd.
eg: $ mkdir a b c d .This will create 4 folders with name of a,b,c & d .Using space we can give multiple argument as dir names . 🙂
ODOC : $ ls -lh. The -lh option should list out the current directory files in detailed manner by 6 description.
2. No of files
3. User & group
4. Size of file/dir
5. Last modification date & time of file/dir
6. Name of file/dir .
ODOC : $ ls . “ls” is the cmd to list out the contents which are all have inside the current directory.
$ ls -a . with -a option will list out the hidden files and hidden directories, with the dot prefix. i.e. The hidden file.folder name starts with dot.
One Day One Cmd: $cd /path.cd-change directory. To change our current working directory to another directory. eg: $cd /home. $pwd Ans:/home .
ODOC: $pwd Ans:/home. $cd /home/arul/Musics. $pwd Ans:/home/arul/Musics. By this way we can change our working directory. we have to give full path..
One Day One Command: $ pwd . ‘print working directory’. This command will print the current directory’s full path. eg: pwd . Ans: /home/arul
This is Arulalan.T from Kanchi Linux User Group.
From today onwards I started new service called “One Day One Command via Sms ” to students and kanchilug members.
Actually we planned to start this activity before one month itself.
we (KanchiLug) thought , we can purchase sms gateway service or sms sending/receiving machine.
But due to insufficient money , we cant choose that option.
So today i started this service via putting National Booster Pack in my Airtel sim .
I added 90 contacts ( kanchilug members ) in my account.
Initial announcement Sms :
Hi. This is arulalan from kanchi linux user group. From today onwards,we are going to c ‘ONE DAY ONE COMMAND’ called as ODOC via sms. These commands normally runs in all Linux/Unix os. You will get this msg for everyday. Hope this will help us to improve our knowledge in commands.