I wanted to make a simple C
program to change to my project directory. Its content is following:
#include <unistd.h>
int main(){
chdir("/home/enedil/projects/algo");
return 0;
}
I compiled it with following commnd (pro.c
is its file name):
gcc pro.c -o /usr/local/bin/pro
There were no errors nor warnings. But when I run it, it does not change directory. Why?
alias proj='cd ~/enedil/projects/algo'
– Michael Durrant 2 days agocd ~/projects/algo
? It is an idea! – enedil 2 days ago