Skip to contentSkip to conversation

Command line questions

DISCUSSION Frank Roberts - SOTL 4 participants 5 messages Oct 5, 2002 – Oct 7, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

After studious consultation with several of my Linux books and an all day experience in attempting to access the hard drive of a Windows box using Tomsrtbt I have a couple of command line questions.

Background: Box was started on Tomsrtbt and HD was successful mounted. ls -a > Windors-C.txt under Toms produced the correct files when Windows-C was printed out so Tomsrtbt is working correctly but the correct files do not appear on the screen most likely to screen over run.

1. Is there an option to the ls command that will allow the scroll to page like the old dos command dir -p would? O'Reilly's Linux in a Nutshell does not so indicate but I have a hard time believing that this is so; that just does not seem logicall.

2. I have no problem changing to any directory that does not have spaces in it but I have no idea of how to account for a space in a directory like in the command "cd My Document"?

Thanks
Frank

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 5 lines · Frank Roberts - SOTL

[...]
1. Is there an option to the ls command that will allow the scroll to page like the old dos command dir -p would? O'Reilly's Linux in a Nutshell does not so indicate but I have a hard time believing that this is so; that just does not seem logicall.

No, there is not an option to "ls". You do this by piping the output of "ls" to "more".

Quoted 3 lines

2. I have no problem changing to any directory that does not have spaces in it but I have no idea of how to account for a space in a directory like in the command "cd My Document"?

One trick is to use tab completion. If that doesn't work, you "escape" the space character. Something like the following (for your example):

cd My\ Document

Quoted 2 lines

Thanks
Frank

--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
In reply to Frank Roberts - SOTL
Quoted 4 lines · Frank Roberts - SOTL

1. Is there an option to the ls command that will allow the scroll to page like the old dos command dir -p would? O'Reilly's Linux in a Nutshell does not so indicate but I have a hard time believing that this is so; that just does not seem logicall.

% ls -a | more

(this works in DOS, too, using dir instead of ls)

Quoted 3 lines

2. I have no problem changing to any directory that does not have spaces in it but I have no idea of how to account for a space in a directory like in the command "cd My Document"?

% cd My\ Documents

Ciao,
Elias

Signature · 6 lines
http://gnewtellium.sourceforge.net			MP3 is not a crime.	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: Command line questions - Thanks All

Thanks - All

I have been a GUI person for a long time and am just now starting to explore command line recovery tactics due to the crash of an old clunker MS box. No supprise on the crash it being MS and I can fix that in short order but there are several files and directories that I have a preference to salvage if possible.

Any way thanks for the additional information on my first steps in this new venture.

Thanks

Frank

Quoted 19 lines · Hal MacArgle

Greetings: You got answers to both but I didn't notice anyone mentioning piping to "less." "More" is the same as Dos's more but only allows you to scroll in one direction.. Less supports scrolling backwards in addition - helpful at times.. Less, also, is a very nice text reader invoking it then the filename.. Not sure, though, if Toms boot disk has less on board though. Most other distribs do..

Once you dig deeper into Linux/Unix you can write your own scripts to do almost anything that you wish.. As an example I wrote 'listit' which is mere shorthand for "ls -l | less"... I'm sure you know the various flags used with list.. ^^ means list the directory with all the details of each file.. Linux In A Nutshell explains all the flags pretty well..

Toms Root Disk is usually used for rescue activities.. If you really like the command line you should install a version of Slackware with a lot more power and very Unix like.. You'll be amazed as I, finding where Dos and everything else came from... <grin> HTH

Quoted 8 lines

Hal - in Terra Alta, WV - Slackware GNU/Linux 8.0 (2.4.13)
[email protected] | [email protected]..

Quoted 4 lines · Frank Roberts - SOTL

1. Is there an option to the ls command that will allow the scroll to page like the old dos command dir -p would? O'Reilly's Linux in a Nutshell does not so indicate but I have a hard time believing that this is so; that just does not seem logicall.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs