Programming :: Tell If A Folder Is A Link To Another Folder?

Jan 13, 2011

i tried stat and S_ISLNK(st.st_mode) but it always evaluates to false :/ is there anyway i can tell if a folder is a link to another folder?

View 6 Replies


ADVERTISEMENT

Programming :: Make A New Folder For Each File In A Particular Folder

Mar 28, 2011

I been using linux for a while, but I havent had the time to really learn it. Something Id like to get more familiar with is bash so here is a simple example of something I would like to do:

I have a directory full of files. For each file in the directory create a new subdirectory with each files name.

I tried this:

#im already in this directory
aaa=./*
for a in $aaa
do mkdir $a
done

One of the problems is that there are spaces () and - in the filenames so I get many subfolders with names like "-" which i don't want.

I tried stuff like:
aaa=./*
for a in $aaa
do mkdir "'"$a"'"
done

This of course also did not work.

Additional I tried just creating a folder with the name of one of the files and I got this:

mkdir: cannot create directory `(audio) - R56339.EXE': File exists
Well yeah a file exsists with that name, but I want to create a folder- why is there a conflict?

Just to be clear here are the contents of this folder:
~/Desktop/LAB/Media/Drivers - (Image Deployment)/Optiplex_GX260/XP> ls
(audio) - R56339.EXE (NIC-Onboard-Intel) - R54402.EXE
(Modem-datafax-V92) - R54403.EXE OEM_Applications

[Code].....

View 1 Replies View Related

Fedora :: Link To Another User Folder?

Aug 17, 2010

I'm sorry if this question has already been answered, here or in Google, but 5' of search didn't give me any satisfactory answer. I haver 2 users, usr1 and usr2. I have access for both users. I want to link a folder from usr1 into the home directory of usr2. That is, if usr1 has the following folder

/home/usr1/Music
I want usr2 to link to this folder in this manner
/home/usr2/Music/usr1

I want usr2 to have read and execute permissions over all files and folders under that link, but probably I don't want him to have write permissions.

View 6 Replies View Related

Ubuntu :: How To Link A Folder In The Media

May 11, 2010

I use ln -s to create a symbolic folder in /home/ to direct a folder in the media.

But it appeared the link is broken. It also said "This link cannot be used, because its target "./media/StudyResearch/" doesn't exist."

View 4 Replies View Related

Ubuntu :: Symbolic Link Merged With Folder?

Mar 22, 2011

I have done something very studpid I think and was wondering if there's any chance to recovery a folder. I, for some stupid reason, merged a symbolic link with the actual folder, Thought I was doing something else.Now the directory does not seem to exist and when I click on it there is an error saying 'The link '/directory/' is broken'

View 9 Replies View Related

Ubuntu :: Add To Panel A Link To A Remote Folder?

Mar 23, 2011

I have to access to a remote hard drive on a windows machine with admin privileges (something like \ipaddressc$). I was able to bookmark that and put the link on "Places" using "Connect to Server..." using the following parameters: windows share, ip address, d$, username & pass. Now to make it easier to access, i want to put the same thing on the panel, and there comes the problem. I think that i can make a link that executes by command line the previous settings and opens-mount all the times my remote path.

View 1 Replies View Related

General :: Link Files In Different Folder In Html?

Jun 3, 2010

I try to link two page from different folder and directory1. I want to link [URL]

View 9 Replies View Related

General :: Ubuntu Symbolic Link Content Of Folder

Jun 24, 2010

I have two folders such as
nonserved/
folder1/
folder2/

And a served folder via Apache
media/
js/
css/
img/

In the end, I want to include/append contents of /nonserved to /media so that [URL] will be as such:
/media
/js
/css
/img
/folder1
/folder2

I am running Ubuntu Server, I am up for either apache config or symbolic link based answer :) Plus nonserved folder is rather dynamic thus manual symbolic linking to each folder is impossible.

View 1 Replies View Related

Ubuntu :: Can't Seem To Access MROOT Folder When Link To File

Nov 7, 2010

I can't seem to access my ROOT folder when I link to a file in it from one in var/ w ww.if (my ip):80 links to va r / w ww, and jsp only works in tomcat / webapps /ROOT, and I have tomcat / webapps / ROOT installed in var / w ww, then I thought I would try to do something like this, to make jsp work.Is there a way to simply redirect webapps / ROOT to var / www and put all of the files there?

View 9 Replies View Related

Fedora :: Ln Command For Link Creation To Folder On Windows Partition

Jan 16, 2010

I have a question about the ln command for link creation. I have both Windows and Linux partitions on my system. While I'm working on linux, sometimes I need to access the data stored on my windows partition. Yet, the access is provided through /media directory and I often, I have to click on several folders in order to access windows "My Documents" folder. So, in order to avoid this, I decided to create a link to "My Documents" folder directly from my $HOME directory.

Code:
$ mkdir /home/dariyoosh/MyDocuments
$ ln -fs /media/disk/Users/dariyoosh/Documents/MyDocuments/* ./MyDocuments

The link was created without any problem and now I have a direct access to that folder just by a click. Yet, there is a problem. If I update any file of the windows MyDocuments folder within this linking directory, the file is actually updated on the windows partition, which is of course what I want to do. But If I decide to create a new file on the windows "MyDocuments" folder by using this linking folder, that is, /home/dariyoosh/MyDocuments, the file is put actually on the linux partition instead of the windows MyDocuments folder. So, having created a directory linking to another directory, is there any way to proceed so that any file operation, in particular, creation, affects directly the linked directory?

View 3 Replies View Related

Ubuntu :: Link To Application Cannot Find Applications In Home Folder

Jan 27, 2010

I seem to be seeing some weird behavior in kubuntu with KDE 4.3.2 and KDE 4.3.5 for Kubuntu 9.10 32-bit.I have a few programs in my home folder. For instance Eclipse and Mendeley. it seems that when i create a Link to Application does not launch them. Here is how I create the links.

-> I right click and create a new "Link to Application"
-> I click on the Application tab and browse to where the shell script, or executable is.

and when I try to launch them it does not work. The link is using the absolute path. I tried setting the working directory and using a relative path but nothing. If I run the link in a terminal it says "Warning: Could not find" and the application I set. Now this seems to not be a problem for system applications like Kate. If i change the link to launch Kate it works perfectly.

View 1 Replies View Related

General :: Creating A Link To A Deeply Nested Folder Like = /home/username/?

Sep 17, 2009

I have an external hard drive mounted at /media/exthdd/ On that hard drive I have folders: Music, Pictures, Videos, etc. Can I make symbolic links to /media/exthdd/Music/ to say the root directory /_ ? the directory /_ is empty I just want a quick method of typing to get me there much like [cd ~] gets me to my home/username folder. I have my music organized by Artist/Year-Album/Track.Title.mp3 I want to be able to "cd /_" then "ls" and see all Artist folders.

View 9 Replies View Related

Ubuntu Networking :: Put A Link On The Desktop That Points Directly To The Shared Folder On The Server?

Mar 25, 2011

I created a lab of 15 PCs connected to a server using samba. Everything works fine, but it's possible put a link on the desktop that points directly to the shared folder on the server?

View 2 Replies View Related

Ubuntu Servers :: Samba - Access Folder To Delete Or Restore From The Recycle Bin Folder

Apr 24, 2010

I'm using ubuntu server 9.10 for a home build NAS. Everything is working great just have one more thing to figure out. I have Samba set up to access my files and I set up a recycle feature so anything deleted will get moved to a Recycled folder. (I learned this the hard way after hitting delete key by accident while browsing the shares in windows. Lost 100 GB of data)

Now it is for the most part working but the permissions on folders isn't getting set right. If I delete a file in a share I can go to Recycle bin folder and delete the file for good. But if I delete a folder I can not access that folder to delete or restore from the Recycle bin folder. I have to chmod the folder before I can do anything with it. Anything I can change to get folders deleted via windows to have the right permissions when it is moved to the Recycle bin folder?

[Code]///

View 1 Replies View Related

OpenSUSE :: Folder View Appl. Showing Desktop Folder - How To Add Icons

Jan 21, 2010

I have the Folder View applet on the Desktop viewing the Desktop Folder "~/Desktop"

Some shortcuts are outdated because of new installation of opensuse 11.2...

How can I add icons there in?

I can add icons to the Desktop and Taskbar but no in this Folder View on the Desktop (BTW: Is this Panel called "Folder View applet"?)

If I try to move a icon from Desktop to this Panel it is not moved in this panel it is placed behind this Panel...

And how can I get more than one of this panels for example one displays the Desktop folder other the home dir ...

View 7 Replies View Related

General :: Command Line - Move Folder Contents Into Parent Folder

Jun 11, 2010

I have a folderA that contains folderB that contains a lot of files. I would like to get rid of folderB, but not its contents. I want those contents to be inside of folderA. How can I accomplish this on the commandline?

View 2 Replies View Related

Ubuntu :: Cannot Change Directory To A More Than Three Folder Tree Destination Folder From In Terminal?

Sep 18, 2010

I cannot change directory to a more than three folder tree destination folder from ~ in terminal. I've checked everything. No Typos or misspell. The destination folder was recognized by "ls" command but when I went to it, the terminal said, "no such file or directory."

View 7 Replies View Related

Ubuntu :: Create Folder',and Results In An Empty Folder Being Created On Desktop?

Oct 29, 2010

I have this nasty habit of refreshing desktop in a quick succession by right-clicking and selecting 'Refresh',on my XP system at office.(And,iam sure most of us do the same).With Ubuntu,if a right-click on desktop slowly and select 'align by...',it simulates the XP refresh action as explained above.But,if i perform the same action rapidly,it takes this first option from right-click context menu,which is 'Create Folder',and results in an empty folder being created on desktop.I tried double right-clicking and again it created an empty folder.Is there any workaround to handle this.I mean:Can the right-click context menu items be shuffled so that the 'Create Folder' option is moved from 1st place

View 9 Replies View Related

Ubuntu :: Media Folder Has Extra Folder Titled With Non-existent Partition?

Nov 24, 2010

When I get my partitions listed in the terminal or in GParted they go up sequentially to sda7 as they should. The media folder in my file system shows the other dual boot OS and a data disk partition, both mounted, which is correct. All good. But there is a third strange folder titled sda8 however I have no such partition. /etc/fstab shows no sda8 either. When I open /media/sda8, it shows no files, says its empty and lists an empty available space that equals the empty space on the Linux OS partition in which the folder sits. But no pie chart shown, and it belongs to root. I changed the permission and found I can save files to it.

View 1 Replies View Related

Ubuntu :: Hidden Cache Folder In Home Folder - Safe To Delete?

Jun 8, 2011

upon browsing the home folder in my ubuntu system, i came across a hidden cache folder..

it occupied around 700 mb of space..and im falling short of space..

can i delete the contents in the folder? are they safe to delete?

View 5 Replies View Related

Ubuntu :: Desktop Keeps Crashing When Renaming Folder Under Folder View Plasmoid?

Jun 17, 2011

Running kubuntu 11.04x64 w/ xrender and folder-view plasmoid:

I cannot view "open with" for directories on the desktop (but it is visible w/in dolphin file structure) and whenever I try to rename folders on the desktop it crashes and restarts (but the rename is successful and no open windows crash).

This glitch is reproducible under OpenGL and Xrender; had to switch over to xrender after a recent system update that seems to slow my computer to a crawl after a little time and kept it cause it seems much smoother and crisper.

Is there any way to fix these issues or is there an alternative to the folder-view plasmoid to view a folder content on the desktop that is more stable?

View 9 Replies View Related

General :: List Folder Size And Number Of Files And Folders In Folder?

Nov 23, 2010

In Linux bash shell, for a given directory, how can I list:The create date for that directory The number of files in that directory The number of subdirectories in that directory.

View 3 Replies View Related

General :: Unable To Share Folder In Suse 10.0 / Folder Defaults To Not Shared

May 13, 2010

I wanted to enable file sharing in for one of my folders under the home directory. I noticed that the 'not shared' and 'shared' always defaulted back to 'not shared'. And now I see what looks like an electrical plug icon symbol over the folder icon symbol like I might see used for some of the root folders. What does the new icon indicate about the folder attributes and why does file sharing default to 'not shared'?

View 1 Replies View Related

Software :: Folder Name Comparison Utility - Folder Names No Longer Mirroring Each Other

Feb 4, 2010

Does anyone know a good program to use for comparing folder names from 2 different directories? The reason being that at work we have a shared area with 2 folders one named REC (records) the other named WIP (work in progress) within these 2 folders there are 100s of subfolders. The folder names in wip and rec both need to mirror each other but the files are different within the folders. The problem we're having at the moment is people are creating new folders with out letting me know which means the folder names are no longer mirroring each other. I need to know if there is a utilty available to compare just folder names so that we can get a list of folders which have been created without our knowledge and we can ask the originators to remove them.

View 4 Replies View Related

Ubuntu :: Kde 4.5 - Move A File Or Folder Into Another Folder, All The Icons Arrange Back To The Left Side

Sep 14, 2010

When I position icons on the desktop in specific places, then I choose to move a file or folder into another folder, all the icons arrange back to the left side. This happened in an earlier version of KDE 4.x, disappeared the next version, and reappeared. how to keep this from happening. It makes using the desktop a pain in the you know what.

View 2 Replies View Related

Ubuntu :: Best And Full Feature Editor - Open All Files In A Folder When Drag And Drop The Folder On It

Jun 21, 2011

when i used windows there was this wonderful editor named Notepad++.it was perfect(it still is) some of its best and useful features of it (for me) was:

1-open all files in a folder when drag and drop the folder on it
2-search and replace a statement in all open files
3-have an extended mode which include special characters like

and so on.. i want to know if there is an editor with this feature in ubuntu?

View 8 Replies View Related

General :: Copy Folder Hierarchy / Recreate All Folders From One Directory Without Copying Over Contents Of Folder?

Jul 2, 2010

Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,

Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.

$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.

View 1 Replies View Related

Ubuntu :: Drag File/Folder To Taskbar Button Creates Launcher, Not Bring Folder To Foreground?

May 20, 2011

After upgrading to 11.04, I noticed something strange, being that when I want to drag a file or folder from one Nautilus folder window to another which is not visible, I can no longer hold the item over said folder's taskbar button and wait for it to appear. It just shows the + for copy, and when I let go (which I have no choice but to eventually do), it creates a launcher to that item (I assume it's doing that, and not actually copying there, but the + has me unsure).

I've looked in Nautilus's preferences to see if this is some new behaviour that I can revert back to, but could find nothing there.

I'm of course using the Classic desktop with bottom panel being the taskbar. If you know how I can rectify this, please let me know, as the times I would want to create a file or folder launcher without the usual hassle would be rare, but I am constantly dragging stuff from one folder to another, and it would be a real pain to have to line up source and destination folders each time.

View 4 Replies View Related

General :: Lock A User Into Websites Folder Not Home Folder?

Jan 9, 2009

id like to lock a user into his websites folder not his home folder. and i dont want him to be able to veiw anything outside that folder, only be able to play with whats inside that folder. is this possible?

View 4 Replies View Related

Fedora :: Want To Right Click Folder In Nautilus To Open Terminal To Folder

Feb 19, 2010

I basically am hoping for a line of bash script I can put into "Open With" for folders so I can get a terminal with the right path. I hate manually typing in paths to places when I am looking right at them in nautilus. "gnome-terminal" doesn't work - it just opens a terminal to ~.

View 3 Replies View Related







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