Answered step by step
Verified Expert Solution
Question
1 Approved Answer
UNIX File Commands Assignments Use the UNIX file commands learned in class to write a command or several commands with a pipe, to respond to
UNIX File Commands Assignments Use the UNIX file commands learned in class to write a command or several commands with a pipe, to respond to each question. 1. Copy the file students2.dat from my public directory to your directory. Perform the following tasks. a. Display the contents of the file sorted by last name. Ignore leading white space. Column 1 is first name and column 2 is last name. b. Display lines, with line numbers, records of Computer Science majors. c. Display lines, with line numbers, for students whose first or last name is John. d. Display lines for students whose e-mail addresses end with .edu. e. Display all ECE majors sorted in descending order by GPA. f. Display all lines but show only the last name and GPA, sorted ascending by GPA. 2. Search your home directory and display pathnames of all C++ program files. Terminate your command line with 2>/devull in order to ignore error messages. 3. Remove the file newFile.hard, if it exists. Create a hard link to students2.dat. Name the link file newFile.hard. Display a long listing of newFile.hard and compare its attributes with that of students2.dat. How would you confirm that students2.dat and newFile.hard are two names of the same file, i.e., they are hard links to the same file? students2.dat. Play a long listing of ra hard link to studen 4. Remove the file newFile.soft, if it exists. Create a soft link to students2.dat. Name the link file newFile.soft. Display long listing of newFile.soft and compare its attributes with that of students2.dat. How would you confirm that students2.dat and new File.soft are two different files? What do the sizes of the two files indicate? 5. Display the inode/filename pairs for all the files in /export/home/public/frye/csc252, sorted by inode number. students2.dat CS CS ECE John Doe ECE James Davis ECE AL Davis CS Ahmad Rashid MBA Sam Chu ECE Arun Roy SS Rick Marsh James Adam Art Pohm John Clark Nabeel Ali Tom Nelson ECE Pat King SS Jake Zulu John Lee EE Sunil Raj ECE Charles Right EECS Diane Rover ECE Aziz Inan EECS Lu John CS Lee Chow EE Adam Giles SS Andy John EECS 3.54 3.71 2.63 3.74 3.68 3.06 2.34 2.77 4.00 2.68 3.56 3.81 2.77 3.00 2.64 3.36 3.31 3.87 3.75 3.06 3.74 2.54 3.98 doe@jd.home.org 111.222.3333 davis@jd.work.org 111.222.1111 davis@a. laers.org 111.222.2222 ahmad@mba.org 111.222.4444 chu@sam. ab.com 111.222.5555 roy@ss.arts.edu 111.222.8888 marsh@a.b.org 111.222.6666 jadam@a.b.org 111.222.7777 pohm@ap.a.org 111.222.9999 clark@xyz.ab.com 111.111.5555 ali@ee.eng.edu 111.111.8888 nelson@tn.abc.org 111.111.6666 king@pk.xyz.org 111.111.7777 zulu@jz.sa.org 111.111.9999 jlee@j.lee.com 111.111.2222 raj@sr.cs.edu 111.111.3333 right@cr.abc.edu 111.111.4444 rover@dr.xyz.edu 111.111.5555 ainan@ai.aedubc.org 111.111.1111 lu.john@xyz.org 111.333. 1111 chow@lc. www.ord 111.333.2222 giles@cric.org 111.333.3333 john@aj.ece.edu 111.333.4444 CS dates.dat awk bank.dat bank.data conf.dat conf.data courses.txt CutTest.txt -bash-4.1$ file3.dat DiffTest1.txt DiffTest.txt employees2.dat employees.dat emps.dat file1.dat file2.dat students2.dat testfile. new get. bash students3.dat testing2.dat grep.txt students.dat turnin input.txt stuff.tar usage. bash my.system.bash tdata.dat usage. bash people2.dat temp vars.bash people.dat test. dat smallFile testfile.dat UNIX File Commands Assignments Use the UNIX file commands learned in class to write a command or several commands with a pipe, to respond to each question. 1. Copy the file students2.dat from my public directory to your directory. Perform the following tasks. a. Display the contents of the file sorted by last name. Ignore leading white space. Column 1 is first name and column 2 is last name. b. Display lines, with line numbers, records of Computer Science majors. c. Display lines, with line numbers, for students whose first or last name is John. d. Display lines for students whose e-mail addresses end with .edu. e. Display all ECE majors sorted in descending order by GPA. f. Display all lines but show only the last name and GPA, sorted ascending by GPA. 2. Search your home directory and display pathnames of all C++ program files. Terminate your command line with 2>/devull in order to ignore error messages. 3. Remove the file newFile.hard, if it exists. Create a hard link to students2.dat. Name the link file newFile.hard. Display a long listing of newFile.hard and compare its attributes with that of students2.dat. How would you confirm that students2.dat and newFile.hard are two names of the same file, i.e., they are hard links to the same file? students2.dat. Play a long listing of ra hard link to studen 4. Remove the file newFile.soft, if it exists. Create a soft link to students2.dat. Name the link file newFile.soft. Display long listing of newFile.soft and compare its attributes with that of students2.dat. How would you confirm that students2.dat and new File.soft are two different files? What do the sizes of the two files indicate? 5. Display the inode/filename pairs for all the files in /export/home/public/frye/csc252, sorted by inode number. students2.dat CS CS ECE John Doe ECE James Davis ECE AL Davis CS Ahmad Rashid MBA Sam Chu ECE Arun Roy SS Rick Marsh James Adam Art Pohm John Clark Nabeel Ali Tom Nelson ECE Pat King SS Jake Zulu John Lee EE Sunil Raj ECE Charles Right EECS Diane Rover ECE Aziz Inan EECS Lu John CS Lee Chow EE Adam Giles SS Andy John EECS 3.54 3.71 2.63 3.74 3.68 3.06 2.34 2.77 4.00 2.68 3.56 3.81 2.77 3.00 2.64 3.36 3.31 3.87 3.75 3.06 3.74 2.54 3.98 doe@jd.home.org 111.222.3333 davis@jd.work.org 111.222.1111 davis@a. laers.org 111.222.2222 ahmad@mba.org 111.222.4444 chu@sam. ab.com 111.222.5555 roy@ss.arts.edu 111.222.8888 marsh@a.b.org 111.222.6666 jadam@a.b.org 111.222.7777 pohm@ap.a.org 111.222.9999 clark@xyz.ab.com 111.111.5555 ali@ee.eng.edu 111.111.8888 nelson@tn.abc.org 111.111.6666 king@pk.xyz.org 111.111.7777 zulu@jz.sa.org 111.111.9999 jlee@j.lee.com 111.111.2222 raj@sr.cs.edu 111.111.3333 right@cr.abc.edu 111.111.4444 rover@dr.xyz.edu 111.111.5555 ainan@ai.aedubc.org 111.111.1111 lu.john@xyz.org 111.333. 1111 chow@lc. www.ord 111.333.2222 giles@cric.org 111.333.3333 john@aj.ece.edu 111.333.4444 CS dates.dat awk bank.dat bank.data conf.dat conf.data courses.txt CutTest.txt -bash-4.1$ file3.dat DiffTest1.txt DiffTest.txt employees2.dat employees.dat emps.dat file1.dat file2.dat students2.dat testfile. new get. bash students3.dat testing2.dat grep.txt students.dat turnin input.txt stuff.tar usage. bash my.system.bash tdata.dat usage. bash people2.dat temp vars.bash people.dat test. dat smallFile testfile.dat
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started