Day 6: paste
bala@bala:~ /home$ paste file1 file2 > file3
paste command reads the data in specified files and stores i the new file. We can seperate the data using -d”!” instead of tab.
and file2 is:
the resulting file3 would be:
For more details use man paste
Day 5: chmod Changing file or folder permissions.
bala@bala:~ /home$ chmod 755 new.txt
The chmod command is used to change the permission of files and directories. Here new.txt got the read,write,execute permission to the user. Read and Execute permission to Group and Others.
Generally the first digit stands for ‘User’, second digit stands for ‘Group’, and third digit stands for ‘Others’. Now 7 will be classified into 4,2,1 (i.e) Read, Write, Execute.
For more details use man chmod
Day 4: chown Changing owner permissions.
bala@bala:~ /home$ chown guest new.txt
The chown command is used to change ownership of files and directories. Here new.txt is now owned by the user guest, Format chown newowner filename.
For more details use man chown
$ ls -l
$ sudo chown root new.txt
$ ls -l
You can see the difference…;)
Day 3: cal calendar.
bala@bala:~ /home$ cal
It will display a calendar of the current month, also we can display the specified month and year calendar for the desired month and year.
Ex. cal jan 2011
Su Mo Tu We Th Fr Sa
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
Day 2: bc Calculator.
bala@bala:~ /home$ bc
It is an arbitrary precision calculator, we can do arithmetic calculation in interactive mode. we can also use hexa decimal values A-F.
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty’.
Day 1: history
bala@bala:~ /home$ history
This command is used to Display the list of commands used before. we can limit the list by giving the value next to it. For more details see man history.
Ex. history 5
2 cd /dev/sda5
3 cd media
4 cd media
5 history 5