QuontraSolutions is one of the leading online trainers of IT online training, Our Strengths are our team of IT Trainers; we are into online training with passion and dedication. We have our team of experienced trainers with real time experience & are dedicated towards providing quality online training. Quontra Solutions provides Linux online training by Industry experts with Real time Scenarios. Linux is having good demand in the market.
Our Linux online training program is job oriented. After completion of Linux training with us you should be able to work on any kind of project. After completion of Linux online training our dedicated team will be supporting you.
Please call us 404-900-9988 for demo on Linux. Quontra Solutions is the best Linux online training Institute in United States.
Training Offer: If you are going to join more than one member with you there will be 10% concession on your training fee.
Features of our training:
* Soft copy of material
* Real Time Examples
* Doubts clarification
* Very in depth course material with real time scenarios.
* We are providing class with highly qualified trainer.
* We will provide class and demo session at student flexible timings.
* In training case studies and real time scenarios covered.
* Each topic coverage with real time solutions.
* We will give every recorded session for play later.
* We are giving placement support by multiple consultancies in USA, UK etc.
* We will give full support while attending the interviews and contact us after completion of the course.
For More Details Contact Us: 3427 Vintage cir, SE Smyrna, GA-30080
Website : http://www.quontrasolutions.com/Linux-online-training-course.html
3. ‘head’ command
Displays the first ten lines of a file, unless otherwise stated.
Syntax:
head [-number | -n number] filename
Example:
head -15 myfile.txt
It displays the first 15 lines of ‘myfile.txt’ .
-number Number of lines to display
-n number Number of lines to display
filename Desired filename
4. ‘tail’ command
Displays the last ten lines of a file, unless otherwise stated.
Syntax:
• tail [-n number] [-l] [-b] [-c] [-r] [-f] [file]
-n number Number of lines to display
-l Units of lines.
-b Units of blocks.
-c Units of bytes.
-r Copies lines from the specified starting
point in the file in reverse order.
-f Displays the last 10 lines and then update
the file as new lines are being added.
filename Desired filename
5. ‘link’ command
Creates a link to the file or directory.
Syntax:
ln [-f] [-n] [-s] [-i] source destination
-f Forced to create a link.
-n Does not overwrite existing
files.
-s Creates a Symbolic link.
source Desired filename
destination Destination filename
6. Example:
ln –s f1 home/myfiles/f2
Creates a symbolic link between file ‘f1’ to file ‘f3’ of ‘myfiles’ directory.
Represented as ‘’
View the Link using :
ls –l
Remove the link using ‘rm’ command.
rm –r f1.
7. ‘tar’ command
Used to group set of files in to ma single file. It is called Archive
file.
Syntax:
tar [-c] [-t or -v] [-x] [-f] filename archivefilename
It has ‘.tar’ extension.
-c Creates an archive file.
-t or -v Lists archive file content.
-x Extract or de archive an archive file.
filename File to be archived
archivefilename New name for archive file.
8. Examples:
1. Create an archive file
tar –vcf dir1 myarc.tar
It creates archive file ‘myarc.tar’ which has all files of directory ‘dir1’.
2. Dearchive an archive file
tar –xvf myarc.tar
All files in ‘dir1’ are no more grouped, they are separated.
9. ‘gzip’ and ‘gunzip’
Used to compress and decompress the file respectively.
Syntax:
gzip [-f][-d] filename.
gunzip [-f] compressedfilename.
• It is with ‘.gz’ extension.
-f Compress forcibly.
-d Decompress the compressed file.
filename File to be compressed.
10. Examples:
1. Compress the file.
gzip –f f1.
Compresses the file ‘f1’ and is represented as ‘f1.gz’.
2. Decompress the compressed file.
gzip –d f1.gz or gunzip –f f1.gz
File ‘f1.gz’ is decompressed to file ‘f1’.
11. ‘touch’ command
Used to change the timestamp of a file. It is also used to
create multiple files at one shot.
Syntax:
touch –t [-a][-m] [-r reference-file] filename
a To change access time
m To change modified time
-r Refer the timestamp of another file
filename Required filename
12. Use ‘Stat’ command to know the Timestamp.
$ stat f1.c
(sample output)
Access: 2010-11-01 20:35:58.000000000 +0530
Modify: 2010-11-01 20:35:58.000000000 +0530
Change: 2010-11-01 20:35:58.000000000 +0530
Format for touch -t is : [YY]MMDDhhmm[.ss]
13. Examples:
1. Create multiple files at once.
$ touch file1.txt file2.txt file3.txt
2. Change the access time of a file.
$ touch –t -a 08210820 file1.txt
Access: 2010-06-15 13:30:00.000000000 +0530
Modify: 2010-08-21 08:20:00.000000000 +0530
Change: 2010-11-01 20:45:05.000000000 +0530
14. Same way we can change the modified time of a file using ‘-m’ along with
‘-t’
4. Refer the timestamp of another file than the current time.
$touch -r file4 file5
file 5 uses the timestamp of file4.
15. ‘diff’ command
It is used to find differences between two files.
Syntax:
diff [options] file1 file2
Options:
a Treats all files as text and compare
them line-by-line.
y Use the side by side output format.
w Ignore white space/blank space
when comparing lines.
i Ignores Case.
16. Let us have two files, file1.txt and file2.txt as follows:
file1.txt file2.txt
LINUX TEST
goodmorning
with great thoughts
Lead india
LINUX TEST
GOODMORNING
with great thoughts
17. Examples:
1. Compare the files side by side, ignoring white space.
diff -by file1.txt file2.txt
LINUX TEST LINUX TEST
hscripts.com | HSCRIPTS.com
with great thoughts with great thoughts
Lead India <
2. Compare the files side by side, ignoring Case.
diff -iy file1.txt file2.txt
LINUX TEST LINUX TEST
hscripts.com HSCRIPTS.com
with great thoughts | with great thoughts
Lead India <