Ubuntu :: Bashrc Ls Alias Not Working Same As Command Line

Oct 25, 2010

I have a few alias' in my .bashrc to save some typing, mostly ls type variants.

I wanted to add the following:
- give me a Long listing of ALL in Reverse Time order, (don't recurse directory)

Code:

But it doesn't work anything like the way it does on the command line

When I use the alias I get the following:

Code:

No Time, No Permissions, no group/owner ... , Why?

View 2 Replies


ADVERTISEMENT

General :: Function In Bashrc Is Not Recognized On Command Line?

Feb 28, 2010

I have added mkalias in my .bashrc file as I learnt here

[Code]...

View 1 Replies View Related

Red Hat / Fedora :: Adding Alias To .bashrc?

Feb 9, 2011

I have a script that I run using ./dom example.com.

I want to add an alias to .bashrc so that I can run it using "d example.com".

I have tried adding each of the lines below in turn but I still receive the error:
-bash: d: command not found

alias d="/bin/bash /home/user/dom"
alias d="./home/user/dom"
alias d="sh /home/user/dom"

View 3 Replies View Related

General :: Escape Commands In A Bashrc Alias?

Sep 17, 2010

I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:

touch `date "+%Y-%m-%d_%H-%M"`.txt

However, I'd like to define an alias for this. When I try adding to the bashrc this:

alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"

the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...

How can I get the command to expand only when I call the alias? Or must I use a function for this?

View 1 Replies View Related

General :: .bashrc Ubuntu Eee Easy Peasy The Specifics Of An Alias?

Oct 21, 2010

I successfully edited the .bashrc file to get ruby version manager (rvm) working. Now I would like to turn that setting into an alias so that if i type the word 'ruby' into the terminal it not only goes to the rvm settup but also defaults to my webdev folder which is in my user home directory and also exicutes a command that will open up gedit ready to be used as the text editor for editing the .rb files. Can this be done i would settle for some added code for the 'if then' statement: so far it looks like this:

[Code]...

I don't want to mess with the default setup on this system too much and think things could get out of hand if i am not careful. So am cautious about doing anything at this stage. I wonder if it is possibel thought to setup that whole 'if then' statement as an 'alias'. I read a few referances to alias and looked in the manual like any good newby should but am needing your help please. getting out of the MSwindows mind set and into the linux logic is not so easy but is a great experience

View 13 Replies View Related

Fedora Security :: Sudo NOPASSWD To BashRC Alias?

Aug 25, 2011

I've set up an alias in .bashrc (let's call it alias1), and am trying to set up a sudo NOPASSWD rule for that particular command. So far, I've attempted:
user ALL = NOPASSWD: alias1
user ALL=(ALL) NOPASSWD: alias1
But keep getting told I have a syntax error - presumably this is because visudo doesn't recognise alias1? I've already checked that alias1 works correctly, so I assume I'm just referring to it incorrectly.

View 6 Replies View Related

Fedora :: Add Path In .bashrc By Commenting Out Old Path And Adding New One - Command Source ~/bashrc

Jun 14, 2011

When I add some path in .bashrc by commenting out old path and adding new one like this:

#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY

After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.

View 10 Replies View Related

Software :: Command Line Cd Command Not Working Right

May 4, 2010

Using netbook asus 1005ha with lucid beta 1 with most of updates on learning to use the CLI and headaches cd command does not seem to reconise directories here is a sample

Code:

yeh i know read the f#####g manual i am but any help would be greatly accepted tried sudo with same commands same problem did have a problem on my debian system that was to do with paths this is not the same on a different footnote anyone thinking of upgrading to lucid sit tight on 9.10 there are still to many issues that need ironing out for a system that is your main system.

View 6 Replies View Related

Ubuntu :: Error: Line 29137: Bad Flag Alias Index: 0

May 9, 2010

I am getting the following errors continuously whenever I update/save a config file in /etc/

Code:

error: line 29136: bad flag vector alias
error: line 29137: bad flag alias index: 0

