Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows

Total Page:16

File Type:pdf, Size:1020Kb

Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows SESUG 2016 Paper CC–134 Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows Imelda C. Go, South Carolina Department of Education, Columbia, SC ABSTRACT The ability to create a data set which contains the names of all the files in a directory can be very useful. This listing can be easily generated using the Disk Operating System (DOS) DIR command via the Windows command prompt. Within SAS, you can use the PIPE option in a FILENAME statement and the DIR command to generate the listing. This paper goes through three possible uses of this data set with the file listing. The first example is a situation where many files with the same input structure need to be read from the same directory. Instead of hard-coding the file name to create each of the many data sets, apply a SAS macro on each file name in the directory listing to create each data set. The second example involves the need to collect data files and determine which files are still missing. The third example is a situation where you are running out of computer storage space and need to identify files based on file size/type and/or age for possible deletion or other action. An often overlooked source of solutions is the SAS Knowledge Base online. Two SAS samples (24820 and 41880) can be used to address the above situations. Generating a text file which contains file information for a directory, or a directory and all of its subdirectories is easily accomplished using a DOS command issued at the Windows command prompt. Disk Operating Systems (DOS) started in the early 80s and are operating systems that use the command line. DOS was the most common operating systems for IBM-PCs and compatibles from the 80s till the 90s. As true DOS systems became obsolete, the Microsoft Windows operating systems continued to provide users with access to the command prompt. Younger programmers may have never worked with the command prompt in a true DOS environment. Let us first discuss how a user can obtain the directory listing through the Windows command prompt: The DIR DOS command provides a listing of files. The information in the listing will depend on the exact form of the DIR command used. Options and parameters could vary, which change the exact form of the listing. A search online for “DIR DOS commands” will lead to many references regarding the DIR DOS command. Just be aware that exact syntax specifics might vary depending on the DOS version being referred to. The DIR syntax notes provided in this paper are not exhaustive. Once the user decides on the final form of the DIR command to use, the redirection operator may be used to send the output of the command to a file. The listing may be redirected using the > or the >> operator. The > operator writes the output of the command into the specified file. For example, the following command generates the default listing for the c:\ directory and writes the listing into c:\dircontents.txt dir c:\ > c:\dircontents.txt The file specified is created if it did not exist prior to the DIR command being issued and the file is overwritten if the specified file already exists. Instead of overwriting an existing file, the >> redirection appends the DIR command output to the contents of the file specified. dir c:\ >> c:\dircontents.txt Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows, continued SESUG 2016 DIR Syntax The basic syntax will look like this where anything in brackets and parentheses is an option: DIR [d:][path][filename][/A:(attributes)][/O:(order)][/B][/C][/CH][/L][/S][/P][/W] Here are a few basic forms of the DIR command: dir displays the listing for the current directory dir *.csv displays the listing for files with a .csv extension in the current directory dir c:/ *. displays files with no file extension in the c:/ directory /A Switch and Attributes [/A:(attributes)] The attributes help limit the listing of files and directories in the path. The specific attributes are specified right after /A:. Attributes that help limit the listing include: • hidden (H) or not hidden (-H) files • system (S) or non-system (-S) files • directories only (D) or files only (-D) • read-only files (R) or read/write files (-R) For example: /A:HS is for a listing with hidden system files only /A:-DR is for read-only files only and excludes directories in the listing /O Switch and Order Options [/O:(order)] There are DOS options that affect the order of the listing. This is not really critical since the data can be sorted within SAS. Sort options include: • by alphabetical file name (N) or reverse alphabetical file name (-N) • by alphabetical extension (E) or reverse alphabetical extension (-E) • by chronological date and time (D) or reverse chronological date and time (-D) • by increasing size (S) or decreasing size (-S) Other Switches There are other switches that can be useful. In particular, the /S switch is important for this paper’s third example. • /S displays the listing in the specified directory ([path]) and all subdirectories below it. • /L which displays the listing in lowercase letters. • /W displays only the file and directory names and excludes other file information but in a five-column format. 2 Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows, continued SESUG 2016 THE DIR LISTING FROM THE COMMAND PROMPT Let us look at how we can acquire this listing via the command prompt in a Windows system. Let us suppose the following three files are in c:\Users\igo\Desktop\example1 Open the Windows command prompt and then make your way to the directory by issuing the CD (change directory) command. (A discussion of the CD command’s syntax is not included in this paper.) In the example below, we are now in the c:\Users\igo\Desktop\example1 directory. We then issue the DIR command in its simplest form without parameters, attributes, or switches. In its simplest form, the DIR command provides a listing in the current directory. The listing is displayed on the screen. We can issue the “dir > example1dir.txt” command to save the listing to a file. This command takes the listing generated by the DIR command and writes it into the example1dir.txt file in the same (current) directory. If we issue the DIR command right after issuing the redirection command, we see that the example1dir.txt file is in the current directory. Since we did not specify a different path for example1dir.txt, the TXT file was written in the current directory, which is c:\Users\igo\Desktop\example1 in the example. 3 Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows, continued SESUG 2016 The text file has the same contents that the DIR command displayed in the command prompt window. We can observe that most of the file details are displayed in fixed width format and that it is possible to isolate the information for the date, time, size in bytes, and the file name by counting the column positions. The strategy is simple: generate a listing with the DIR command and then create a data set using the information in the file. The following example demonstrates the use of the /s and /a switches. The /a:-d portion of the command specified that only files be included in the listing. Therefore, directories will not be included. 4 Using SAS® to Get a List of File Names and Other Information from a Directory in Microsoft® Windows, continued SESUG 2016 PIPE OPTION AND DIR COMMAND IN FILENAME STATEMENT Now that we know what the DIR command produces, let us look at what we can do from within SAS directly. Using a FILENAME statement with the PIPE option and the DIR command, we can generate the listing and use a DATA step to extract the data elements we need. The example below shows that the path for which you need a listing for is in double quotes (“c:\Users\igo\Desktop\example1”) and the exact DIR command specification is in single quotes. The DIR command below specifies the directory path for which you need the listing for. This technique involves an unnamed pipe, which allows you to take the output generated by the DIR command and use it as input for the data set. Note how you can do this directly in SAS and not need the listing to be saved in a file as illustrated above with the redirection of output. The listing variable shown below contains every line in the listing. We use the fact that the listing contains data in fixed width format. We are able to use the SUBSTR function to isolate the filename value. The datasetname value is just the filename value in compressed form without spaces and the period. This is just an arbitrary dataset name used for the sake of providing an example. Right now we have more lines than needed. We can fix this by adding another line of code that eliminates the extra lines and leaves us with observations 8-11 only. This is a very simple example and the condition for deletion works for this example. Depending on the actual from of the DIR listing, you might have to adjust the condition for deletion. The need to adjust the condition will occur in Example 3.
Recommended publications
  • Windows Command Prompt Cheatsheet
    Windows Command Prompt Cheatsheet - Command line interface (as opposed to a GUI - graphical user interface) - Used to execute programs - Commands are small programs that do something useful - There are many commands already included with Windows, but we will use a few. - A filepath is where you are in the filesystem • C: is the C drive • C:\user\Documents is the Documents folder • C:\user\Documents\hello.c is a file in the Documents folder Command What it Does Usage dir Displays a list of a folder’s files dir (shows current folder) and subfolders dir myfolder cd Displays the name of the current cd filepath chdir directory or changes the current chdir filepath folder. cd .. (goes one directory up) md Creates a folder (directory) md folder-name mkdir mkdir folder-name rm Deletes a folder (directory) rm folder-name rmdir rmdir folder-name rm /s folder-name rmdir /s folder-name Note: if the folder isn’t empty, you must add the /s. copy Copies a file from one location to copy filepath-from filepath-to another move Moves file from one folder to move folder1\file.txt folder2\ another ren Changes the name of a file ren file1 file2 rename del Deletes one or more files del filename exit Exits batch script or current exit command control echo Used to display a message or to echo message turn off/on messages in batch scripts type Displays contents of a text file type myfile.txt fc Compares two files and displays fc file1 file2 the difference between them cls Clears the screen cls help Provides more details about help (lists all commands) DOS/Command Prompt help command commands Source: https://technet.microsoft.com/en-us/library/cc754340.aspx.
    [Show full text]
  • TRSDOS 6.2 to LS-DOS 6.3.0 Manual Update
    LS-DOSÔ 6.3 UPDATE FOR TRSDOSâ 6.2.X The LS-DOS 6.3 release is an upgrade for the TRSDOS 6.2 operating system. Several important changes have been made to extend and enhance the operating system and its utilities. The date ranging has been expanded to accept dates through the year 1999. Files will now carry a modification time as well as a date. The DATECONV/CMD program is provided to translate version 6.2 or earlier disks to the 6.3 style dating. The user password has been eliminated from the system. The owner password still remains. The library command ID was added to display a customer service number. Several enhancements have been made to BASIC. The new DISKCOPY/CMD program will duplicate 5" double density floppy disks. Because the LS-DOS 6.3 update is a series of enhancements to TRSDOS 6.2, the primary documentation remains the 6.2 manual and Technical Reference manual. If you have a version of TRSDOS earlier than 6.2, you can obtain the manuals from Radio Shack under the catalog numbers 26-0316 (TRSDOS Version 6 [6.2 DOS manual and disk]), 26-2110 (Model 4/4D [6.2] Technical Reference Manual), or 26-1117 (6.2 DOS manual only). This documentation should be treated as an addendum to the TRSDOS 6.2 information. LS-DOS 6.3 installation instructions Before performing the upgrade, it is recommended that you make several backup copies of the 6.3 master disk. The simplest way to do this is to boot your system using the 6.3 diskette, insert a blank diskette to receive the copy in drive 1, and type the command: DISKCOPY :0 :1 When the copy finishes, you can insert another destination diskette and make another copy.
    [Show full text]
  • Your Performance Task Summary Explanation
    Lab Report: 11.2.5 Manage Files Your Performance Your Score: 0 of 3 (0%) Pass Status: Not Passed Elapsed Time: 6 seconds Required Score: 100% Task Summary Actions you were required to perform: In Compress the D:\Graphics folderHide Details Set the Compressed attribute Apply the changes to all folders and files In Hide the D:\Finances folder In Set Read-only on filesHide Details Set read-only on 2017report.xlsx Set read-only on 2018report.xlsx Do not set read-only for the 2019report.xlsx file Explanation In this lab, your task is to complete the following: Compress the D:\Graphics folder and all of its contents. Hide the D:\Finances folder. Make the following files Read-only: D:\Finances\2017report.xlsx D:\Finances\2018report.xlsx Complete this lab as follows: 1. Compress a folder as follows: a. From the taskbar, open File Explorer. b. Maximize the window for easier viewing. c. In the left pane, expand This PC. d. Select Data (D:). e. Right-click Graphics and select Properties. f. On the General tab, select Advanced. g. Select Compress contents to save disk space. h. Click OK. i. Click OK. j. Make sure Apply changes to this folder, subfolders and files is selected. k. Click OK. 2. Hide a folder as follows: a. Right-click Finances and select Properties. b. Select Hidden. c. Click OK. 3. Set files to Read-only as follows: a. Double-click Finances to view its contents. b. Right-click 2017report.xlsx and select Properties. c. Select Read-only. d. Click OK. e.
    [Show full text]
  • Command Window – Basic Commands
    Command Window – Simple Commands help lists all commands p: switch to your P-drive c: switch to the computer’s C-drive dir list all files in a directory (aka “folder”); e.g. dir (list all files in current directory) dir myfolder (list all files in subdirectory myfolder) cd change directory; e.g. cd myfolder (move to subdirectory myfolder) cd .. (move up one directory level) md make (create) a directory; e.g. md myfolder (make a subdirectory called myfolder) copy copy files; e.g. copy oldfile newfile copy source.f90 myfolder\source.f90 ren rename files; e.g. ren oldfile newfile erase erase (delete) a file; e.g. (or del) erase unwanted.txt fc file compare; e.g. fc file1 file2 type list the contents of a file type somefile.txt type somefile.txt ¦ more (list contents, one page at a time) Wildcards (* and ?) Can be used to match length-unspecified strings (*) or individual letters (?); e.g. copy *.f90 *.bak dir solve.f?? Command Syntax and Options Most commands have various options; e.g. dir /p – list files, one page at a time To find the syntax and options available for any particular command use the /? option; e.g. dir /? History Use the and arrows on keyboard to recover previous commands. Use F7 to get a list of previous commands and arrow up and down to choose one to reissue. Editors An editor called notepad comes with the operating system: notepad myfile.f90 Running Programs You can run any program simply by typing its name; e.g. to run windows explorer: explorer Batch Files To avoid having to type a long sequence of commands it is convenient to put them all in a batch file – identified by the .bat extension.
    [Show full text]
  • Session 1171-2017
    Paper 1171-2017 Let SAS® Do Your DIRty Work Richann Watson, Experis ABSTRACT Making sure that you have saved all the necessary information to replicate a deliverable can be a cumbersome task. You want to make sure that all the raw data sets and all the derived data sets, whether they are Study Data Tabulation Model (SDTM) data sets or Analysis Data Model (ADaM) data sets, are saved. You prefer that the date/time stamps are preserved. Not only do you need the data sets, you also need to keep a copy of all programs that were used to produce the deliverable, as well as the corresponding logs from when the programs were executed. Any other information that was needed to produce the necessary outputs also needs to be saved. You must do all of this for each deliverable, and it can be easy to overlook a step or some key information. Most people do this process manually. It can be a time-consuming process, so why not let SAS® do the work for you? INTRODUCTION Making a copy of all information needed to produce a deliverable is time-consuming and is normally done using • Windows® Explorer: copy and paste to a new folder for archiving • Command interpreter (CMD shell)*: copy or move commands Both of these methods require you to create an archive directory and either copy or move the files manually. Most people go the route of using Windows Explorer due to familiarity. This can tie up your computer while the files are being archived. CMD is faster and commands can be set to run in the background if you know how to access CMD and know the necessary commands.
    [Show full text]
  • NETSTAT Command
    NETSTAT Command | NETSTAT Command | Use the NETSTAT command to display network status of the local host. | | ┌┐────────────── | 55──NETSTAT─────6─┤ Option ├─┴──┬────────────────────────────────── ┬ ─ ─ ─ ────────────────────────────────────────5% | │┌┐───────────────────── │ | └─(──SELect───6─┤ Select_String ├─┴ ─ ┘ | Option: | ┌┐─COnn────── (1, 2) ──────────────── | ├──┼─────────────────────────── ┼ ─ ──────────────────────────────────────────────────────────────────────────────┤ | ├─ALL───(2)──────────────────── ┤ | ├─ALLConn─────(1, 2) ────────────── ┤ | ├─ARp ipaddress───────────── ┤ | ├─CLients─────────────────── ┤ | ├─DEvlinks────────────────── ┤ | ├─Gate───(3)─────────────────── ┤ | ├─┬─Help─ ┬─ ───────────────── ┤ | │└┘─?──── │ | ├─HOme────────────────────── ┤ | │┌┐─2ð────── │ | ├─Interval─────(1, 2) ─┼───────── ┼─ ┤ | │└┘─seconds─ │ | ├─LEVel───────────────────── ┤ | ├─POOLsize────────────────── ┤ | ├─SOCKets─────────────────── ┤ | ├─TCp serverid───(1) ─────────── ┤ | ├─TELnet───(4)───────────────── ┤ | ├─Up──────────────────────── ┤ | └┘─┤ Command ├───(5)──────────── | Command: | ├──┬─CP cp_command───(6) ─ ┬ ────────────────────────────────────────────────────────────────────────────────────────┤ | ├─DELarp ipaddress─ ┤ | ├─DRop conn_num──── ┤ | └─RESETPool──────── ┘ | Select_String: | ├─ ─┬─ipaddress────(3) ┬ ─ ───────────────────────────────────────────────────────────────────────────────────────────┤ | ├─ldev_num─────(4) ┤ | └─userid────(2) ─── ┘ | Notes: | 1 Only ALLCON, CONN and TCP are valid with INTERVAL. | 2 The userid
    [Show full text]
  • Pingdirectory Administration Guide Version
    Release 7.3.0.3 Server Administration Guide PingDirectory | Contents | ii Contents PingDirectory™ Product Documentation................................................ 20 Overview of the Server............................................................................. 20 Server Features.................................................................................................................................20 Administration Framework.................................................................................................................21 Server Tools Location....................................................................................................................... 22 Preparing Your Environment....................................................................22 Before You Begin.............................................................................................................................. 22 System requirements..............................................................................................................22 Installing Java......................................................................................................................... 23 Preparing the Operating System (Linux).......................................................................................... 24 Configuring the File Descriptor Limits.................................................................................... 24 File System Tuning.................................................................................................................25
    [Show full text]
  • UNIX and the Shells
    UNIX and the Shells Ole Peter Smith, IME, UFG, [email protected] 24/04/2010 Life sure is a Mystery to be Lived Not a Problem to be Solved... Ole Peter Smith, IME, UFG, [email protected] () UNIX and the Shells 24/04/2010 1 / 13 Beautiful Scientific Documents Classical Free Software Markup Language Thesis, automatic: · Bibliography · Contents · List of Tables, Figures · Index, References Slideshows: Beamer SL! MikTex, LyX, TexMaker, Kyle ^ Ole Peter Smith, IME, UFG, [email protected] () UNIX and the Shells 24/04/2010 2 / 13 Introdu¸c~ao UNIX vs. Linux Shell: Concha Bash: Bourne-Again Shell Csh: C Shell Ssh: Secure Shell · Remote Administration · File Transfer O mais importante n~ao´esaber de tudo O mais importante ´esaber onde pesquisar! Ole Peter Smith, IME, UFG, [email protected] () UNIX and the Shells 24/04/2010 3 / 13 File Commands List: ls - ls -l - ls -a - ls -tlF Usage: man command Criate: touch Move or rename: mv Copy: cp - cp -p - cp -r Remove: rm - rm -f (take care!!!!) - rm -r Content: cat Edit: vi or vim Symbolic Link: ln -s Ole Peter Smith, IME, UFG, [email protected] () UNIX and the Shells 24/04/2010 4 / 13 Notable Files & Directories System Configuration dir: /etc User Configuration dir, Home: '~/' (or '/home/$user') Users: /etc/passwd -: user - uid - gid - shell - home - Gecho Groups: /etc/group -: gname - gid - members Known hosts /etc/hosts -: ip - hostname - hostname... File systems /etc/fstab -: dev mount-point - fs-type - options Network services /etc/services -: service-name - port/protocol /usr, /var, /home,..
    [Show full text]
  • Subject: What This App Note Is All About
    OPERATOR INTERFACE PRODUCTS APPLICATION NOTE Subject: Setting Up a Dual Boot System AN 1024A Date: 7/16/96 Name: Irvin Hayes Jr Page: 1 of 2 Description: Dual Booting with Windows 95 and Windows 3.XX To install Windows 95 with dual-boot capabilities for MS-DOS, the computer must already be running version 5.x or 6.x of MS-DOS or PC-DOS and already have Windows 3.XX installed. Important In order to take advantage of the Windows 95 dual-boot capabilities, the entry BootMulti=1 must be set in the Windows 95 MSDOS.SYS file in the root directory To set up dual-boot capabilities for a new installation of Windows 95 • During Windows 95 Setup, when you are installing Windows 95 for the first time, make sure you specify a new directory that does not already have another version of Windows in it. Windows 95 Setup makes all of the necessary changes to preserve your existing version of MS- DOS, Windows 3.x, or Windows for Workgroups 3.x, and your current AUTOEXEC.BAT and CONFIG.SYS files. If you have already installed Windows 95 without dual-boot capabilities, you can follow these steps to allow MS-DOS to dual boot with Windows 95. However, you will not be able to dual boot with your previous version of Windows. To set up dual-boot capabilities after Windows 95 has been installed 1. On a bootable floppy disk that starts MS-DOS 5.0 or greater, rename the IO.SYS and MSDOS.SYS files on the disk to IO.DOS and MSDOS.DOS.
    [Show full text]
  • Introduction to Computer Networking
    www.PDHcenter.com PDH Course E175 www.PDHonline.org Introduction to Computer Networking Dale Callahan, Ph.D., P.E. MODULE 7: Fun Experiments 7.1 Introduction This chapter will introduce you to some networking experiments that will help you improve your understanding and concepts of networks. (The experiments assume you are using Windows, but Apple, Unix, and Linux systems will have similar commands.) These experiments can be performed on any computer that has Internet connectivity. The commands can be used from the command line using the command prompt window. The commands that can be used are ping, tracert, netstat, nslookup, ipconfig, route, ARP etc. 7.2 PING PING is a network tool that is used on TCP/IP based networks. It stands for Packet INternet Groper. The idea is to verify if a network host is reachable from the site where the PING command issued. The ping command uses the ICMP to verify if the network connections are intact. When a PING command is issued, a packet of 64 bytes is sent to the destination computer. The packet is composed of 8 bytes of ICMP header and 56 bytes of data. The computer then waits for a reply from the destination computer. The source computer receives a reply if the connection between the two computers is good. Apart from testing the connection, it also gives the round trip time for a packet to return to the source computer and the amount of packet loss [19]. In order to run the PING command, go to Start ! Run and in the box type “cmd”.
    [Show full text]
  • TB-1052 Digital Video Systems
    IRIS TECHNICAL BULLETIN TB-1052 Digital Video Systems Subject: Installing and Running Check Disk on XP Embedded Systems Hardware: TotalVision-TS Software: IRIS DVS XPe Ver. 11.04 and Earlier (Including FX and non-FX Units) Release Date: 12/22/08 SUMMARY IRIS DVS units initially produced prior to January 1, 2009 may not have complete support for running chkdsk.exe even though the chkdsk.exe file exist in the Windows/System32 directory. This Technical Bulletin describes how to install and run the Check Disk (ChkDsk) utility to minimize file corruption problems and potential RAW Disk failures. INSTALLING SOFTWARE Several additional files are needed to be installed on the DVS hard drive. You can get a copy of these files at the IRIS Web Service Site www.SecurityTexas.com/service. Download the “Check Disk Upgrade” package and follow the instructions in the ReadMe file of that zip file on how to upgrade the files on the DVS. Once the files are copied to the hard drive, highlight the file “EVENTVWR.MSC” and then select “File- >Pin to Start Menu” to provide an easy way to access the Event Viewer. After the required software has been installed run Windows File Explorer and select the C:\BankIRIS_NT directory. Double-click on the AUTOCHECK.REG file. Answer YES in response to the two prompts to update the registry. Expert Mode: To verify that the registry changes were done you can select “Start->Run” and type in “RegEdit.exe” to run the Registry Editor. Select the key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Sesion Manager”. Select the key "BootExecute".
    [Show full text]
  • Great Lakes Cheat Sheet Less File Prints Content of File Page by Page Guide to General L Inux (Bash) a Nd S Lurm C Ommands Head File Print First 10 Lines of File
    Viewing and editing text files cat file Print entire content of file Great Lakes Cheat Sheet less file Prints content of file page by page Guide to general L inux (Bash) and S lurm c ommands head file Print first 10 lines of file tail file Print last 10 lines of file Accessing Great Lakes nano Simple, easy to use text editor Logging in from a terminal (Duo required) vim Minimalist yet powerful text editor ssh uniqname @greatlakes.arc-ts.umich.edu emacs Extensible and customizable text editor Transferring files between Great Lakes and your system scp input uniqname@ greatlakes-xfer.arc-ts.umich.edu: output Advanced file management scp -r i nput uniqname@ greatlakes-xfer.arc-ts.umich.edu:o utput scp uniqname@ greatlakes-xfer.arc-ts.umich.edu:i nput output chmod Change read/write/execute permissions which cmd List the full file path of a command GUI Clients PuTTY SSH client for Windows whereis cmd List all related file paths (binary, source, manual, etc.) of a command WinSCP SCP client for Windows du dir List size of directory and its subdirectories FileZilla FTP client for Windows, Mac, and Linux find Find file in a directory Basic Linux file management Aliases and system variables man command Display the manual page for command alias Create shortcut to command pwd Print out the present working directory env Lists all environment variables ls List the files in the current directory export var = val Create environment variable $ var with value ls -lh Show long, human-readable listing val ls dir List files inside directory dir echo $var Print the value of variable $var rm file Delete file .bashrc File that defines user aliases and variables mkdir dir Create empty directory called dir Input and output redirection rmdir dir Remove empty directory dir $( command) Runs command first, then inserts output to the rm -r dir Remove directory dir and all contents rest of the overall command cd dir Change working directory to dir < Standard input redirection cd .
    [Show full text]