Find the answer to your Linux question:
Results 1 to 4 of 4
hello guys, i was trying to do some scripting practice a while ago and nothing seems to be happening in the terminal. kindly refer below. was i doing it right? ...
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229

    What these commands do?

    hello guys,

    i was trying to do some scripting practice a while ago and nothing seems to be happening in the terminal. kindly refer below. was i doing it right? or perhaps nothing was really suppose to happen?
    what's it suppose to do anyway. in what way can this commands be useful to me? really appreciate anyone who can help enlighten :confused

    got this sample commands from Advanced Bash-Scripting Guide:

    Example 2-1. cleanup: A script to clean up the log files in /var/log


    # Cleanup
    # Run as root, of course.

    cd /var/log
    cat /dev/null > messages
    cat /dev/null > wtmp
    echo "Logs cleaned up."

  2. #2
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    This looks like homework, we don't do your homework for you here.

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by nujinini View Post
    what's it suppose to do anyway.
    in what way can this commands be useful to me?
    You should never run scripts whose function is unknown to you as root.
    The "man" command can give you an idea about what each command does, e.g. "man cat".
    Debian GNU/Linux -- You know you want it.

  4. #4
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Quote Originally Posted by GNU-Fan View Post
    You should never run scripts whose function is unknown to you as root.
    The "man" command can give you an idea about what each command does, e.g. "man cat".
    thanks a lot for this advise. very helpful for a newbie like me who wants to learn as much as i can learn...

Posting Permissions

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