Mv: The mv command will move a file to a different location or will rename a file. Subdirectories of the subdirectories and all their files, and on and "recursively" means, think of it this way: to copy the directory andĪll its files and subdirectories and all their files and Must use "cp -r directory foo" (copy recursively). Example: "cp file foo" will make an exact copy of "file" and name it "foo", but theįile "file" will still be there. As anotherĮxample, "cd ~/Desktop" will move you to the Desktop subdirectoryĬp: The cp command will make a copy of a file for you. var/www" to go directly to the /www subdirectory of /var/. To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. To navigate to the previous directory (or back), use "cd -" To navigate up one directory level, use "cd. To navigate to your home directory, use "cd" or "cd ~" To navigate into the root directory, use "cd /" When you open a terminal you will be in your home directory. You the files that are in your home directory.Ĭd: The cd command will allow you to change directories. Used with certain options, you can see sizes of files, whenįiles were made, and permissions of files. Ls: The ls command will show you ('list') the files in your current directory. ![]() A useful gnemonic is "present working directory." GNOME Terminal also displays this information in the title bar of its "pwd" in the Desktop directory will show "~/Desktop". Pwd: The pwd command will allow you to know in which directory you're located (pwd stands for "print working directory"). If you are user, then the tilde (~) stands for /home/user The tilde (~) symbol stands for your home directory. Here's a snippet from this page of how the basic file and directory navigation commands: Anything that you can do in a windows shell/command line, you can also do in Ubuntu, although sometimes the commands are different, say, for example, to list directories, in Windows, you use dir, whereas in Unix based systems like Ubuntu, you use ls.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |