8
votes
1answer
1k views

Can rm recursively remove empty directories?

In an old version of Unix, the rm command would delete directories if they were empty. From the Research Unix Eighth Edition man page for rm: "If an entry is a directory it is removed only if empty." ...
3
votes
3answers
384 views

How to create a short path?

We have so many useful folders, which are in different path, for our working in Linux. For example : $ cd ~/Documents/Courses/EDX/physics2013/ $ cd ~/Documents/Company/OpenGL/Proj/... $ cd ...
3
votes
2answers
154 views

Preventing accidental directory deletion. Making an alias that contains options?

I use an alias to prevent me from accidentally deleting files, and I would like to do something similar for directories. For files, I have the following added to my .bashrc: alias rm="rm -i" I ...
5
votes
3answers
1k views

How to set an alias on a per-directory basis?

Suppose you have an alias go, but want it to do different things in different directories? In one directory it should run cmd1, but in another directory it should run cmd2 By the way, I have an ...
3
votes
1answer
898 views

creating abbreviations for commonly used paths

I am new to linux and was wondering whether it is possible to create abbreviations that can be used in terminal. I know about alias command, but am not sure whether that can be used for what I am ...