This is an old revision of the document!


Intermediate Unix Commands

Permissions

UNIX organizes permissions by user, group, and others. There are three different permissions available: read, write, and execute

chmod is the command to change permissions

Groups

To change the group associated with a file, use chgrp

Finding Content: grep

Gnu Regular Expression Print (grep) is a helpful tool to search for text within files, using–you guessed it–regular expressions! Regular expressions can be quite simple.

Example: I want to find all the names that start with “Sara” in a file of names

grep Sara names.txt

Finding Files: find

Finding Differences Between Files: diff

Beginning of Files: head

End of Files: tail

Viewing Services Listening on a Port

lsof -i :<port>

e.g.,

lsof -i :8080
labs/unix_intermediate.1725556430.txt.gz · Last modified: 2024/09/05 17:13 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0