UNIX Command-Line Cheat Sheet, Study notes of Bioinformatics

concatenates all fasta files in the current directory head file prints first lines from a file head -n 5 file prints first five lines from a file tail file.

Typology: Study notes

2021/2022
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 09/07/2022

zaafir_ij
zaafir_ij šŸ‡¦šŸ‡Ŗ

4.4

(61)

884 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Text handling commands
Text handling commands
command > file
saves STDOUT in a file
command >> file
appends STDOUT in a file
cat file
concatenate and print files
cat file1 file2 > file3
merges files 1 and 2 into file3
cat *fasta > all.fasta
concatenates all fasta files in
the current directory
head file
prints first lines from a file
head -n 5 file
prints first five lines from a file
tail file
prints last lines from a file
tail -n 5 file
prints last five lines from a file
less file
view a file
less -N file
includes line numbers
less -S file
wraps long lines
grep ā€˜pattern’ file
Prints lines matching a pattern
grep -c ā€˜pattern’ file
counts lines matching a pattern
cut -f 1,3 file
retrieves data from selected
columns in a tab-delimited file
sort file
sorts lines from a file
sort -u file
sorts and return unique lines
uniq -c file
filters adjacent repeated lines
wc file
counts lines, words and bytes
paste file1 file2
concatenates the lines of input
files
paste -d ā€œ,ā€
concatenates the lines of input
files by commas
sed
transforms text
File system Commands
File system Commands
ls
lists directories and files
ls -a
lists all files including hidden files
ls -lh
formatted list including more data
ls -t
lists sorted by date
pwd
returns path to working directory
cd dir
changes directory
cd ..
goes to parent directory
cd /
goes to root directory
cd
goes to home directory
touch file_name
creates en empty file
cp file file_copy
copy a file
cp -r
copy files contained in directories
rm file
deletes a file
rm -r dir
deletes a directory and its files
mv file1 file2
moves or renames a file
mkdir dir_name
creates a directory
rmdir dir_name
deletes a directory
locate file_name
searches a file
man command
shows commands manual
top
shows process activity
df -h
shows disk space info
apt-get install
installs applications in linux
Networking Commands
wget URL
download a file from an URL
ssh user@server
connects to a server
scp
copy files between computers
Compression commands
Compression commands
gzip/zip
compress a file
gunzip/unzip
decompress a file
tar -cvf
groups files
tar -xvf
ungroups files
tar -zcvf
groups and gzip files
tar -zxvf
gunzip and ungroups files
UNIX Command-Line Cheat Sheet
BTI-SGN Bioinformatics Course 2014
Discount

On special offer

Partial preview of the text

Download UNIX Command-Line Cheat Sheet and more Study notes Bioinformatics in PDF only on Docsity!

Text handling commandsText handling commands command > file saves STDOUT in a file command >> file appends STDOUT in a file cat file concatenate and print files cat file1 file2 > file3 merges files 1 and 2 into file cat *fasta > all.fasta concatenates all fasta files in the current directory head file prints first lines from a file head -n 5 file prints first five lines from a file tail file prints last lines from a file tail -n 5 file prints last five lines from a file less file view a file less -N file includes line numbers less -S file wraps long lines grep ā€˜ pattern’ file Prints lines matching a pattern grep -c ā€˜ pattern’ file counts lines matching a pattern cut -f 1,3 file retrieves data from selected columns in a tab-delimited file sort file sorts lines from a file sort -u file sorts and return unique lines uniq -c file filters adjacent repeated lines wc file counts lines, words and bytes paste file1 file concatenates the lines of input files paste -d ā€œ,ā€ concatenates the lines of input files by commas sed transforms text File system CommandsFile system Commands ls lists directories and files ls -a lists all files including hidden files ls -lh formatted list including more data ls -t lists sorted by date pwd returns path to working directory cd dir changes directory cd .. goes to parent directory cd / goes to root directory cd goes to home directory touch file_name creates en empty file cp file file_copy copy a file cp -r copy files contained in directories rm file deletes a file rm -r dir deletes a directory and its files mv file1 file2 moves or renames a file mkdir dir_name creates a directory rmdir dir_name deletes a directory locate file_name searches a file man command shows commands manual top shows process activity df -h shows disk space info apt-get install installs applications in linux Networking CommandsNetworking Commands wget URL download a file from an URL ssh user @ server connects to a server scp copy files between computers Compression commandsCompression commands gzip/zip compress a file gunzip/unzip decompress a file tar -cvf groups files tar -xvf ungroups files tar -zcvf groups and gzip files tar -zxvf gunzip and ungroups files

UNIX Command-Line Cheat Sheet

BTI-SGN Bioinformatics Course 2014