The config file got updated though. I am just worried that this may be something bad.I update the files using the command sudo gedit <config_file>. I haven't encountered this before in Karmic. Has anyone encountered the same error messages? This might be a problem with gedit. I tried doing the following and the error messages also came up:

1. In terminal, gedit foo.txt

2. In gedit, type anything and save

3. Terminal will show the following:

Code:

...
...
error: line 19234: bad flag vector alias

[code]....

Running artha from the terminal also causes the error.I've managed to get the top-most line of the error:

error: line 15: bad flag alias index: 0
error: line 15: bad flag vector alias

The hardest thing about this is I have no idea what's causing it. I thought it was gedit but running artha (from the terminal) also causes the error.Sigh. This is a clean install of Lucid, which again makes it even harder to know what causes it.

View 9 Replies View Related

Ubuntu Networking :: Get Wireless WPA2 Working With Command Line Only?

Jul 6, 2011

I wanted to run a little media server in my house, shared with my laptop only, so I could free up space on my laptop drive. I took one of my Linux boxes out of my render farm and loaded up a minimal install, command line only of Ubuntu Lucid from the mini ISO (32 bit). I had to plug in a lan cable to install, but I wanted to move my box back out to the "farm" that doesn't have wired access to my intranet.

After much research, trial and error, this is what worked for me. My wireless card uses an Atheros AR5001X+ chip, and it works with the desktop cd out of the box. I found the "just works" desktop install uses the ath5k driver that is now included in Lucid, but I'm not using a desktop or window manager. I haven't tried this on server version, if you do, let others know what you had to install to get it to work.

The things I do tell you about, I instruct you as if you are a newbie, however I have left out some things that users should know or be able to lookup easily, like if you want a static address instead of using dhcp. You may not need all of the steps or you may have to do more research and troubleshooting.

Find your wireless card (you may need to lookup what to do if it is not recognized at all)List all pci devices, only show network devices (-v verbose, -vv very verbose): >>lspci -vv | grep Network List all hardware (| less lets you pause at each page - arrow keys, page down/up to navigate, q to quit) >>lshw | less

[Code]...

View 1 Replies View Related

Ubuntu :: Set Up An Alias For Update, Upgrade And Clean By Putting Line Into .bach.rc File?

Aug 3, 2010

I tried to set up an alias for update, upgrade and clean by putting this line into my .bach.rc file

Code:
#alias ud= 'aptitude update && sudo aptitude upgrade && sudo aptitude dist-upgrade && sudo aptitude autoclean' but when I type ud I get this error message, by the way I tried the bash.rc entry both commented and uncommented with the same result.

[Code]..

View 4 Replies View Related

Ubuntu :: Short Cut Keys Seem Not Ot Be Working - Ex Alt +F2 Dose Not Open A Pop Up Command Line

Apr 29, 2011

Some of my short cut keys seem not ot be working. Ex Alt +F2 dose not open a pop up command line. Also would like to add some short cuts. Like Ctrl + Alt+ Backspace for reboot. I went to the short cut app and I can add a short cut key, name it, but can't seem to figure out how to assign it a function. Didn't seem intuitive to me. I'm using the UNE version on a asus eel 1000.

View 1 Replies View Related

Fedora :: Run Python3 Scripts From Command Line And Call Up Python 2.6.2 Idle With The Command Idle From Command Line?

May 29, 2010

i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?

View 5 Replies View Related

Ubuntu :: How To Permanently Alias Command

Mar 6, 2010

My current alias'd commands are:

alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias ls='ls --color=auto'

I'd like to change 'ls' and add a few more, is there a command to permanently do that, or a config file I need to edit somewhere?

View 2 Replies View Related

General :: Make A Save Command By Editing The .bashrc

Feb 19, 2011

I found this script [URL].. Basically this is a shortcut for cd-ing my file system..

I can type "save nm" where "nm" is any short name for the directory, like "blog" or "blg" Then whenever I want to go to nm I'll just use 'cd nm'

But it is not working out for me, I get this error every time I enter save:

bash: save: command not found
bash: parse_git_branch: command not found

So How can I make this command work?

View 1 Replies View Related

Slackware :: Get Standard PS/2 Wheel Mouse Working On The Console Command Line

