Closed Thread
Results 1 to 5 of 5

Thread: Unix general Q/A confirmation??

  1. #1
    hayschooler is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    31
    Rep Power
    0

    Unix general Q/A confirmation??

    To anyone familiar with Unix, I'm just learning Unix/Linux at the very beginning. These are book questions and I've tried to look them up but not sure if these are correct or not. If anyone can confirm my answers were proper I would appreciate it?

    1. How would you change ownership of the file small.txt from the root to the user don?

    (I'm not really clear what a super user is but it looks like someone in charge of root or all files in the directory. The book showed something similar from what I have done below, not sure if these are correct though?)

    my answer) $su
    #ls -l small.txt
    #chown don small.txt
    # ls-l small.txt

    2. How would you change the group for the file small.txt from the group 0(root) to the group 500(accounting)?

    my answer) Chown -R 0:500

    3. How would you change the last modification time to the file small.txt>

    my answer) Write to the file.

    4. You have a file named small.txt in your accounting sytstem directory, you would like to have the sales department be able to see the file but the sales department does not have acces to the accounting directories. You do not want to copy the file to the sales directory as it is changed by accounting regularly. The best solution would be to create link. Show how you would link the file to a new file with the same name in a directory called sales(/u/sales) and retain the original file name.

    my answer) $ ln -s ../u/sales/small.txt small.txt

    5. 20. How would you search the entire computer for the file small.txt. (Command and switches).

    my answer) $ find /home -name small.txt -print

    If anyone has any insight, I would appreciate it.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Unix general Q/A confirmation??

    3) touch -m small.txt
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    hayschooler is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    31
    Rep Power
    0

    Re: Unix general Q/A confirmation??

    Thank you.

    Would command touch -m small.txt also change the last access time? I just put open the file to change the last access time.

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Unix general Q/A confirmation??

    I just googled touch, as I recalled that command being likely to help. It has several options.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    hayschooler is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    31
    Rep Power
    0

    Re: Unix general Q/A confirmation??

    I could really use some help understanding this question:

    Interpret the following crontab entry:
    30 21 * * * find /tmp /usr/tmp -atime +30 -exec rm -f { } \;


    My answer was that at 9:30 pm everyday the find command is executed. I don't know how to describe the rest of the command. Does it make sense to anyone or can you help me understand what this does?

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What Unix OS do you use?
    By DarkLordoftheMonkeys in forum Linux/Unix General
    Replies: 39
    Last Post: 08-09-2010, 02:07 PM
  2. Unix
    By Tonyg1 in forum Linux/Unix General
    Replies: 5
    Last Post: 04-21-2010, 05:38 PM
  3. JavaScript:Tutorial, Confirmation Box
    By TcM in forum JavaScript Tutorials
    Replies: 5
    Last Post: 11-07-2009, 08:13 PM
  4. Confirmation when leaving a form
    By MPD Psycho in forum JavaScript and CSS
    Replies: 5
    Last Post: 05-23-2008, 08:51 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts