Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

32 bytes added, 17:17, 10 January 2020
Part 3: Manage Text File Content
'''Perform the Following Steps:'''
# View the following table of Text File Management commands Your instructor should have demonstrated in class how to use these commands):<br><table cellpadding="5"><tr><th style="border-bottom: 1px solid black;">Linux Command</th><th style="border-bottom: 1px solid black;">Purpose</th></tr><tr><td>'''touch'''</td><td>Create empty file(s) / Updates Existing File's Date/Time Stamp</td></tr><tr><td>'''cat'''</td><td>Display text file's contents without editing (small files)</td></tr><tr><td>'''more , less'''</td><td>Display / Navigate within large text fileswithout editing</td></tr><tr><td>'''cp'''</td><td>Copy text file(s)</td></tr><tr><td>'''mv'''</td><td>Move / Rename text files</td></tr><tr><td>'''rm'''</td><td>Remove text file(s)</td></tr><tr><td>'''file'''</td><td>Gives info about the contents of the file (e.g. file with no extention)</td></tr><tr valign="top"><td>'''diff''' file1 file2</td><td>displays differences between 2 files</td></tr><tr><td>'''file'''</td><td>Gives info about the contents of the file (e.g. file with no extention)</td></tr><tr valign="top"><td>'''find'''</td><td>To find files matching specified characteristics:<table><tr valign="top"><td width="20%">'''find . -name "file*"'''</td><td>lists pathname of any filenames beginning with "file",<br>from the current directory and any subdirectories</td></tr><tr valign="top"><td>'''find . -size +50k'''</td><td>lists pathname of any files larger than 50 kb, from the current directory and any subdirectories</td></tr><tr valign="top"><td>'''find . -mmin -5''' </td><td>lists files modified less than 5 minutes ago</td></tr></table></td></tr></table><br><br>
# Use the touch command to create the empty files called '''a.txt''', '''b.txt''', and '''c.txt'''<br><br>
# Use the '''nano''' text editor to edit the empty file called '''a.txt'''. <br><br>
13,420
edits

Navigation menu