You are on page 1of 2

1)Sorting alphapitycally the content of a text file named ”Grades.

txt” which
consists of four columns, based on second column.
Sort -k2n Grades.txt
2) sorting alphabetically and remove duplicates from a text file
named”First_exam.txt”.
Sort -u First_exam.txt or sort first exam / uniq
3) running a stopped job in the background. Assuming that this is not the
recently stopped job and its job number is 5.
bg %5
5) changing the file name from “final_Exam.txt” to “second_Exam.txt”.
mv Finale_Exam.txt second_Exam.txt
6) sorting the contents of a file called “grades.txt” numerically and save the
output of this Linux command to another file called “Sorted_Grades.txt
Sort-n Grades.txt > sorted _Grades.txt
9) sorting the last 20 lines of a text file named”test.txt” in another text filled
named “last_twenty_lines.txt”.
Tail -20 test.txt > Last_twenty_lines.txt
14) seeing what files and directories exist within the working directory
Is
15) removing print job number 13 from the default printer queue
Ipr m13 or cancel 13
17) copying a text file named”sample.txt”. which is stored in the following
directory “/home/Ali/Documents”, to the current working directory.
cp /home/Ali/Documents/sample.txt .
18) removing a text file named “thesis.txt” from the current working
directory
Rm thesis.txt
20) displaying the system date
Date
21) checking weather a text file called “Grades” is sorted or not
Sort – c Grades
22) printing only the unique lines of a text file named “First_name.txt”
Sort First_Name.txt / uniq-u
23) printing only the unique lines of a text file named “Family_name.txt”
Sort Family_name.txt / uniq -D or uniq – repeat
25) printing how many times each line is repeated in a text file named
”Student_first_name.txt”.
Sort Student_First_Name.txt / uniq – c or uniq – count
27) sorting the first thirteen lines of a text file named “file.txt” in another
text filed named “First_thireen_lines.txt”.
Head – 13 Grades.txt > First_thirteen_lines.txt
28) setting the priority of the following Linux commands “pico myfile.txt to
-8
Sudo nice --8 pico myfile.txt
29) seeing which print jobs are in the print queue
Ipstat – 0 or Ipt

You might also like