Unix - Useful Commands: Files and Directories
Unix - Useful Commands: Files and Directories
com
This quick guide lists commands, including a syntax and brief description. For more detail, use:
$man command
Delete an existing directory provided it is empty. Prints last few lines in a file. Update access and modification time of a file.
Manipulating data:
The contents of files can be compared and altered with the following commands. Command awk cmp comm cut diff expand join perl sed sort split tr uniq wc vi vim fmt spell ispell ispell emacs ex, edit Description Pattern scanning and processing language Compare the contents of two files Compare sorted data Cut out selected fields of each line of a file Differential file comparator Expand tabs to spaces Join files on some common field Data manipulation language Stream text editor Sort file data Split file into smaller files Translate characters Report repeated lines in a file Count words, lines, and characters Opens vi text editor Opens vim text editor Simple text formatter Check text for spelling error Check text for spelling error Check text for spelling error GNU project Emacs Line editor
emacs emacs
Compressed Files:
Files may be compressed to save space. Compressed files can be created and examined: Command compress gunzip gzip uncompress unzip zcat zcmp zdiff zmore Compress files Uncompress gzipped files GNU alternative compression method Uncompress files List, test and extract compressed files in a ZIP archive Cat a compressed file Compare compressed files Compare compressed files File perusal filter for crt viewing of compressed text Description
Getting Information:
Various Unix manuals and documentation are available on-line. The following Shell commands give information: Command apropos info man whatis yelp Description Locate commands by keyword lookup Displays command information pages online Displays manual pages online Search the whatis database for complete words. GNOME help viewer
Network Communication:
These following commands are used to send and receive files from a local UNIX hosts to the remote host around the world.
Command ftp rcp rlogin rsh tftp telnet ssh scp sftp File transfer program Remote file copy
Description
Remote login to a UNIX host Remote shell Trivial file transfer program Make terminal connection to another host Secure shell terminal or command connection Secure shell remote file copy secure shell file transfer program
Some of these commands may be restricted at your computer for security reasons.
Programming Utilities:
The following programming tools and languages are available based on what you have installed on your Unix. Command dbx Sun debugger Description
gdb make nm size strip cb cc ctrace gcc indent bc gcl perl php py asp CC g++ javac appletvieweir netbeans sqlplus sqlldr mysql
GNU debugger Maintain program groups and compile programs. Print program's name list Print program's sizes Remove symbol table and relocation bits C program beautifier ANSI C compiler for Suns SPARC systems C program debugger GNU ANSI C Compiler Indent and format C program source Interactive arithmetic language processor GNU Common Lisp General purpose language Web page embedded language Python language interpreter Web page embedded language C++ compiler for Suns SPARC systems GNU C++ Compiler JAVA compiler JAVA applet viewer Java integrated development environment on Linux Run the Oracle SQL interpreter Run the Oracle SQL data loader Run the mysql SQL interpreter
Misc Commands:
These commands list or alter information about the system: Command chfn Description Change your finger information
chgrp chown date determin du echo exit finger groupadd groups homequota iostat kill last logout lun netstat passwd passwd printenv ps ps quota -v reset script script setenv stty time
Change the group ownership of a file Change owner Print the date Automatically find terminal type Print amount of disk usage Echo arguments to the standard options Quit the system Print information about logged-in users Create a user group Show group memberships Show quota and file usage Report I/O statistics Send a signal to a process Show last logins of users log off UNIX List user names or login ID Show network status Change user password Change your login password Display value of a shell variable Display the status of current processes Print process status statistics Display disk usage and limits Reset terminal mode Keep script of terminal session Save the output of a command or process Set environment variables Set terminal options Time a command
top tset tty umask uname uptime useradd users vmstat w who
Display all system processes Set terminal mode Print current terminal name Show the permissions that are given to view files by default Display name of the current system Get the system up time Create a user account Print names of logged in users Report virtual memory statistics Show what logged in users are doing List logged in users
Copyright tutorialspoint.com