Chapter 4

Basic Command 2

As basic UNIX commands, we will learn 'touch', 'head', 'tail', 'sort', 'uniq', 'tr', 'diff' and 'cmp' in this chapter. These commands are useful mainly for processing text files. required when using UNIX

Contents of this Chapter

4.1 Change a timestamps of file (touch)
4.2 Get the part of file (head, tail)
4.2.1 Common format
4.2.2The special option -f
4.3 Sort lines of files (sort)
4.3.1 Prepare file
4.3.2 Execute sort command
4.3.3 Sort data of column n (-k)
4.3.4 Sort by number
4.4 Delete duplications of line (uniq)
4.5 Translate string (tr)
4.6 Comparing files (diff, cmp)
4.7 Exercise
4.8 The chapter test

Previous Next