Question

In: Computer Science

Display and store a long listing of all the regular files and directories in /personal_files. Store...

Display and store a long listing of all the regular files and directories in /personal_files. Store the output in a file called mypersonalfiles. UNIX

Solutions

Expert Solution

Please let me know if anything is required

ls -l  is used for long listing the all type of files and directories in /personal_files

grep '^[-d] , in long list the first character of the list describes the type of file, so '-' means that it's a regular file, and 'd' means directory, so the grep command search for the lines which are starting with '-' or 'd'

> mypersonalfiles means creating the file and giving the output of the command to the file as input

so the complete command is : ls -l | grep '^[-d]' > mypersonalfiles


Related Solutions

List all files and directories in the current directory and store in a variable called malf....
List all files and directories in the current directory and store in a variable called malf. Count how many lines end with your firstname in the file /etc/conf Explain this command: mv pmu*.[ab]   cces/   Quick help in 5 min pleases with the UNIX program! I want only the final answer
What are the UNIX codes for each of these steps Display the directories and sub-directories including...
What are the UNIX codes for each of these steps Display the directories and sub-directories including files so I can verify your starting point. Redirect the above step to the lab3.txt file Make a sub-directory named Files in your user directory
UNIX treats file directories in the same fashion as files; that is, both are defined by...
UNIX treats file directories in the same fashion as files; that is, both are defined by the same type of data structure, called an inode. As with files, directories include a nine-bit protection string. If care is not taken, this can create access control problems. For example, consider a file with protection mode 644 (octal) contained in a directory with protection mode 730. How might the file be compromised in this case?
Unix treats file directories in the same fashion as files; that is, both is defined by...
Unix treats file directories in the same fashion as files; that is, both is defined by the same type of data structure, call an inode. As with files, directories include a non-bit protection string. If care is not taken, this can create access control problems. For example, consider a file with protection mode 644 (rw- r-- r--) contained in a directory with protection mode 730 (rwx -wx ---). How might the files be compromised in this case?
Windows XP Command Line questions. a) What is the command to display all of the files...
Windows XP Command Line questions. a) What is the command to display all of the files on the disk in drive A:--do not use the DIR command or the CHKDSK command C:\> b) Display the contents of the PERSONAL.FIL file located in the root directory of drive A: one screenful at a time C) Display the contents of the PERSONAL.FIL file located in the root directory of drive A:, one screenful at a time, beginning with the 25th record, on...
Use the find command to find all directories under /pub/cs/ whose name is cs160a. Be sure to only display the results that match, do not display any error output.
Unix/Linux1)Use the find command to find all directories under /pub/cs/ whose name is cs160a. Be sure to only display the results that match, do not display any error output.Hint: use: 2>/dev/null.2)Create a one-line command, using he famous.dat file, to add the word " STREET" to the address, for all who live on 2nd or 3rd.For example: '2nd' becomes "2nd STREET" and '3rd' becomes "3rd STREET".Display only the first 9 lines.Hint: use 2 sed statements with pipes.3)Display all lines in famous.dat...
Objective Work with strings Work with files Work with formatted output This program will display a...
Objective Work with strings Work with files Work with formatted output This program will display a very basic handling of transactions for a checking account. The program will read in a data file with all the past transactions. Use FileUtil.selectOpenFile or input() to get a file name from the user. The format of the file will be very basic, just a date (as a string in the format of MM/DD), a single letter which indicates the type of transaction (‘B’...
Annuity payments. The Federal Reserve Bank of St. Louis has files listing historical interest rates on...
Annuity payments. The Federal Reserve Bank of St. Louis has files listing historical interest rates on its website www.stlouisfeld.org. Find the link for “FRED” (Federal Reserve Economic Data). You will find a listing for the Bank Prime Loan Rate. The file lists the monthly prime rates since January 1949 (1949.01). What is the most recent prime rate? What is the highest prime rate over this period? If you buy a house for $150,000 at the current prime rate on a...
In 2017, Ana (who files as head of household) reported regular taxable income of $115,000. She...
In 2017, Ana (who files as head of household) reported regular taxable income of $115,000. She itemized her deductions, deducting $10,000 of charitable contributions and $3,000 in state income taxes. She claimed exemptions for herself and her son, Hector. What is Julia's alternative minimum taxable income?
create verilog source files for a seven segment display using the software vivado. show your steps.
create verilog source files for a seven segment display using the software vivado. show your steps.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT