Results 1 to 4 of 4

Thread: How and where to use the cat command

Hybrid View

  1. #1

    How and where to use the cat command

    Hi,

    As I understand the cat command is used to display only the textual contents of a file in a terminal. For example 'cat /var/log/yum.log' command lists all the installed softwares with their version no, date and time. Just like below. This is just a short example...

    Feb 03 14:34:11 Updated: mysql.i386 5.0.27-1.fc5
    Feb 03 14:34:12 Installed: libsigc++20.i386 2.0.17-1
    Feb 03 14:34:13 Installed: glibmm24.i386 2.8.12-1
    Feb 03 14:34:14 Installed: gtkmm24.i386 2.8.9-1.fc5

    I have text file name hithere.txt somewhere in a directory unknown to me, how do I find out and display the contents of it with cat command? Thanks.....

  2. #2
    Member omidkamangar's Avatar
    Join Date
    Mar 2006
    Location
    Kurdistan
    Posts
    239
    Quote Originally Posted by tech291083 View Post
    I have text file name hithere.txt somewhere in a directory unknown to me, how do I find out and display the contents of it with cat command? Thanks.....
    You can use the find command to find out the location of the file and then display it's contents with cat.
    Code:
    find /home --name hithere.txt
    You can replace /home with / to search all the filesystem.
    This will be over soon, and then I can ...

  3. #3
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    slocate can do the trick too.

    (as root)updatedb
    locate filename.ext

  4. #4
    Quote Originally Posted by Schotty View Post
    slocate can do the trick too.

    (as root)updatedb
    locate filename.ext
    Thanks...

Similar Threads

  1. TAR command
    By vwgtiturbo in forum Linux - General Topics
    Replies: 2
    Last Post: 01-30-2004, 05:53 PM
  2. the 'dd' command...
    By nusjunkie in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 06-11-2002, 07:01 AM
  3. Help with a command?
    By Rastar in forum Linux - General Topics
    Replies: 4
    Last Post: 05-11-2002, 12:09 AM
  4. What is the command? Or App?
    By TomP in forum Linux - General Topics
    Replies: 10
    Last Post: 02-26-2002, 07:36 PM
  5. Looking for Command
    By jmbrinks in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 02-25-2002, 09:32 PM

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
  •