![]() Grep -i enables the command to be case insensitive. It searches files for lines that match a pattern and returns the results. Grep stands for “global regular expression print”. This is a way to make the variable persist across programs. export export USER="Jane Doe"Įxport makes the variable to be available to all child sessions initiated from the session you are in. envĮnv | grep PATH is a command that displays the value of a single environment variable. Here, m*.txt selects all files in the working directory starting with “m” and ending with “.txt”, and copies them to scifi/. There are other types of wildcards, too, which are beyond the scope of this glossary. The above example will copy all of the files in the current directory to the directory called satire. ![]() The wildcard * selects all of the files in the current directory. Here, we copy the file ada_lovelace.txt and place it in the historical/ directory Wildcards (*) $ cp * satire/ cp $ cp ada_lovelace.txt historical/Ĭp copies files or directories. Here, cd jan/memory/ command navigates directly to the jan/memory directory. To navigate directly to a directory, use cd with the directory’s path as an argument. cd $ cd Desktop/Ĭd takes a directory name as an argument, and switches into that directory. The alias command allows you to create keyboard shortcuts, or aliases, for commonly used commands. When a session starts, it will load the contents of the bash profile before executing commands. It is commonly called the “bash profile”. ~/.bash_profile is the name of file used to store environment settings. You can think of this as “command to command” redirection. ![]() ![]() The | takes the standard output of the command on the left, and pipes it as standard input to the command on the right. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |