• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Unix command questions

SoundTheSurrender

Diamond Member
How would I go about making a alias that would deal with two commands?

For example, every time I use the rm command, I need to have a file deletion confirmation work after it.

So when I delete something, it confirms it.

another question is when I do

ls -l udir it doesn't display the permissions of that folder. all it does is

idnumber@lx:~$ ls -l udir
total 12
-rw-r--r-- 1 idnumber student 21 2007-09-23 18:03 file
-rw-r--r-- 1 idnumber student 21 2007-09-23 18:03 file1
-rw-r--r-- 1 idnumber student 21 2007-09-23 18:03 file2


thanks
 
If your box is using the GNU tools then 'rm -i' will prompt you before all deletions unless you use -f to force it.
'ls -d' will tell ls that you want the directory itself and not it's contents.

Get comfortable with reading man pages, it'll save you a lot of time.
 
Creating aliases is a little bit different depending on the shell you're using. But basically, try 'man alias'. You can say: alias rm='rm -i'
 
Back
Top