General :: Alias Cd Cmd Way Whensover Enter Any Directory
Mar 12, 2010
the problem is that i want to alias my cd cmd in such a way that whensover i enter any directory, a ls cmd i automatically performed. i tried ' alias cd='cd $1;ls' , but it is not working.
View 5 Replies
ADVERTISEMENT
Jan 2, 2010
I would like to use something like a 'cdl' alias that would cd into the directory i choose and then ls the contents automatically. I find myself using ls after i cd into a directory all the time. Something like:
alias='cdl=cd $1;ls'
usage: cdl /local/dir
View 2 Replies
View Related
Jul 4, 2011
I'm trying to setup an alias, that when I change to another directory, any directory, it will also display all its contents like ls -al:Well, that doesn't work. I guess it's an issue with the use of wild-cards.Maybe I should define a new, so far unused, name for the alias like cdl for example.Would be great if someone could help me. I search in several examples for bash aliases but couldn't find the right solution.
View 9 Replies
View Related
Apr 18, 2011
I have a big problem, I can`t enter to the system, said this:
mount: mounting /dev on /root/dev failed : no such file or directory
mount: mounting /sys on /root/sys failed : no such file or directory
mount: mounting /proc on /root/proc failed : no such file or directory
[code]....
View 3 Replies
View Related
Nov 20, 2009
I have searched the forum high and low for the solution with no success, so I will now post this problem, with all known facts. Linux (and Fedora) is brand new to me so I'm somewhat illiterate with the language and recommendations from reading other threads. Please bare with me. I'm reading the book Beginning PHP and MySQL from Novice to Professional by Cristian Darie.The book has you create an Alias directory for creating the tshirtshop web-based application.
The book uses the directory /home/username/tshirtshop. However, I did not want this in the /home directory, so I created a new directory from the root directory /workspace/tshirtshop. Below are the areas of interest in the file httpd.conf (I restarted the httpd service each time I edited this file):
Code:
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
[Code]....
View 1 Replies
View Related
Sep 14, 2015
I don't know if this should be a followup to my prior topic [URL] ....
Each of the pieces I've installed all have an "Alias" directive in the conf file to link the directory where they live to be present on my server. For instance, DotClear lives in /usr/share/dotclear/web/ and there is a directive
Code: Select allAlias /dotclear /usr/share/dotclear/web
that directs http://myserver/dotclear to that site.
Now, I've set up VirtualHost entries for my DotClear and Owncloud with their own hostnames.
Code: Select all<VirtualHost *:443>
ServerName myowndotclear.com
ServerAlias www.myowndotclear.com
DocumentRoot /usr/share/dotclear/web
[Code] ....
Something similar for Owncloud.
The problem is when I go to [URL] ...., I get to my mythweb site.
This is not so good. So, for the sites that have their own hostnames, I removed the "Alias ..." directive. Of course, now I can't get to the hosts by going to the primary site which is probably fine, but I also still get my mythweb since that doesn't have it's own virtualhost entry.
This doesn't seem like correct behavior. Is there a better place to put the "Alias ..." directive so that it only works from one site and not all of them?
I am also thinking I should just link the directories into /var/www/html, but I'm not sure that's a better solution.
View 2 Replies
View Related
Feb 14, 2011
This should be a simple thing to accomplish, but I can seem to figure it out. Essentially, I want to have a bash alias or function that will let me recursively grep the current directory. A while back I added this to my .bashrc:
Code:
alias rg="grep -r --exclude=*/.svn/* --exclude=*.swp"
This works fine, (and also ignores any svn and vim swp files), and I can call it like:
Code:
rg foo *
However, 99.999% of the time, I am only interested in searching in the current directory, so the "*" is a bit redundant. Also, I would say 5-10% of the time, I am typing faster than thinking and forget the "*", so grep just sits there trying to read from stdin. It's a pretty minor thing, but ideally I'd like to be able to just type:
Code:
rg foo
I've tried creating a function to handle this:
Code:
function rg(){
grep -r --exclude=*/.svn/* --exclude=*.swp $1 *
}
but it behaves exactly the same as the alias above. escaping the "*" with 's doesn't work, and neither does trying `pwd` (or even a hard-coded path) in its place.
View 2 Replies
View Related
Jun 11, 2010
Succeeded in connecting to internet using my wll phone. I can now connect using 'wvdial' command in root terminal. But I want to connect through terminal. I tried 'sudo wvdial' command. Then I am asked for my password. But I cannot type my password there. When I type, nothing appears on the terminal window. Ofcourse there's no problem with my keyboard.
View 5 Replies
View Related
Mar 28, 2010
I'm still pretty new to linux, and burning through a unix/linux course offered at the local JC. I'm working on an assignment for shell scripting and I need to make a script that displays a bunch of junk (pwd, date, yadda yadda) and then prompts the user to enter a directory so they can view the contents. If it's valid, then it displays the contents. If it isn't then it throws an error message and the script stops. This is done using if, then and else. The problem is, my script always shoots straight to the else, even if the subdir entered IS a valid subdirectory.Here's what I have:
Code:
clear
pwd
[code]....
View 3 Replies
View Related
Sep 17, 2010
Code:
wh1sk3yj4ck@valkyrie:~/.vmware$ ls -l
total 32
drw-rw-rw- 2 wh1sk3yj4ck wh1sk3yj4ck 4096 2010-08-05 08:06 BT4-R1
It would seem as if I own that dir, yea?
Well.
Code:
wh1sk3yj4ck@valkyrie:~/.vmware$ cd BT4-R1/
bash: cd: BT4-R1/: Permission denied
Also, what does the '2' mean after the permissions?
View 3 Replies
View Related
Jul 24, 2009
When i try and log in with my user it is giving me an error I have removed gnome from the computer and put kde as my desktop I can login with root can't enter home directory using / is the error
View 14 Replies
View Related
Jul 29, 2009
I use ext4 for the lvm2 home partition on Fedora 11. Yesterday, I must shrink my home partition and the operation crashed. Then a new ext4 partition becomes a backup "cp -R /mnt/backup/* /home" + chown + chgrp and boot Fedora again.
The login failed and the message of Fedora is "Cannot enter home directory. Using /."
What is the problem?
View 12 Replies
View Related
Nov 24, 2010
I've installed F14 to replace another distribution on my PC. I chose to use KDE. I used to have a separate partition for my user home to be mounted as /home. During the installation I instructed the installer to do so (without formatting of course). At the first boot I created a use with the very same name as I used to have. I got the warning about the home being already there and I said "yes, convert that ownership and selinux stuff so I can use that very directory as my home". At the graphical login I get a dialog saying I cannot enter my home and that it will use / instead. Of course the login process fails. If I switch to the character console (CTRL-ALT-F2) and do a login I actually get the very same error. But, if I hit "cd" (change directory to $HOME), then I get in the proper directory.
Update 1. I guessed it was a SELinux problem. And I manually disabled it into /etc/selinux/config. Now I'd like to fix this issue, because I'd like to have SELinux working.
View 8 Replies
View Related
Jul 18, 2010
I get this error when I boot opensuse default and fail safe. It takes me to a console log in, which works. This happened after new kernel install in Linux Mint, which is unbootable atm. I can boot windows, bsd but no Linux.
View 9 Replies
View Related
Jun 5, 2010
In GNU/Linux to GNU/Linux? For example there is some Samba-shared dir on Linux machine. And I wanna enter that dir from another Linux machine using Terminal or Virtual Console. In Windows it would start (if I'm not wrong) with "\...". Then a machne name and so on. But if I wanna do it in Linux, I personally only can use Gnome DE with its network..
View 2 Replies
View Related
Dec 1, 2009
I have a problem from time to time. Now is such a time. Nautilus is not able to read/enter my own home directory. It can enter/read ANY other directory, but my own home directory. Killing the Nautilus process, doesn't help. Logging out doesn't help. I need to reboot to get nautilus to read my home directory. Sometimes, it suddenly appears after a couple of minutes, but not always. What is taking so long time or causing the hanging? What should I do?
View 4 Replies
View Related
May 20, 2010
My purpose is to have a different history file for each directory. Because, it would be usefull for me to access only to commands executed in each directory. In this context, is there any way to update the HISTFILE variable every time I go in a directory?
View 1 Replies
View Related
Jan 12, 2011
I am pasting sudo commands without problems as a user (ales in my case) and then immediately the ask the user password.
The keyboard seems to be dead, no keys work, not allowing me to enter the password.
View 6 Replies
View Related
Aug 2, 2010
I am going through and old .cshrc file and it contains the following alias:
alias pwd 'echo $cwd'
I used to think that this is how pwd might have been implemented. But looks like thats not the case (because then this alias is meaningless).
View 2 Replies
View Related
Feb 18, 2010
I was trying to add new alias "alias ls='ls --color=auto'" in .profile, but it never worked I displayed all the alias that are current available and did not see the one I just added and found this among them:
lsls $LS_OPTIONS
and the LS_OPTIONS is "-N --color=none -T 0"
this is in /etc/csh.cshrc file which I do not have permission to edit.
Is there way to overwrite it?
Also I do not see a .cshrc under my home directory. Can I just make one and source it? Or do I have to link it to some source file that already exists?
View 3 Replies
View Related
Apr 29, 2011
I'm testing out the aliases to have a better understanding on how to shorten commands. I am trying to list all files whose file names end with a .c extension in which starts from the current working directory and recursing through subdirectories as well. And I want to delay the path name expansion until the alias is executed. I want to use the directory /usr/share. Would the command be: alias findc='find -type d -exec /usr/share'?
View 3 Replies
View Related
Aug 5, 2010
i have to set up a alias like:alias ll='ls -l'them ll will work
View 2 Replies
View Related
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
Mar 4, 2011
I'm running Utorrent server and I figure I would create an alias to launch the program and run it in the background.alias utorrent='/home/user1/software/utorrent-server-3.0/utserver &'It seems to run the program but the associated webui program is flaky and won't start correctly.If I manually go to the specified path and run the command ./utserver & , I never seem to have an issue with the webui.I was wondering if this could possibly have anything to do with using the '&' ampersand operator in an alias.
View 2 Replies
View Related
Nov 5, 2009
how to save alias permanent
View 4 Replies
View Related
Sep 6, 2010
I tried this to set an alias: alias lsf='ls -f' and it works fine... But when I put it in a bash script it doesnt work. SCRIPT:
cd ~
alias lsf='ls -F'
lsf
I get the following output: line 3: lsf: command not found
View 2 Replies
View Related
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
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
May 25, 2011
In my laptop, if I type below
$ which vi
alias vi='vim'
/usr/bin/vim
Now I want to change the vi alias to another bin, e.g. vim_wrapper a script created in /usr/bin/, I type this line:
alias vi="vim_wrapper"
in ~/.bashrc or /etc/bashrc, but take no effects. So How to change the default vi alias vi='vim' to vi='vim_wrapper'?
View 1 Replies
View Related
Jan 15, 2010
I need to make a alias and I am a little confussed how to do it. As some websites say it has to be in profile and other says it goes in bashrc.on the server I have these files
bash_historybash_profilebashrccshrcdtprofileloginmysql_historynewsrcI been trying to do this and think may have problem now as when I log in I get error it says bash_profile syntax error unexpected token 'fi'
View 9 Replies
View Related