General :: Possible To Shorten My Directory Commands In Ubuntu?
Jun 20, 2011
When working on a rails app I like to open all of my files through the command line like so
CD my_app
gedit app/views/user/show.HTML.erb
Is there a way that I could shorten this so that I could just write something like
gedit user_views/show.HTML.erb
I would like the console to stay in the main directory, I just don't like having to type out app/controller/user_controler.rb every time I want to open the user controller. I know that I could just open the file with my mouse, but I feel like moving from keyboard to mouse breaks my focus a little bit. When I can just tap away at the keyboard it seems like I have a more smooth workflow.
My new VPS is running Debian 5.0 (bash 3.2.29), and some commands seems to be missing. For example the ps command is not here, neither is ls (but dir works). Is there a package missing or what's the deal?
If i am using a terminal window (shell) and I am on a deep point of a folder tree it becomes difficult to read what i write, as well as the entire content of the window.Is there a way to shorten the name of the current path in a shell / terminal?I know that aliases can be used for commands, does it exist anything similar for paths?
I installed xubuntu8.04 on my laptop(no other system),but when i started the system,there came out a grub and showed "press ESC to enter the menu"
I think this is a waste of time since i have only xubuntu on my lap, why do not just get in directly? why need a grub?i do not need so can i do something to shorten the start time? ( i know the menu is revovery option) by the way i can not mount my usb hard disk, the error shows:
my computer have windows 7 and also a ubuntu in it (i started with version 10.04). i've just updated my ubuntu and i found that the list in the grub menu got longer by 2.and i feel its a long list....
so how do i shorten the list... i'll be ok if i just have the latest Linux and its recovery mode. than memtest86 and the other and last Windows 7... i dont need the old ubuntu in the list.... its redundant.... i have startup-manager installed but does not do what i wanted...
so this is my favourite audio format (please kindly refrain from dissuading me to use it , it is not my question) and it worked fine up to karmic but i spent time today it seems okbut then when i run
I'm running a Counter Strike 1.6 Game server on my centos 5 VPS. I can get it to run by simply switching to the directory, then doing: ./hltv Now, when I do that, it obviously closes when I exit Shell. So I do the following and it gives me errors then. screen -A -m -d -S hltv ./hltv My question is, do I need all of those commands after screen? I just simply want it to not close once I exit Shell.
Accidently ran rm -rf while the pwd was /home/user-name
Now I'm unable to run any command whatsoever as root, ls,vi,cnf whatever, they don't work.
However the commands work as normal user.
I can guess that the files with root ownership in the home folder were deleted but I would like to revert everything back to normal and would like to know how to solve this problem.
Notifications that popup in Ubuntu (e.g., for downloading items in firefox or Network configuration stuff) display a rectangular black box in the upper right corner of my Desktop. It often covers up items I need to access like logout items or links to my Account etc in a webpage I'm in. I often find myself having to wait for the Ubuntu dialog box to disappear before I can access whatever it is covering up.Is there a way to make these dialog boxes appear in the LOWER right corner instead? Also is there a way to shorten the amount of time that these notifications display before disappearing?
i have a bunch of shorten files i want to play from the command line and ffplay will play them one at a time but i want to play them one after the other (the whole album)does not work i must have forgotten something as it plays one track then stops.
Firefox "preferences" has an option which say, "keep my history for at least --- days".This does not make sense. If I enter 10 days, it will keep my history for 10 days or 1000 days. If I ener 100 days, it will keep my history for 100 days or 1000 days.ame thing!!Shouldn't it say, "keep my history for no longer than --- days"?I just set mine to 14 days and I still have a month of history.
I've just installed Ubuntu 10.04, trying out linux for the first time. I'm wondering if it's possible to link my documents folder in Ubuntu to my documents folder in Windows, so that when I open the folder in Ubuntu, I am linked to the folder in Windows.
Well, I am facing problem when doing lab questions.
I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).
I am required to use the /usr/local directory.
In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".
I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.
I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively
I'd like to mount the directory /var/www/mysite to the directory /home/daniel/mysite, but also have the user of the mounted files mapped from the original user (www-data) to my own user (daniel). So that the file /var/www/mysite/index.php who's user is www-data will appear in the mounted directory as /home/daniel/mysite/index.php and be owned by daniel - and alternatively, if I create a file /home/daniel/mysite/test.php with my own user, it will be created in the original directory under the user www-data Is it possible? If not, what alternatives do I have so I can use an IDE and still make sure all the files belong to the HTTP server's user?
I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.
Code:
That is what it shows in the man pages, but when I do that, it says cp: no match
If I have a directory /foo with a few files in it, how do I symlink each entry in /foo into /bar/? For instance, if /foo has the files a, b and c, I want to create three symlinks:
How can i auto mount more than directory in the same directory ? i want to automount 2 home directories in the /home and still be able to enter the other home directories !
The problem that i've another account on the system with home directory joe when the user1 home directory auto mounted i become unable to enter joe home directory !
I'm using Mac OS X's Terminal.app shell to compile and run Fortran programs. One such program resides outside of my home directory (it is in the Applications folder, which resides on my hard drive but seems to be outside of my home folder). How can I navigate into this directory using Terminal.app to run the programs that reside there?
I wonder if the unix commands (cp, mv, grep, args etc) are the same for Mac and Ubuntu. Do they have the same parameter lists and so on or do they try to stay the same but are slightly different?
I just bought 8GB of RAM for my old desktop which I'm using as an Ubuntu dev box and secondary workstation. Can I just install the RAM and go merrily on my way or do I need to run some commands for Linux to take recognize and take advantage of the extra memory?