Aug 13, 2010

I am trying to get my standard PS/2 Wheel mouse working on the Console command line, and seem to be having major problems getting it to work.

For the record, I am NOT talking about X, Xterm's or any Graphical Interface, my mouse wheel works fine in these environments.

I am purely concerned with getting the mouse wheel to work on the Console.

After many hours of reading forum posts about getting the wheel to work on the Console, this is what I have tried to date:

1. I have downloaded and installed every version of gpm I could find in the hope that one would utilise the wheel. (No Success).

2. I compiled and installed the latest version of gpm stable (1.20.6) to see if the wheel would work with it. (No Success).

3. I have tried setting up gpm-1.20.6 as a repeater to X, using every string I could find (msc, ms3, pnp .. etc), as well as every /dev entry in xorg.conf /dev/mouse, /dev/input/mice/, dev/gpmdata/, /dev/psaux ... etc). (No Success).

4. Created directories and configured a gpm.conf to both /etc/ and /etc/conf.d/ in the hope that gpm was looking for them there (read that in one forum or another). (No Success).

5. I then tried to find mouse wheel patches for gpm, and then downloaded the relevant version source gpm.***.tar.gz to go with these patches. Nearly every single one of the patches failed to apply (using patch -p1 >), except for one version I tried that did apply ... but then failed to make (stating that the source had a different signedness or some such thing) ??? (No Success).

6. I looked into IMwheel, but that seemed to be a purely X program that was a lazy way of writing ZAxisMapping in xorg.conf. (No Success).

So now I am stumped ... Does anyone know if if is possible to get:

a). A Wheel Mouse Patch for a recent version of gpm (1.20.6) that will actually apply, and then make?

b). A prepackaged recent version of gpm-1.20.6.tgz that has been patched to enable the wheel that I can use?

c). Any other information that may enable the mouse wheel to start working on the console.

View 6 Replies View Related

General :: How To Alias A Command For Sudo

Sep 25, 2010

I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this:

alias rm=trash This works fine as a normal user, and it works fine when I use sudo -i to get a root shell prompt, but if I use sudo rm, the alias does not apply. So where do I need to put my alias so that it works in one-off sudo commands?

View 1 Replies View Related

General :: Used Alias Command For Ll And Now Ll Is Not Recognized?

Dec 3, 2010

I used the alias command to make ll be ll -lrt. I have linux 5 and using the bash shell. now I can't even use ll, only ls. when I go into the bin directory, ll is not in the list and the normal color codes for bash are not showing either...folders blue, etc

View 4 Replies View Related

General :: Variable Expansion In .bashrc Not Working?

Feb 21, 2011

In my .bashrc file, I am attempting to set JAVA_PATH to a local path, using the HOME environment variable or '~' symbol as shown in the following examples.Using ${HOME}

export JAVA_PATH='${HOME}/Software/java/jdk1.6.0_24'

When I attempt to use ${JAVA_HOME} in a my ${PATH} javec is not found. To debug it, I tried a simple ls command:

ls ${JAVA_HOME}

and get the following error:

ls: ${HOME}/Software/java/jdk1.6.0_24/: No such file or directory

Using '~': Trying to use '~' symbol as follows:

export JAVA_PATH='~/Software/java/jdk1.6.0_24'

the ls command results in the same error, however javac is found.I prefer the '~' symbol anyway, but would like to understand why the ls command does not work for either, and why it seems as though ${HOME} is not being expanded.

View 2 Replies View Related

General :: Ll Not Working \ Have To Set Up A Alias?

Aug 5, 2010

i have to set up a alias like:alias ll='ls -l'them ll will work

View 2 Replies View Related

General :: Setup An Alias Or Shortcut To Do The *nix Find Command?

Apr 5, 2011

When at the command line, I find that I have to type out this command very often: find . -iname "*php" -exec grep -H query {} ; I'd love to set up an alias, script, or shortcut to make it work easier. I would like to do something like: mysearch query ("*php") (.) It would be great if the command could accept three arguments, in reverse order:

