Unix Notes for Tutorialv4.Doc Page 1 JFW Unix Notes for Tutorial Inclusion – from OS-X Unix Tutorial V4.Doc from P 10 Which Ls

Total Page:16

File Type:pdf, Size:1020Kb

Unix Notes for Tutorialv4.Doc Page 1 JFW Unix Notes for Tutorial Inclusion – from OS-X Unix Tutorial V4.Doc from P 10 Which Ls Unix Notes for Tutorial Inclusion – From OS-X Unix Tutorial v4.doc From p 10 which ls reports where the ls command is found ls -lt long list sorted by time modified ls –h sometimes give help on a command like ls ls .. directory listing of next higher directory touch .hidden creates a hidden file name .hidden if it does not exist, modifies the date if it does exist ls ../.. directory listing of two levels up man tcsh > <file> put man entry for tcsh command into file <file> mv –i <file1…> <file2> rename file1 to file2; if it would overwrite, ask first; if -f then don't ask, just overwrite if needed. rm –i <file1> <file2> delete file1 and file2; ask first to verify; -d to del empty dir as well as files; -f attempts to override permissions, but gives no errors -r delete dir and everything in it, implies -f; -P delete & scrub 3 x echo rm -r * display command as it would actually be executed for each file matched, but no deletions sudo rm -r /Users/Jim\ Deleted danger: admin allowed delete of all of Users/"Jim Delete" mv <file> ~/.Trash/ move file to the desktop trash bin, rather that direct delete From p 19 alias trash mv \:\* ~/.Trash/ creates new command which translates to mv <parameters> ~/.Trash history display the command history file less ~/.tcsh_history look at history in less format !59 recall command #59 from history to command line p20,26 notes on creating new defaults for command via alias p22 pushd <dir> push the <dir> onto the directory stack popd pop the top directory entry on the stack to the command line pushd ~ push to home directory onto the stack dirs –v print the directory stack, one directory per line pushd –v popd –v pushdsilent no stack printed on a pushd or popd man tcsh you can search this for info on pushd and popd mkdir –p <dir> create directory with all nec intermediate directories mkdir –p a/b/c/d create directory d with any of a, b, c if needed ls –R list directory of current working directory recursively example:**** mkdir –p one/too/for/three create a nest of directories mv one/too one/two correct spelling error; too->two mv one/two/for/three one/two ?? mv one/two/for one/two/three/four move dir for from under two to under three and simultaineously correct spelling Unix Notes for Tutorialv4.doc Page 1 JFW ls –R one check current nest ******* p24 mkdir –p a/b/c/d create a nest of dirs rmdir –p a/b/c/d if empty remove the nest of dirs ls –ld <dir> lists not contents of dir but details of dir note: on a mv a trailing slash means treat as if a dir, e.g. mv path1/two path2/ p26 ls b[aeiou]g list dir for dirs bag, beg, big, bog, bug rm .txt does ls [mt]*day[0-9] matches m or t followed by day followed by a digit cp –R <dir> <dir2> copies dir and nested dirs (and files) below to dir2 rm –ri <dir2> deletes the files in dir2 and the subdirectorys but asks for confirmation first rm –r * deletes everything in currect directory; if entered at top level (root) deletes everything without asking for confirmation note: danger*** cp does not copy resource forks; use command ditto rm –rf danger: removes recursively without warning, even if not normally allowed to delete p28 du ~ report size of every dir from home down; units at blocks – 512 bytes = 1/2 k; so divide by 2 to get in units of k du –sk ~ print a single line of total size of directory in units of k df –k show how full each disk and partition is in units of k ls –aF display each file with a trailing character to indicate file type ls –Fsk display each file with file type and file size in units of k file <file> determine file type last reports who loged in since last cleanup, when and what p30 user ; primary group= staff, admin, wheel, shadowy users = daemon, nobody, unknown, www, root spare user—with admin access good idea p31 permissions as three triplets read (r) write (w) execute (x) owner group other r w x r w x r w x Applications/ directory , only admin user can add items, others can read and execute only rwxrwxr-x /System/Library/ only root owner can modify this; others and even those in admin group can only read and execute. rwxr-xr-x ls –l <dir> lists contents of dir with permissions ls –ld <dir> examines the enclosing directory, i.e. the directory itself chmod <who> =<prot> <file> Unix Notes for Tutorialv4.doc Page 2 JFW who can be owner (u), group (g), other (o) prot can be either a set of prots to be enabled or +<prots> to add or -<prots> to disable chmod u=rwx <file> set read, write and execute for owner chmod g=rx <file) set read and execute for group chmod o = r <file> set only read for others chmod u=rwx, g=rx,o=r <file> set all three as stated chmod o-r <file> disable the read on other chmod g+w <file> add write to group chown <user>:<group> <file> chown :admin <file> new group is admin chown weiher:staff <file> new user owner is weiher, new group owner is admin; needs sudo and admin PW p34 /Users/Shared everyone can write to it but only as an append. Note this has the sticky bit (t) set drwxrwxrwt . Others can add to the directory (w) but not remove any files. ~/Public/ others can read but not write ~/Public/Drop\ Box/ others can write and execute, but not read note Finder shows root as System, sounds more Mac-like ~<another user>/ shortcut of home of another user nidump passwd / shows all users nidump group / shows all groups note: in single user mode, these are held as flat files in /etc/passwd and /etc/groups as in many other UNIX systems passwd to change your password id gives your UID, user name, primary GID, group name and list of all groups to which you belong. P38 Shells- The shell is your interface to the UNIX OS; it listens for input, launches other programs as found in the command line, displays output of those programs. Displays a prompt, keeps a command history, allows auto completion, includes framework to enable piping and a scripting language. The Terminal is an Aqua program that runs the shell for you. It adds the cut and paste, drag and drop complete path-filenames, etc for ease of use The Bourne shell (sh) is in every UNIX system, good scripting system, poor interactives csh was an improvement on sh but scriping is different tcsh was a further improvement incorporating many OS-features that DEC developed in their PDP-6, 10, Tops-10 etc systems. Good interactives but different scripting than sh (is default for OSX10.1 and 10.2 bash incorporated many improvements of previous systems, retaining excellent interactive behavior but with a scripting system upward compatible with sh (bourne again shell) is default for OSX10.3 Unix Notes for Tutorialv4.doc Page 3 JFW p40 head *.txt display first 10 or so lines the each file with extension .txt head –25 /var/log/system.log display first 25 lines of system log tail /var/log/system.log display last 10 or so lines of system log tail –f /var/log/system.log display last 10 or so lines of system log but leave it open and display any additions to the file (a command line equivalent of the aqua console program.) ctrl-c to end P41 locate <pattern> using the locate database find all files matching the given pattern. This database is updated weekly if your computer is on all the time. If it is not you need to run the update yourself from the command line (see chrontab) or use a shareware program, Cocktail. Normally the pattern is in quotes. Legal wild cards are *, ?, [] but the pattern must be in quotes and have an asterisk in front. If unquoted and no * before or after the given string it is sent to locate with an asterisk at the start and and the end locate “bio” If an explicit string is given any match anywhere is found locate “Bio.*”If a wild card is included, then the exact absolute path only is searched, so if nothing at top level it will not be found. locate bio is the same as locate “*bio*” or “bio” locate bio.* because not quoted and one (so it is not “*bio*”, the * is expanded by the shell to get the name in the current directory that match a ls of bio.*. If that is more than one the list is sent to locate which fails because locate can take only one argument. If there is only one such entry however, it is sent to locate, and locate finds that item. Note: to see the glob expansion of the shell before executing a command before entering the return, enter ctl-X followed by *. The expanded version will replace the glob pattern locate "Bi[Go]" will not find anything because it includes wildcards and not * at front. locate "*Bi[Go]" will find anything ending in BiG or Bio anywhere locate "*Bi[Go]*" will find any file anywhere containing BiG or Bio locate "MLP*" will not find anything because no * at front locate "*MLP?P" will locate any file ending in MLP(any char)P P42 find [options] <start-dir> [pattern] [action] runs a live search of the file system, from the start- dir down.
Recommended publications
  • UNIX Cheat Sheet – Sarah Medland Help on Any Unix Command List a Directory Change to Directory Make a New Directory Remove A
    THE 2013 INTERNATIONAL WORKSHOP ON STATISTICAL METHODOLOGY FOR HUMAN GENOMIC STUDIES UNIX cheat sheet – Sarah Medland Help on any Unix command man {command} Type man ls to read the manual for the ls command. which {command} Find out where a program is installed whatis {command} Give short description of command. List a directory ls {path} ls -l {path} Long listing, with date, size and permisions. ls -R {path} Recursive listing, with all subdirs. Change to directory cd {dirname} There must be a space between. cd ~ Go back to home directory, useful if you're lost. cd .. Go back one directory. Make a new directory mkdir {dirname} Remove a directory/file rmdir {dirname} Only works if {dirname} is empty. rm {filespec} ? and * wildcards work like DOS should. "?" is any character; "*" is any string of characters. Print working directory pwd Show where you are as full path. Copy a file or directory cp {file1} {file2} cp -r {dir1} {dir2} Recursive, copy directory and all subdirs. cat {newfile} >> {oldfile} Append newfile to end of oldfile. Move (or rename) a file mv {oldfile} {newfile} Moving a file and renaming it are the same thing. View a text file more {filename} View file one screen at a time. less {filename} Like more , with extra features. cat {filename} View file, but it scrolls. page {filename} Very handy with ncftp . nano {filename} Use text editor. head {filename} show first 10 lines tail {filename} show last 10 lines Compare two files diff {file1} {file2} Show the differences. sdiff {file1} {file2} Show files side by side. Other text commands grep '{pattern}' {file} Find regular expression in file.
    [Show full text]
  • Introduction to Linux – Part 1
    Introduction to Linux – Part 1 Brett Milash and Wim Cardoen Center for High Performance Computing May 22, 2018 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system … kp001 kp002 …. kpxxx FastX ● https://www.chpc.utah.edu/documentation/software/fastx2.php ● Remote graphical sessions in much more efficient and effective way than simple X forwarding ● Persistence - can be disconnected from without closing the session, allowing users to resume their sessions from other devices. ● Licensed by CHPC ● Desktop clients exist for windows, mac, and linux ● Web based client option ● Server installed on all CHPC interactive nodes and the frisco nodes. Windows – alternatives to FastX ● Need ssh client - PuTTY ● http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html - XShell ● http://www.netsarang.com/download/down_xsh.html ● For X applications also need X-forwarding tool - Xming (use Mesa version as needed for some apps) ● http://www.straightrunning.com/XmingNotes/ - Make sure X forwarding enabled in your ssh client Linux or Mac Desktop ● Just need to open up a terminal or console ● When running applications with graphical interfaces, use ssh –Y or ssh –X Getting Started - Login ● Download and install FastX if you like (required on windows unless you already have PuTTY or Xshell installed) ● If you have a CHPC account: - ssh [email protected] ● If not get a username and password: - ssh [email protected] Shell Basics q A Shell is a program that is the interface between you and the operating system
    [Show full text]
  • 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]
  • How to Find out the IP Address of an Omron
    Communications Middleware/Network Browser How to find an Omron Controller’s IP address Valin Corporation | www.valin.com Overview • Many Omron PLC’s have Ethernet ports or Ethernet port options • The IP address for a PLC is usually changed by the programmer • Most customers do not mark the controller with IP address (label etc.) • Very difficult to communicate to the PLC over Ethernet if the IP address is unknown. Valin Corporation | www.valin.com Simple Ethernet Network Basics IP address is up to 12 digits (4 octets) Ex:192.168.1.1 For MOST PLC programming applications, the first 3 octets are the network address and the last is the node address. In above example 192.168.1 is network address, 1 is node address. For devices to communicate on a simple network: • Every device IP Network address must be the same. • Every device node number must be different. Device Laptop EX: Omron PLC 192.168.1.1 192.168.1.1 Device Laptop EX: Omron PLC 127.27.250.5 192.168.1.1 Device Laptop EX: Omron PLC 192.168.1.3 192.168.1.1 Valin Corporation | www.valin.com Omron Default IP Address • Most Omron Ethernet devices use one of the following IP addresses by default. Omron PLC 192.168.250.1 OR 192.168.1.1 Valin Corporation | www.valin.com PING Command • PING is a way to check if the device is connected (both virtually and physically) to the network. • Windows Command Prompt command. • PC must use the same network number as device (See previous) • Example: “ping 172.21.90.5” will test to see if a device with that IP address is connected to the PC.
    [Show full text]
  • Many Slides Borrowed from Ben Zhao, Christo Wilson, & Others
    12. Network Attacks Blase Ur and David Cash (many slides borrowed from Ben Zhao, Christo Wilson, & others) February 7th, 2020 CMSC 23200 / 33250 Network threat model • Network scanning • Attacks on confidentiality (e.g., eavesdropping) • Attacks on integrity (e.g., spoofing, packet injection) • Attacks on availability (e.g., denial of service (DoS)) Scanning and observing networks Network Scanning: Ping • Essential, low-level network utility • Sends a “ping” ICMP message to a host on the internet $ ping 66.66.0.255 PING 66.66.0.255 (66.66.0.255) 56(84) bytes of data. 64 bytes from 66.66.0.255: icmp_seq=1 ttl=58 time=41.2 ms • Destination host is supposed to respond with a “pong” – Indicating that it can receive packets • By default, ping messages are 56 bytes long (+ some header bytes) – Maximum size 65535 bytes • What if you send a ping that is >65535 bytes long? Ping of Death • $ ping –s 65535 66.66.0.255 – Attack identified in 1997 – IPv6 version identified/fixed in 2013 Network Scanning: Traceroute • traceroute — hops between me and host – Sends repeated ICMP reqs w/ increasing TTL Port Scanning • What services are running on a server? Nmap • 5 seconds to scan a single machine!! SYN scan Only send SYN Responses: • SYN-ACK — port open • RST — port closed • Nothing — filtered (e.g., firewall) Port Scanning on Steroids • How do you speed up scans for all IPv4? – Don’t wait for responses; pipeline – Parallelize: divide & conquer IPv4 ranges – Randomize permutations w/o collisions • Result: the zmap tool – Scan all of IPv4 in 45mins (w/ GigE cxn) – IPv4 in 5 mins w/ 10GigE Eavesdropping Tools: Wireshark, tcpdump, Bro, … Steps: 1.
    [Show full text]
  • Disk Clone Industrial
    Disk Clone Industrial USER MANUAL Ver. 1.0.0 Updated: 9 June 2020 | Contents | ii Contents Legal Statement............................................................................... 4 Introduction......................................................................................4 Cloning Data.................................................................................................................................... 4 Erasing Confidential Data..................................................................................................................5 Disk Clone Overview.......................................................................6 System Requirements....................................................................................................................... 7 Software Licensing........................................................................................................................... 7 Software Updates............................................................................................................................. 8 Getting Started.................................................................................9 Disk Clone Installation and Distribution.......................................................................................... 12 Launching and initial Configuration..................................................................................................12 Navigating Disk Clone.....................................................................................................................14
    [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]
  • Unix Command Line; Editors
    Unix command line; editors Karl Broman Biostatistics & Medical Informatics, UW–Madison kbroman.org github.com/kbroman @kwbroman Course web: kbroman.org/AdvData My goal in this lecture is to convince you that (a) command-line-based tools are the things to focus on, (b) you need to choose a powerful, universal text editor (you’ll use it a lot), (c) you want to be comfortable and skilled with each. For your work to be reproducible, it needs to be code-based; don’t touch that mouse! Windows vs. Mac OSX vs. Linux Remote vs. Not 2 The Windows operating system is not very programmer-friendly. Mac OSX isn’t either, but under the hood, it’s just unix. Don’t touch the mouse! Open a terminal window and start typing. I do most of my work directly on my desktop or laptop. You might prefer to work remotely on a server, instead. But I can’t stand having any lag in looking at graphics. If you use Windows... Consider Git Bash (or Cygwin) or turn on the Windows subsystem for linux 3 Cygwin is an effort to get Unix command-line tools in Windows. Git Bash combines git (for version control) and bash (the unix shell); it’s simpler to deal with than Cygwin. Linux is now accessible in Windows 10, but you have to enable it. If you use a Mac... Consider Homebrew and iTerm2 Also the XCode command line tools 4 Homebrew is a packaging system; iTerm2 is a Terminal replacement. The XCode command line tools are a must for most unixy things on a Mac.
    [Show full text]
  • GNU Grep: Print Lines That Match Patterns Version 3.7, 8 August 2021
    GNU Grep: Print lines that match patterns version 3.7, 8 August 2021 Alain Magloire et al. This manual is for grep, a pattern matching engine. Copyright c 1999{2002, 2005, 2008{2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Introduction ::::::::::::::::::::::::::::::::::::: 1 2 Invoking grep :::::::::::::::::::::::::::::::::::: 2 2.1 Command-line Options ::::::::::::::::::::::::::::::::::::::::: 2 2.1.1 Generic Program Information :::::::::::::::::::::::::::::: 2 2.1.2 Matching Control :::::::::::::::::::::::::::::::::::::::::: 2 2.1.3 General Output Control ::::::::::::::::::::::::::::::::::: 3 2.1.4 Output Line Prefix Control :::::::::::::::::::::::::::::::: 5 2.1.5 Context Line Control :::::::::::::::::::::::::::::::::::::: 6 2.1.6 File and Directory Selection:::::::::::::::::::::::::::::::: 7 2.1.7 Other Options ::::::::::::::::::::::::::::::::::::::::::::: 9 2.2 Environment Variables:::::::::::::::::::::::::::::::::::::::::: 9 2.3 Exit Status :::::::::::::::::::::::::::::::::::::::::::::::::::: 12 2.4 grep Programs :::::::::::::::::::::::::::::::::::::::::::::::: 13 3 Regular Expressions ::::::::::::::::::::::::::: 14 3.1 Fundamental Structure ::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • “Linux at the Command Line” Don Johnson of BU IS&T  We’Ll Start with a Sign in Sheet
    “Linux at the Command Line” Don Johnson of BU IS&T We’ll start with a sign in sheet. We’ll end with a class evaluation. We’ll cover as much as we can in the time allowed; if we don’t cover everything, you’ll pick it up as you continue working with Linux. This is a hands-on, lab class; ask questions at any time. Commands for you to type are in BOLD The Most Common O/S Used By BU Researchers When Working on a Server or Computer Cluster Linux is a Unix clone begun in 1991 and written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. 64% of the world’s servers run some variant of Unix or Linux. The Android phone and the Kindle run Linux. a set of small Linux is an O/S core programs written by written by Linus Richard Stallman and Torvalds and others others. They are the AND GNU utilities. http://www.gnu.org/ Network: ssh, scp Shells: BASH, TCSH, clear, history, chsh, echo, set, setenv, xargs System Information: w, whoami, man, info, which, free, echo, date, cal, df, free Command Information: man, info Symbols: |, >, >>, <, ;, ~, ., .. Filters: grep, egrep, more, less, head, tail Hotkeys: <ctrl><c>, <ctrl><d> File System: ls, mkdir, cd, pwd, mv, touch, file, find, diff, cmp, du, chmod, find File Editors: gedit, nedit You need a “xterm” emulation – software that emulates an “X” terminal and that connects using the “SSH” Secure Shell protocol. ◦ Windows Use StarNet “X-Win32:” http://www.bu.edu/tech/support/desktop/ distribution/xwindows/xwin32/ ◦ Mac OS X “Terminal” is already installed Why? Darwin, the system on which Apple's Mac OS X is built, is a derivative of 4.4BSD-Lite2 and FreeBSD.
    [Show full text]
  • Dell EMC Powerstore CLI Guide
    Dell EMC PowerStore CLI Guide May 2020 Rev. A01 Notes, cautions, and warnings NOTE: A NOTE indicates important information that helps you make better use of your product. CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2020 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners. Contents Additional Resources.......................................................................................................................4 Chapter 1: Introduction................................................................................................................... 5 Overview.................................................................................................................................................................................5 Use PowerStore CLI in scripts.......................................................................................................................................5 Set up the PowerStore CLI client........................................................................................................................................5 Install the PowerStore CLI client..................................................................................................................................
    [Show full text]
  • Unix/Linux Command Reference
    Unix/Linux Command Reference .com File Commands System Info ls – directory listing date – show the current date and time ls -al – formatted listing with hidden files cal – show this month's calendar cd dir - change directory to dir uptime – show current uptime cd – change to home w – display who is online pwd – show current directory whoami – who you are logged in as mkdir dir – create a directory dir finger user – display information about user rm file – delete file uname -a – show kernel information rm -r dir – delete directory dir cat /proc/cpuinfo – cpu information rm -f file – force remove file cat /proc/meminfo – memory information rm -rf dir – force remove directory dir * man command – show the manual for command cp file1 file2 – copy file1 to file2 df – show disk usage cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it du – show directory space usage doesn't exist free – show memory and swap usage mv file1 file2 – rename or move file1 to file2 whereis app – show possible locations of app if file2 is an existing directory, moves file1 into which app – show which app will be run by default directory file2 ln -s file link – create symbolic link link to file Compression touch file – create or update file tar cf file.tar files – create a tar named cat > file – places standard input into file file.tar containing files more file – output the contents of file tar xf file.tar – extract the files from file.tar head file – output the first 10 lines of file tar czf file.tar.gz files – create a tar with tail file – output the last 10 lines
    [Show full text]