General :: Alias For Changing To Directory And Displaying All Files

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


ADVERTISEMENT

General :: Ls Command And Displaying Number Of Files In Current Directory?

Oct 15, 2010

What command will provide you with the number of files in your current directory?
Choose one answer.
A. ls -c
B. ls | wc -w (this one)
C. ls -n | count
D. ls -wc (this one ?)

View 5 Replies View Related

General :: Copy A (big) Directory Over Another Changing Only The Files That Differ?

Feb 3, 2011

I have directory a and directory b. They are big. b is almost identical to a. "almost" means that 4-5 files differ, and I don't know which they are. I want to copy b over a, but only the files that differ. i'm in bash.(no, I can't simply delete a and replace it with b, because 1) a is version-controlled 2) a full copy (or a mv) would take too much. I want to copy only the files that differ).

View 4 Replies View Related

General :: Use A 'cdl' Alias That Would Cd Into The Directory?

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

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 View Related

General :: Stop Du Command From Displaying Directory Name?

Apr 28, 2011

Does anyone know how to stop the du command from displaying the directory name?

View 1 Replies View Related

Fedora :: F11 Apache 403 Forbidden Using Alias Directory?

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

Ubuntu Installation :: Dell 8400 - Screen Displaying Main Menu And Not Changing

Jan 31, 2010

I my trying to install Ubuntu onto a new 1 TByte Sata HDD on my Dell 8400. The computer has no other OS installed as the old HDD containing Windows XP has being removed. The new hdd has being fully formatted and is set up as a NTFS with a single partition of 1 TByte. I downloaded the latest version of UBuntu and burned it to a cd as a ISO file. When I boot my computer up from this cd I am asked to enter my language of choice and then I get the main menu screen. On this screen I choose option (2) - Install Ubuntu. After a few minutes during which time you can hear the cd being accessed the screen just displays this main menu and never changes. I have tried twice using this install option but after 45-50 minutes the screen still never changes. No progress information is given. If it is normal how long does the installation generally take?

View 2 Replies View Related

Debian Configuration :: Apache Directory Alias Leaking Into Virtual Hosts

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

Fedora :: Bash Function Alias To Recursively Grep Current Directory?

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

General :: Changing Default User Start Directory?

Jul 4, 2009

I would like to change the start directory, the directory at which ftp/shell points to when the user logs in.

View 1 Replies View Related

Ubuntu :: Directory Not Displaying In Web Browser?

Nov 16, 2010

I have a LAMP environment on Ubuntu 9.04 desktop. I created a directory in /home/user that I use for all my development work called /projects.

I am able to access this directory via localhost/projects as the URI in my web browser; I see a listing of all the separate directories and I am able to click on each directory and see its contents.

Parent Directory
Site-Structure/ 30-Aug-2010 11:39
builds/ 03-Sep-2010 00:02
d6/ 12-Nov-2010 13:25
d7/ 31-Oct-2010 17:44

[Code]....

I have default, default-ssl and projects in my /etc/apache2/sites-available directory. I haven't changed these files since I first created them. I haven't changed the permissions on any of the directories within /home/user/projects since I first set this up.

What can I do to access this directory from the address bar of a browser again?

View 4 Replies View Related

Server :: Changing The Password Of Directory Manager In Redhat Directory Services

Jul 14, 2010

How to change the password of Directory Manager in RED HAT Directory Services through a ldapclient through command line or graphical.

View 1 Replies View Related

General :: Perform A Long Directory Listing Of All Files In The /bin Directory That Have Exactly Three Characters In Their Name?

Jan 18, 2010

How do you perform a long directory listing of all files in the /bin directory that have exactly three characters in their name?

View 1 Replies View Related

General :: Files Created In A Directory Owned By Directory Group?

Jan 29, 2010

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?

View 2 Replies View Related

General :: Cronjob Directory / Send An Email If Directory Contains More Than Ten Files?

Oct 13, 2010

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.

View 6 Replies View Related

General :: Find Directory Older Than X And Mv Directory With Sub Files Command?

Jul 13, 2011

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

View 4 Replies View Related

General :: Method Of Changing Directory To A Symbolic Links Parent Or Source?

Aug 3, 2011

I have folder stucture:

|- dir1/
| |- sub1/
|
|- dir2/
|- sub1link -> /dir1/sub1/

and my current working directory is sub1link, is there a quick way to either: change directory to link source parent (i.e something similar to cd .. but take the user to /dir1/ change directory to link source (i.e switch from /dir2/sub1link/ straight to /dir1/sub1

View 1 Replies View Related

General :: Symlink Each Of The Files In One Directory To Another Directory?

Feb 11, 2011

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:

/bar/a -> /foo/a
/bar/b -> /foo/b
/bar/c -> /foo/c

View 3 Replies View Related

CentOS 5 Networking :: No Ifcfg-eth0: Alias Files To Edit?

Jun 11, 2009

When I setup the server I added multiple ips. Now that I need to edit ip info I can't find any alias files in the network-scripts folder. But restarting server the ips work fine. Is there some where else that this would be stored.

View 2 Replies View Related

Ubuntu :: Copying Files To A Directory And Skip The Files That Already Exist In The Directory?

Jun 30, 2011

How would i go about copying files to a directory, yet skip the files that already exist in the directory, and also remove the files that are in the directory. For example:

Code:

$ls /dir1
img001.jpg
img002.jpg

[code]....

Now i would like to copy from dir1 to dir2, but the contents of dir2 would be:

Code:

$ls /dir2
img003.jpg

View 7 Replies View Related

Ubuntu :: Desktop Is Not Displaying Files

Jul 4, 2011

My desktop is not displaying files that I put on the desktop days ago. I checked all four workspaces.All the files are still accessible from Nautilus > Desktop.When I drag a file icon (from Nautilus to the empty desktop) and release, the icon does not drop on the desktop, the icon quickly moves back to the folder where it came from.The top and bottom panels of the desktop still operate normally.I am running Ubuntu 11.04 64-bit with classic-Ubuntu desktop.I also noticed that Startup Applications is missing "chrome" that I added this morning.I am the only user on this system. The system is a duel boot Ubuntu - win7. The Ubuntu partition is formated ext4 and there is a separate NTFS-formated partition named "storage" for folders that are accessible from both Ubuntu and win7. That should not be an issue because the desktop folder is on the Ubuntu partition, /home/[user]/Desktop. I have not booted win7 in the last few days.The desktop first
appeared empty after I did two things:

1) installed CryptKeeper from Ubuntu Software Center
2) Enable Automatic Login

After I clicked Applications > System > CryptKeeper, the desktop did not respond to mouse clicks. I did not find any CryptKeeper instructions. I don't know how to use CryptKeeper.The login screen still asked for credentials after I rebooted.So I uninstalled CryptKeeper, disable Automatic Login, and rebooted. But the desktop is still not displaying the files.Could CryptKeeper have changed something in my profile?Does Ubuntu have a log file to see exactly what I did?What else can I try to restore my desktop and enable Automatic Login?

View 8 Replies View Related

General :: Changing The Default Application To Open Files - Ubuntu 11.04

Jun 30, 2011

I want to change the application that opens my mp3 files.

At present if I double click an mp3 it opens in the movie viewer for some reason. I know I can use "open with..." to get a file to open in Rythymbox instead, but I have over 800 mp3 files and want to change the default for all of them.

View 1 Replies View Related

General :: Renaming External Files Changing Ownership Instead Of Root

Mar 28, 2011

i have inherited a mixed bag of sorts: several xp users updating an access mdb with the BE on a lamp stack shared via samba. i have a backup device which gets mounted at: /media/disk... each client record (has) a folder by the companyname on the samba share, and all relative documents are placed there. when the backup script runs, it just copies newer or missing files.

someone has been renaming folders, and not matching the folder name to the related companyname from the mdb. so...the backup script captures and duplicates the data in the renamed folders. some client records also have periods in the name (not required from a data pov), such as 'Company Ltd.' instead of 'Company Ltd'. i can produce a list of company names as the folders should be found easily enough, but get a little stuck with the linux scripting.

i can easily remove and further prevent any unwanted punctuation in the company name on the client record, and create the correct folder name on the samba share with vba, but would also like to:

-for each 'client activity' folder on the backup device
-rename the folder by removing punctuation marks
or
-delete the folder if is a dupe

i tried: ls -al | grep '&' - it properly returns only those lines with an ampersand in the folder name, but returns all folders when i try that with a '.'.

what would be the easiest method to do the renaming? i thought if there was a way to change ownership of the mounted device, then the vba code (easy to write) would be simple.

OK - i just ran chown -R on the external device, changing ownership to (me) instead of root. didn't want to because it took too long, but can now use the MoveFolder method of the filesystemobject from my app to do the renaming instead of some sort of bash script (which i was dreading).

View 1 Replies View Related

Ubuntu :: PHP Files Downloading And Not Displaying Page

Nov 19, 2010

When I try to load a php file my browser downloads the file instead of displaying the page. Here is my apache conf file.
#
# Based upon the NCSA server configuration files originally by Rob McCool.
# This is the main Apache server configuration file. It contains the configuration directives that give the server its instructions.
# See [URL] for detailed information about the directives.
# Do NOT simply read the instructions in here without understanding what they do. They're here only as hints or reminders. If you are unsure consult the online docs. You have been warned.
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server, which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or hostnames and have them handled by the same Apache server process.
# Configuration and logfile names: If the filenames you specify for many of the server's control files begin with "/" (or "drive:/" for Win32), the server will use that explicit path. If the filenames do *not* begin with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log" with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

View 7 Replies View Related

Programming :: Deleted Files In Directory With So Many Files Without Deleting Directory Itself

Nov 14, 2010

There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.

View 3 Replies View Related

General :: Changing Working Directory Of Parent Script From 'sourced' Script?

Jun 8, 2011

I want to change working directory of my script by another script that has been included.

First script:

#!/bin/bash
pwd
source script2
pwd


Sedond script:

cd ..
pwd


View 5 Replies View Related

General :: Changing Directory - Saved File On The Desktop - Cannot Seem To Get That File To Execute It

Mar 10, 2011

I was doing a tutorial on scripting in bash. I saved my file on the desktop and I cannot seem to get to that file to execute it. Here is what I have been using:

I try cd Desktop says that there is no such directory.

I tried /home/me/Desktop same thing.

View 5 Replies View Related

Ubuntu Servers :: 9.10 Server Downloading PHP Files Instead Of Displaying Them?

Mar 17, 2010

I have an Ubuntu 9.10 server set up at my house. I have Apache2 and PHP5 installed on it. Every time I go to the server on a web page and try to load the PHP index page it downloads instead of displaying.

I have virtual servers set up and have the files stored at /home/cusinndzl. If anyone needs to take a look I can let them into the webmin panel.

View 4 Replies View Related

Ubuntu :: IPod Touch Not Displaying Synced Files

Jan 11, 2011

after i solved the many other problems that plagued me as an early adopter of the new iPod touch, I took my freshly recovered device (iOS 4.1, on an ipod touch 4G) and tried syncing with Rythmbox and Banshee. It shows up on the GUI as a music player and a camera, I press sync on rythmbox or banshee and it works out. But when the sync is over and I look at my device I find no songs on there, but they're inside the itunes_control file in my ipod when I view the file contents from ubuntu.

I have succeeded in syncing with iOS 4.1 before, but an error forced me to restore my iPod. But that was when I had a jailbroken ipod with the DBversion changed to 2 as per many guides on the internet. But I thought all of these problems were solved with the new libimobiledevice 1.04.

View 1 Replies View Related







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