I was using bash, and playing around I found the “…” command (literally an ellipsis) and I was wondering what it did. I tried searching man pages, and Google wasn’t very helpful (I guess there’s not much documentation on it). I tried running it and found that it changed the directory but it didn’t just go one up.
Anyone know what it is?
“…” → goes one directory up, eg /usr/share/doc/packages → /usr/share/doc
“…” → goes two directories up, eg /usr/share/doc/packages → /usr/share
It’s not a standard bash feature but something read in from the openSUSE alias files. If you do alias … you will see:
alias …=‘cd …/…’
Correct, forgot to add that :S
Someone badly needs to make a ‘google programmer’, in which sequences of characters are properly dealt with. Try googling “bash $*”.
function cds() {
cd $1
ls
}
On a slightly related note, I find this useful in my .bashrc. I couldn’t quite bring myself to call it lsd instead. lol!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
openSuSE have many alias, try the command alias
VampirD
No in elenath hîlar nan hâd gîn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAksUTRoACgkQJQ+0ABWtaVlakQCggu7tIpmlGfa/zPoaaIH0nXPT
nn4AoMp6Me65ZhbKpLThkvnPZOYtI8dR
=HIBz
-----END PGP SIGNATURE-----
Hi,
You can also add whatever aliases you find helpful:
alias *aliasname*='*commands to execute*'
eg:
alias quit='exit'
You can, of course, make the commands as complicated as you like with pipes or several commands separated with semicolons.
If you want to make it permanent just add the line to your ‘bashrc’ file.
Regards,
Barry.
Some of those SUSE aliases go back a long way. For example dir=‘ls -l’ and md=‘mkdir -p’ I remember were put there in the S.u.S.E days to make DOS users feel welcome.
When I first installed openSUSE I remember noticing the ability to use DOS commands; I was used to DOS from my Windows days, so I typed them automatically.
I think it was helpful when I first used Linux.
Now that I’m used to the Linux commands, I don’t type the DOS commands anymore; however, when I use a Windows machine, I sometimes find myself typing Linux/UNIX commands.
Regards,
Barry.
I think what DOS needs to do is incorporate Linux commands because whenever I’m at school in Programming class I want to type ls instead of dir. I also like hitting Ctrl+D instead of typing exit to exit a command prompt or bash session.
There used to be a third party command shell called 4dos which was more Unixy. Now that pure DOS machines are nearly all in museums I have no idea if it will work under Windows whatever. I see it has been released as freeware, but apparently it’s not allowed to compile it for anything but freedos:
camper365 wrote:
> whenever I’m at school in Programming class I want to type ls instead of
> dir.
what you need is “Hamilton C shell” which adds standard *nix commands
to Redmond software…
more? see: http://www.hamiltonlabs.com/cshell.htm
–
palladium
disclosure: i’m not financially associated with that programmer and
i’ve never tried the software (have no game system to try it on)
Hah! So do I!
I’ve actually created batch files for “ls” and “mv” on some of the Windows machines at work. I got tired of, “command not found!”
Now if only the school system would let me install some of those programs. Then again, these are the sysops who refused to upgrade the Java compiler until the College Board threatened to take away the school’s entire certification to teach AP classes. The compiler was free.