interaction[maq]:/home/projects/MicrobialGenomicsGroup>This is useful because it tells you who you are and where you are. It can be configured in different ways but the example above shows the machine, the username in square brackets '[ ]' and the current directory after the colon ':'.
printenv SHELLThis command prints the executable for the current shell. Unix offers a selection of many shells all of which are subtly different
printenv HOMEThis command prints the location of the users home directory
printenv PATHThe PATH variable is particularly important. It consists of a list of directories which are searched when a command it typed. It is often useful to edit the PATH variable to add directories where executables are stored.
/usr/bin/perl
./script.pl
~/script.pl
cd /usr/bin
mkdir newdir
rmdir newdir
touch filename
cp original_file new_file
cp file directory/
cp -r directory new_directory
mv original_file new_file
mv file directory/
mv dir1 dir2
rm file
rm -r dir
cat file1 file2
more filename
less filename
head filename
head -5 filename
tail filename
tail -5 filename
grep searchword file1 file2
grep -v searchterm file1 file2
grep -c searchterm file1 file2
wc -w file.txt
wc -l file.txt
perl myscript.pl
/usr/bin/perl myscript.pl
ls -l > list.txt
echo 'hello' >> list.txt
sort < filewithdata.txt
sort < input.txt > output.txt
-rw-r----- 1 user1 cdrom 11802 Jul 9 10:02 file.txt