query string, file name expression, directory If the second two arguments were omitted they would default to not being included, and the current directory. Finally, the icing on the cake would be that if additional variables were included (4th, 5th, 6th...) they would be injected as additional arguments for the find command (like I could say -type d) at the end. Attempted code I tried the example below, but I'm still having trouble setting default values. What am I doing wrong?

#!/bin/bash
c=${param1+.}
b=${param2+*}
a=${param3+test}
find $c -iname $b -exec grep -H $a {} ;

View 1 Replies View Related

General :: Using Shortcuts/alias Inside A Bash Command?

Jan 28, 2010

I know that using alias I can run a whole command with a shortcut. But my requirement is to use parts of a long command and in between I have to pass some user defined values.
E.g. Suppose I have to routinely copy a directory to another remote directory on a remote machine.The remote machine name is quite long as well as the directory path to which I want to copy the files into.So the command to do scp would look like this[URL]Now I want to do some sort of aliasing (say "ecp") so that I just need to pass the source_directory name and the ecp command and do my job

View 3 Replies View Related

General :: Alias A Device For The Mount Command In RedHat 9?

Aug 9, 2011

I have a program which mounts /dev/sdb1 for which I lack the source code. This device does not exist on my RedHat 9 system and I want to create /dev/sdb1 such that it's an alias for /dev/hdb1 Can I do this? with MAKEDEV?

I need to have an alias which will allow it to mount, not create a symbolic link to an already mounted directory. i.e. 'mount /dev/sdb1 /mnt/harddrive' should actually mount /dev/hdb1

View 7 Replies View Related

Server :: Working At The Command Line With Ubuntu Server Edition?

Jun 30, 2010

Whilst I have used GUI-based Linux distros for the last few years, I am now struggling somewhat when it comes to setting up a server from the command line. All the howto's I've read so far tell you how to set up certain things, but I don't know what I actually need to set up.Rather than asking the same questions all over again on a forum like this, and generally being a bit of a noob, I wonder if there's a resource somewhere that someone could direct me to in order to know what I need to do to set up a fileserver.

The hardware is all done, and I will probably set up a router distro like IpCop to manage the network, but I'm rather lost as to what packages I need, and how to know what the server is/isn't doing.I've used plenty of command lines in the past (ms dos, amiga dos, BASIC programming etc), just not a linux command line. All I've ever done is mount a few drives, use nmap and started x

View 1 Replies View Related

Software :: Use Command Line To Split A Single-lined XML Into A Multi-line XML?

Dec 9, 2010

I have a many text files that have XML tags all shoved into 1 line. I want to create a new file that splits each XML tag onto a new line. code...

View 3 Replies View Related

General :: Command Line Way To View A Line Of A File With Context?

Feb 24, 2011

I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:

$ (something) -l 154 stuff.py
150: def foo(bar):
151: """

[code]....

View 5 Replies View Related

General :: Printing Command Line History Without Line Numbers?

Aug 22, 2011

How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt

View 1 Replies View Related

General :: Ubuntu 10.10 And Command Line Scripts - Error - Android: Command Not Found

Mar 26, 2011

I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...

I just installed the JDK, SDK, Eclipse successfully (or I assume):

* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).

** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,

My system:

Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2

View 5 Replies View Related

Ubuntu :: Is Command Line Invocation Of Gnome-terminal To Run More Than One Command

Feb 17, 2010

how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here:

Code:

#! /bin/bash
#
#TODO write this for gnome and xterm

[code]....

This same error occurs if the gnome-terminal line is changed to

Code:

gnome-terminal -e mcTerm

Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.

View 1 Replies View Related

General :: Setup An "alias" Command For IDL?

Jan 25, 2011

I have installed IDL 7.1 on my Ubuntu 9.10. And now the instruction says that I should set up an "alias" for it.I do not know what to write in my "bashrc" as an alias for IDL.
These are the place of the executable command of IDL:

/IDL/idl-7.1/bin/idl
AND
/IDL/idl-7.1/bin/idlde

Note that "idl" and "idlde" are the executable files which run the program by typing them in Terminal. I would be very grateful if anyone could help me in how to write an "alias" for my IDL.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved