The error message is telling you that you are trying to execute a file which does not exist.
We can vaguely guess about what files do exist, but without access to your system, we can't know for sure what you have actually installed and where.
Perhaps you have a file named tcframe
in a directory called scripts
in your home directory?
alias tcframe=$HOME/scripts/tcframe
A common arrangement to avoid littering your environment with one or more aliases for each random utility you have installed somewhere is to create a dedicated directory for your PATH
- a common convention is to call it bin
- and populate it with symlinks to things you want to have executable.
Just once,
mkdir $HOME/bin
and edit your .profile
(or .bash_profile
or .bashrc
if you prefer) to include the line
PATH=$HOME/bin:$PATH
From now on, to make an executable script accessible from anywhere without an explicit path, create a symlink to it in bin
;
ln -s $HOME/scripts/tcframe $HOME/bin
Notice that the syntax is like cp
; the last argument is the destination (which can be a directory, or a new file name) and the first (and any subsequent arguments before the last, if the last is a directory) are the sources. When the destination is a directory, the file name of each source argument is used as the name of a new symlink within the destination directory.
Also notice that you generally want to use absolute paths; a relative path is resolved relative to bin
(so e.g.
ln -s ../scripts/tcframe $HOME/bin
even if you are currently in a directory where ../scripts
does not exist.)
Scripts, by definition, need to be executable. If they aren't, you get "permission denied" when you try to run them. This is controlled by permissions; each file has a set of permission bits which indicate whether you can read, write to (or overwrite), and execute this file. These permissions are also set separately for members of your group (so you can manage a crude form of team access) and everyone else. But for your personal scripts, you only really care that the x
(executable) bit is set for yourself. If it isn't, you can change it - this is only required once.
chmod +x scripts/tcframe