LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-25-2002, 01:13 PM   #1
Huggles
LQ Newbie
 
Registered: Feb 2002
Posts: 3

Rep: Reputation: 0
Linux Equivilant to DOS "Type" command


Hi there,


I was just looking for a simple way to "type" i.e. dump a file's contents to the screen.


Thanks!


 
Old 02-25-2002, 01:16 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I think your wanting cat to look at the contents of a file..

cat filename

man cat - for more details.
 
Old 02-25-2002, 01:31 PM   #3
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
more will also show the contents of a file. 1 page at a time.

more filename
 
Old 02-25-2002, 05:37 PM   #4
Huggles
LQ Newbie
 
Registered: Feb 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks!



I asked a couple people at a former job of mine and they gave me a huge string that involved "tee >_< | grep KEKEKE.txt > huh/root/var *.$3at"

or something long like that.

are there any online linux-command databases? I have a book here.... but it doesn't have "more in it!" it was put together by our last linux admin.
 
Old 02-25-2002, 05:40 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
check the link on my sig down there... there's loads of good references, esp the orielly one.
 
Old 02-25-2002, 05:55 PM   #6
Huggles
LQ Newbie
 
Registered: Feb 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Acid:

Wow, very good references there... thanks!



Maybe I just suck, but it's really hard to find guides to doing simple things in linux. I bought this "Linux for windows addict" book and it just tells you about things and doesn't give you any commands to use, or at least, only a few.
 
Old 02-25-2002, 10:30 PM   #7
Scotty2435
Member
 
Registered: Dec 2001
Location: Waco, Texas USA
Distribution: Redhat 7.1
Posts: 232

Rep: Reputation: 30
you can use

emacs FILENAME

to edit a file
 
Old 02-26-2002, 09:02 AM   #8
Manish
Member
 
Registered: Feb 2002
Distribution: Debian / Debian-based
Posts: 58

Rep: Reputation: 15
You can also use:

less filename
 
Old 02-27-2002, 09:36 PM   #9
Malicious
Member
 
Registered: Jan 2002
Location: Galveston Island
Distribution: suse, redhat
Posts: 208

Rep: Reputation: 30
A little history lesson from the ol' guy.

"more" is a program that displays 24 lines at a time from its input file. Even DOS has a more command. When you type (or cat) a big file the output will scroll across the screen and you may lose the stuff you wanted to see. In unix-land, pipes were the way to do things, so some genius came up with a program that would stop output after 24 lines and wait for some key to be depressed. If you entered "cat bigfile | more", the output would go 24 lines at a time and any key would bring up the next page.

more has pretty much disappeared and has bee replaced by less. Do I detect a bit of irony in the play on words here?
 
Old 02-27-2002, 10:19 PM   #10
TacKat
Member
 
Registered: Jan 2002
Distribution: LFS
Posts: 90

Rep: Reputation: 15
more v. less
cat v. tac

Wordplay? I think not.

Just for reference, long strings of commands like `blah < foo | bar "foobar" | FOO > BAR.foo' can usually be broken down into parts. The pipe ( | ) directs the output of the program on the left of it to the program on the right. "<" uses a file for the input to a program. Likewise ">" puts the output into a file.

So in the above (fanciful) example, blah takes its input from file foo and directs the output to bar. bar then does something with that and directs the new output to FOO. FOO does something to that and directs the output to the file BAR.foo.

Grep is a commonly used command for pipes. Basically it searches the input for the string provided to it, and outputs all matches. For instance, `ls /dev | grep "hda"' will list all the strings with "hda" in them. It's a handy too to filter data.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux equivalent to DOS "tree" command? XDude Linux - Newbie 10 09-25-2014 12:24 PM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 11:24 AM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 02:48 AM
Equivalent to Dos "Type" command? greendemon Linux - Newbie 2 08-04-2003 04:48 AM
RH9,it apper something wrong when I type Command "rpm" setactive Linux - General 1 07-31-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration