2./ : the directory immediately above the current one. For example./xc2f runs the program xc2f which can be found in the present working directory. These are: 1./ : the current directory the command prompt is in. There are two special directory handles that you use when issuing command like cd. For instance, if I type cd cs1073 then I will change into the subdirectory (a subdirectory is a folder which is contained within another folder) cs1073. This is the way to move around in the filesystem. are you at your top directory, or deep in nested folders)? For instance, right after I log in, if I type pwd, I get: main205>pwd /home/whaley cd : change directory. Shows where you are in the file system (i.e. For instance, mkdir cs1073 will create the directory/folder cs1073 in the present working directory. A directory is a special file on the storage device that can contain other files. Here are some common commands: mkdir: make directory (a directory is often called a folder in windows). If you log into the machines from home using PuTTY, then you type these commands in the PuTTY window. This small note can help you get started learning some of these commands remember that much more detailed descriptions are available online, in particular: In the labs, click on Applications->accessories->terminal to open up the terminal window which gives you access to the command prompt. Spotlight search for files (names, content, other metadata), e.g.1 Linux terminal commands Linux has a very powerful command-line interface, which is invoked by typing commands into a terminal or xterm window directly (like the DOS/CMD window in Windows). Search for all lines that contain the case-insensitive pattern Search for all lines that do NOT contain the pattern Recursively search in all files in specified directory for all lines that contain the pattern Search for all lines that contain the pattern, e.g. Push output to file, keep in mind it will get overwritten Output file content delivered in screensize chunks Remove directory ( only operates on empty directories )
Paste clipboard contents into file, pbpaste > paste-test.txt Print to the console the last command typed Print to the console the last command typed that starts with ‘value’
Interactively search through previously typed commandsĮxecute the last command typed that starts with ‘value’ Shows the stuff typed – add a number to limit the last n items Run command A and then pass the result to command B e.g ps auxwww | grep google Run command A and then B, regardless of success of A Opens a file ( as if you double clicked it )ĭisplays active processes. Run command with the security privileges of the superuser (Super User DO) Long listing with Human readable file sizes Swap the last two words before the cursorĬut one word backwards using none alphabetic characters as delimiters Swap the last two characters before the cursor Puts whatever you are running into a suspended background process. Also clears everything on current lineĮxit the current shell when no process is running, or send EOF to a the running process Paste whatever was cut by the last cut command Netbeans being one exceptionĬut everything backwards to beginning of lineĬut one word backwards using white space as delimiter This also works for most text input fields system wide. Go to the end of the line you are currently typing on.
Go to the beginning of the line you are currently typing on. Letters are shown capitalized for readability only. Since the translation rely on volunteers, the content between the available languages may vary. This cheatsheet is available in many languages.