du
command is verbose and confusing if you run it without options. Here is how to get a human-readable output and a grand total for the path argument (omit for current directory).
du -hc
tr "\r" "\n" < input.tab >.converted.tab
paste -s -d'#######\n' commands | sed "s/#/ \&\& /g" > commands8
.bashrc
, .zshrc
, or similar shell startup script:
export PS1='\w\$ '
cat yourfile.txt
cd put/target/directory/here
fgrep "words" yourfile.txt
find word*
kill process
killall
to end multiple processes that match the name that is input.
ls
-a
to include invisible files. Add -l
to show more information about each file such as its owner and permission flags.
mkdir directoryname
nl yourfile.txt
ps
pwd
rm yourfile.txt
rmdir yourdirectory
source yourfile
which yourprogram
$PATH
). Adding an -a
after which prints all instances of the program.
python3
via at the command line, your shell searches all file directories listed in your $PATH
in order to execute that command. Errors such as "command not found" when you try to run a program mean you need to add the directory containing that program to your PATH. To show the current directories that are in your
$PATH
use this:
echo $PATH</code>
$PATH
you can run this command
PATH=/your/directory/here:$PATH</code>
$PATH
part of this. If you leave them off then your shell will not know where to look for built-in commands like ls
, cd
, etc.!
Generally, you want to add the given directory to the end or the beginning of your PATH variable list, since when you invoke a command, the directories will be searched from beginning to end and the first match will be the one that is run. Because this can lead to confusion, there is even a command you can use that gives you the path to the executable that will be run if you type a command:
which <command>
Barrick Lab > ComputationList > ProtocolsUnixCommandsQuickReference