Question

In Unix - Devise a system which allows you to use an alias named "current" to...

In Unix - Devise a system which allows you to use an alias named "current" to display recursively only the ordinary files in the current directory tree which have been modified since you logged in.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Alias command:

Alias command is to create anything our own as a command in Linux or UNIX operating systems. After creating own command with an alias, just replaces the alias name with the original command for executing.

Syntax: alias [-p] [name [=value]…]

Command Screenshot using alias:

sh-4.4$ alias current- find . -mmin -(date T last whoami | grep $1 | cut -dl -f5) -type f -exec ls -l

Command in Textual format:

alias current= “find . -mmin – (date +”%T” -last whoami | grep “^$1” | cut -d\ -f5) -type f -exec ls -l {} +”

Explanation: . alias current is the created alias name. . find . is to find all the files in the root directory » -mmin is to

Note: Using online editor unable to display the output. Because there is only one user login at a time.

Add a comment
Know the answer?
Add Answer to:
In Unix - Devise a system which allows you to use an alias named "current" to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and...

    In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and you have two files nomed datol and dotaz in your current directory. What command can you use to copy the data and dotaz files from your current working directory to the datafiles directory? TTT Artal 3120 T.... 5 BE36 Pantep Words: 0

  • How do I do the following on a Unix Command Line Prompt: Change you command-line prompt...

    How do I do the following on a Unix Command Line Prompt: Change you command-line prompt to some interesting phrase/word of your choice Change the command-line prompt to display your user name and your current working directory (this includes your interesting phrase/word) Create a short alias for “ls -l -a”, it is up to you, but maybe “lsa” Execute the “who” command together with the “grep” command to identify whether your peer group (or any 3 or more people) are...

  • Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the...

    Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the following. No need to submit execution output. 3. To find all files from current directory that have not been modified in the past three days 4. To find all files from /bin that are owned by root 5. To find all files from /etc that have the inode number 87539084

  • 2 Aliases 2a: Create an alias, numberfiles, which prints the number of files in the current...

    2 Aliases 2a: Create an alias, numberfiles, which prints the number of files in the current directory ?? 2b: Using an alias, replace ls so that it now always shows hidden files. ?? 2c: Create an alias, fox1, which uses ssh to attempt to log you into fox01.cs.utsa.edu and prompt you for your password. ?? 2d: Assuming the variable $var is set to 100, create an alias, whatIsVar, which echos the current value of $var. Note that if $var changes...

  • COSC 3411 /ITAP 3411 Homework (UNIX Shell Commands) How would you ensure that all ordinary files...

    COSC 3411 /ITAP 3411 Homework (UNIX Shell Commands) How would you ensure that all ordinary files created by you have rw-rw---- as default permissions? How would you sort in the background a file called "bad.txt", and place the results in a file called "sort.txt"? Archive the contents of your home directory (including any subdirectories) using tar. Compress the tar archive with gzip. Now extract their contents. Use the “find” command to locate in /docs and /usr/docs all files that Begin...

  • A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not...

    A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not really a stream of characters and doesn't contain anything at all. True False Relative pathnames begin with the root directory. True False Running the ls -a command uniquely identifies directories and binary executables. True False What is the result of running mkdir -p share/man/cat1 from the command line? a. It creates the directory share. b. It creates the directory share/man. c. It creates the...

  • QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A....

    QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A. List all files and directories recursively starting from / B. List a file names * in / C. List all files in / directory D. List all files and directories in / directory QUESTION 2 Which command is used to extract a column/field from a text file / input. A. paste B. get C. cut D. tar QUESTION 3 Which command creates an empty...

  • Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume...

    Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume you are started at your home directory. Perform a command that displays the absolute path of your home directory (your current location). Create a new directory inside your home directory and name it “Assignment-3” Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and...

  • What program do you use to list the files in a directory? Which option do you...

    What program do you use to list the files in a directory? Which option do you use to display: All files, including dotfiles (hidden files) Names in reverse alphabetical order Entire tree, including all subdirectories Flags after each name (/ = directory) Size of each file, in human readable units Long listings (permissions, owner, and so on) Information about a directory itself, not its contents ​When you look at a directory listing, what do the entries . and .. mean?

  • QUESTION 4 Which UNIX shell operator will perform which function?       -       A....

    QUESTION 4 Which UNIX shell operator will perform which function?       -       A.       B.       C.       D.    Append output to a file       -       A.       B.       C.       D.    !!       -       A.       B.       C.       D.    <       -       A.       B.       C.       D....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT