A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
1answer
38 views

Linux: Recovering a deleted dir that another terminal is still cd'ed into

I accidentally deleted the dir, /path/to/dir, and all its contents from an application. However, I still have a terminal window open, still cd-ed in /path/to/dir! Q: Is there any way to recursively ...
0
votes
1answer
30 views

Executable directory? And chmod o+w changing the terminal directory color?

What does an executable directory mean? If o+w is set the directory changes colors to a background green, what does this mean? Why doesn't it do it for ug+w, but only for o+w? Additional question ...
2
votes
2answers
88 views

Folder alias / Symbolic link to return to back folder

I need to create a folder "2015" which re-routes to ./ but I don't know what the command is. Not sure if the term is called in this case an alias (or symbolic link). So I need to make the same ...
5
votes
0answers
40 views

How do folder name localizations work?

In Mac OS X, there are directories like Desktop, Users and Library. On localized systems, these would be named Skrivbord, Användare and Bibliotek (Swedish) But when I am in the terminal I can't ...
-4
votes
1answer
25 views

Arrange for files created in a directory to belong to the directory's group

How do I set permissions so that whoever creates any files or directories in /directory, the group owner should automatically be the same group owner of /directory? This is on RHEL.
2
votes
1answer
41 views

When is a symlink treated as the thing it links to, and as a symlink?

When is a symlink treated as the thing it links to, and as a symlink? A symlink can links to a file of different types. For example, let mylk be a symlink which links to a dir. The following two ...
3
votes
1answer
16 views

Check for missing files in two directories and their respective subdirectories

Folder alpha has one subfolder, and files in both root and in subfolder. Folder beta has 25 subfolders with files in them. How would I compare the file contents of alpha and beta, checking for ...
1
vote
0answers
18 views

What means a number of links > 1 for directories? [duplicate]

Both programs stat and ls -l tell about the number of (hard) links to file(s). Going under the assumption that one usually cannot create hardlinks for directories in Linux it confuses me to see ...
0
votes
0answers
25 views

How to create a hardlink to a directory in Solaris?

I started to study the Solaris in my university. Teacher told me to do a hardlink to a directory. And he said that I can not to use mount command. For example: # mount -F lofs /dir1/dir2 ...
2
votes
2answers
35 views

Unzip into directory, independent if directory is contained in ZIP

Let's assume I've a ZIP file whichs content may look like # file: with_out_dir.zip file1.txt file2.cpp file3.js some_sub_dir/ - file_in_subdir.txt file4.xml but it may also look like this # file: ...
1
vote
1answer
37 views

How do I execute a command in each subdirectory? [duplicate]

I'm using Puppet and I need to create symlinks between two folders. I have around 10 folders with the same structure and I always want to execute my link command in xx/yy/zz. Something like this: ln ...
3
votes
1answer
244 views

mv and cp directory hierarchy? [duplicate]

Can I also move or copy directory hierarchy of a file when I mv or cp the file? For example, if I mv or cp dir1/dir2/file elsewhere, it will only mv or cp file. What if I want to also mv or cp ...
0
votes
0answers
29 views

Why are my directories and files created with bashscripts ending with \r? (Script Example) [duplicate]

Okay so I'm really confused but that is cause I know next to nothing about bash scripting. My problem is when I get the script to work it creates directories and files with the \r ending and that ...
0
votes
1answer
60 views

Is possible to change the value of '.' without actually change the current directory? [closed]

Can I make the value of . to be a different directory from the current directory? Background I'm learning Java. In the directory of my program, I have two sub-directories, src and bin. Every time I ...
2
votes
1answer
67 views

How to let a user create a directory although not create a sub directory

I'm trying to create a Bash shell script that allows for the transfer of files from a flash device to a archive in which the user will specify. Although I'd like to restrict this user from not being ...
2
votes
4answers
84 views

“mv: cannot move `.' to `../general/.': Device or resource busy”

$ mv . ../general/ mv: cannot move `.' to `../general/.': Device or resource busy Does it mean that the current directory is a busy device or resource, and can't be moved away? Why is it?
0
votes
2answers
45 views

ls hard link question

I run ls -la on the Volumes directory. It shows the MM dir to have 9 hard links and the Media dir to have 12. If I then cd to the MM directory and run ls -la, it shows only 7 items whereas if I cd to ...
0
votes
4answers
88 views

Is /home a subdirectory of /?

In my Ubuntu 12.04, /home and / are different partitions. But why does /home look like a subdirectory of /? Is it because it is a hard link: Are there five hard links which link to the same dir as ...
6
votes
1answer
122 views

cd and ls behave differently when inside a softlink to a dir

When we cd into a dir via its softlink, i observe: ls .. will show the content of the parent dir of the linked dir, while cd .. will go under the parent dir of the softlink. Why are they different? ...
0
votes
1answer
14 views

How to set a different directoy for a FTP folder in FreeBSD

I am kind of new to FreeBSD and the idea is to set up a FTP server with specific users. I have created the users but I don't want to use their home directory to store the uploaded files. I want to set ...
2
votes
1answer
165 views

What are functional differences between tree-like/hierarchical and flat file systems?

The only differences I can think of are all aesthetic. E.g. When you have many files, it will be hard for the user to navigate to the desired file because it wouldn't be organised nicely like in a ...
5
votes
1answer
94 views

Ability to add files to a directory but not remove existing files

Is there some permissions setup that would allow a user, say, john, to add a file to a directory d, but not be able to remove an existing file owned by another user, say, root? My understanding is ...
4
votes
1answer
77 views

Why are execute permissions required to rename files in a directory?

Say I'm the owner of a directory and I have read and write permissions, but not execute permissions, where the directory structure is like this: x/ (drw-r--r--) y (-rw-r--r--) ...
0
votes
2answers
46 views

No such file or directory when copying files to current directory

I am trying to copy a file from inside a bunch of folders to the current directory I am in. Playing around with the terminal, I see that when I specify the entire location it works: joostin@ubuntu:~$ ...
4
votes
2answers
204 views

Go n directories down

I would like to perform some processing on files that are 6 directories down in my tree (for example copying). The directory names on each directory level are entirely irregular (random numbers and ...
2
votes
1answer
39 views

get the name of new directory that created out of tar command

How can I get the name of new directories that were crated out of tar -xvf command? For ex. When I run the command tar -xvf jdk-7u17-linux-x64.tar.gz the contents of this tar extracted in a new ...
4
votes
3answers
306 views

Open a directory and let it update itself using “tail -f”

Similar to my last question: Open a text file and let it update itself; is there a way I could do the same but for a folder instead? As I have a log folder, can I use tail -f with a folder? i.e. $ ...
-1
votes
1answer
51 views

Unnest directories that have same name [closed]

I have too many files being in directories with same name EXAMPLE: ~/foo/bar/foo/bar/1.flac ~/foo/bar/foo/bar/bar/foo/foo/0.flac I want to have ~/foo/bar/0.flac ~/foo/bar/1.flac
0
votes
2answers
29 views

How to make partitions with in /home/user/ writable by user?

I have a partition scheme like this: / /home/ /home/user/files/ When logged in as user, I cannot save any files at /home/user/files/. The only solution I can find is to create a new subdirectory as ...
1
vote
2answers
49 views

How to give sftp access to sub-directory only not to parent

I want to give SFTP access to user tom for directory /var/www/html/my_project/. while I don't want to give any SFTP access to directory /var/www/html/. currently /var/www/html/my_project/ and ...
5
votes
7answers
713 views

Linux command line. Move all files and directories in directory, except some files and directories

I have a folder A which has files and directories, I want to move all those files and directories to another folder B, except file, file2, directory, and directory2. How can this be done?
3
votes
2answers
54 views

Go up one level from a nonexistent path

I have some code like this in a script (bash) file: if [ ! -d $dir ]; then cd $dir/.. git clone http://... fi Of course as written this doesn't work since $dir does not exist. Is there a ...
11
votes
1answer
135 views

When did directories stop being readable as files?

I have the 1st edition of The Unix Programming Environment book. In chapter 2, the authors state that directories are readable as files, and mention some facts about the format of these files. They ...
1
vote
1answer
34 views

Is there any useful purpose for directories with permissions -w-?

Being aware of this answer I wonder whether there is any useful purpose for write-only directories, i.e. directories with permissions -w-. Any directory-"writing" operation I know of (such as creat, ...
2
votes
2answers
35 views

Link value is 2 by default for folders

Can anyone help me to understand the logic behind the link value being "2" for the first time when we create any folders/ directory in linux. I searched a lot , but couldn't get satisfactory logic
1
vote
1answer
23 views

Two users, full access to same folder

I have a laptop running Arch Linux, and an owncloud-client. I have an owncloud server on my local network. When outside of my local network, I must use a dyn dns URL to get to my server. When on the ...
0
votes
1answer
89 views

Create a directory if it doesn't exist in TCL

I write expect script that login to remote machine and run there some scripts But I need also to verify the following Verify if directory /var/cti/adm/APP exists. If APP not exists under adm ...
1
vote
3answers
66 views

How do I delete a folder but not the contents?

My directory (in Linux) looks like com/com/{various,files} where com and com are folders of the same name and the second com holds the various files. I want the first com removed, but the second and ...
1
vote
1answer
41 views

Can I start a background process with a specific working directory?

Say I have this structure /masterscript /a/script1 /a/b/script2 In masterscript I spawn the other scripts as background processes: "/a/script1" & "/a/b/script2" & The problem is that ...
2
votes
1answer
40 views

Permissions to change only directory content and not itself

We have a directory and want to protect that from remove and rename, but we need to be able to rename, remove and create contents. What we can do?
4
votes
2answers
326 views

How To Synchronize Directories in two different external hard disks?

I have few big folders "cosmo_sim_9", "cosmo_sim_10".... in one of my external hard disk, and a old copy of this on another external hard disk. I want to Synchronize old directories with the new ...
7
votes
1answer
124 views

Why are rmdir and unlink two separate system calls?

Here's something that kept me wondering for a while: [15:40:50][/tmp]$ mkdir a [15:40:52][/tmp]$ strace rmdir a execve("/usr/bin/rmdir", ["rmdir", "a"], [/* 78 vars */]) = 0 brk(0) ...
3
votes
1answer
51 views

Mounted volume name in terminal is different from in GUI

The basic problem is that in the GUI shows a directory name with no space but when I cd to it in the terminal, the directory name has a space in it. What would cause the names to be different? The ...
2
votes
1answer
25 views

Regarding identical copies of gedit files

When ever I save a gedit file in a directory, two copies of it get saved with identical content. Ex: If the gedit file is named as file_name and saved in Home directory then when u ls the Home ...
0
votes
1answer
92 views

What does “execute” permission on a folder means? [duplicate]

I have read this topic, which gave me some info but I feel I am not fully getting it. What does the execute permission actually means on a folder? I fully understand what it means on a file, but on a ...
1
vote
3answers
105 views

How to copy-merge two directories?

I have two directories images and images2 with this structure in Linux: /images/ad /images/fe /images/foo ... and other 4000 folders and the other is like: /images2/ad /images2/fe ...
-2
votes
2answers
66 views

Getting a propmt when deleteing a non-directory

I want to get a prompt when attempting to delete a non-empty directory with rmdir. Is this possible?
0
votes
2answers
51 views

Copy directory not just the contents

I want to copy a directory into another directory. For example, cp -r dir1 dir2 copies the contents of dir1 into dir2. I want to copy dir1 itself into dir2 so that if I ls dir2 it will output dir1 ...
6
votes
2answers
109 views

Folder with ONLY write permission is useless… right?

Having worked with Linux for years, and finding myself with some free time, I decided to revisit some basics. So I re-read the stuff about permissions (without checking source code), and its special ...
2
votes
1answer
72 views

Why does `cp -a . /dir` copy contents instead of directory?

I wanted to copy a directory that I was presently in. I tried cp -a . ~/xyz It copied the contents of the directory, yet this worked: cp -a "$(pwd)" ~/xyz [As desired, this copied the directory ...