Learning Mysql


Using the Command-Line Interface | 13



Download 4.24 Mb.
View original pdf
Page21/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   17   18   19   20   21   22   23   24   ...   366
Learning MySQL
Using the Command-Line Interface | 13

You can also change to your home directory by using the tilde shortcut cd

In fact, you can leave out the tilde cd on its own means change to my home directory.”
ls
Lists the files and directories in your working folder. For example, you can list the files in your home directory by typing ls

Together, the cd and ls commands are the text equivalent of using a graphical file manager—such as Konqueror or Nautilus under Linux, or the Finder under Mac OS
X—to go to different directories and view their contents.
Command completion and history
Command completion is a great time-saving feature when you start to type the name of a command, file, or directory, pressing the Tab key cycles through names that could match. The best way to understand this is to try it. For example, when you type cd /t
and then repeatedly press the Tab key, you’ll see items beginning with the letter tin the
/
(filesystem root) directory. If a name has spaces, a backslash character is added automatically before each space—for example
My\
Important\
Notes.txt
. Most Linux and Mac OS X systems are configured to use the bash shell, and we assume you’re using this, too. If you’re using a different shell variant, such as tcsh
, you’ll need to press the
Ctrl-D key combination in place of the Tab key.
Pressing the up and down arrow keys will cycle through the last commands you typed;
you can use the arrow keys to edit a previous command, and you can press the Enter key to run a displayed command. You can see a list of recently used commands with the history command, as below history
1 cd Photos lt
3 find . -name "*AMES*"
4 cfdisk /dev/hda
5 ssh ubuntu@192.168.1.1
You can quickly run a command again by typing the number preceded by an exclamation mark (
!
) character. For example, to run the command numbered in the history list, you can type

Download 4.24 Mb.

Share with your friends:
1   ...   17   18   19   20   21   22   23   24   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page