Tagged Questions

A file system structure in which to store computer files.

learn more… | top users | synonyms

1
vote
0answers
55 views

xdg user dirs: not relocating although set?

I relocated my home directories using XDG user dirs as mentioned here: how to make gnome use my home folder as Desktop folder? However, this does not work for me so far. I have set the Downloads ...
1
vote
2answers
36 views

How to find number of Subdirectories under a given directory

In windows you get a count of the number of subdirectories within a directory.Is there any equivalent on Linux ? I'd like it to count recursively & Not stop at a single level.
3
votes
1answer
78 views

The history of ../

I was wondering if there's a known reason behind the use of .. to represent the parent of the current directory in most operating systems. The reason I ask this question is because I think that the ...
0
votes
0answers
14 views

inotifywait to monitor shared directory on laravel homestead

I need to watch a directory that is shared on a network for new files. I used inotifywait from inotify-tools and it is great except when the file is added from the other place. For example: I am ...
4
votes
3answers
51 views

Is there an easy way to change directories from within one duplicate folder structure to another?

On our server, we have several duplicate-ish folder structures for testing, staging, and production. Other than minor changes, the folder structure between all three are generally the same. When I'm ...
3
votes
1answer
57 views

how to make gnome use my home folder as Desktop folder?

Environment: Debian 7, gnome-shell. I dislike having a Desktop folder and a Home folder. I like all the applications to use my home folder. Specifically I am concerned about nautilus and ...
0
votes
0answers
27 views

Failed to list directory contents: process waits infinitely

I use Linux Mint 13, and sometimes (rarely) I find myself not being able to list my home directory contents. When I try to do so: $ cd $ ls then, ls just waits indefinitely. The same with any other ...
0
votes
2answers
26 views

Tool for visual directory comparison

This question is not about visual diff -- i.e. file comparison. Is there a tool which let me compare directory A and B (recursively), and as the output I would get two panes, with lists -- files in A ...
2
votes
2answers
44 views

ls doesn't give me the same as cd + ls to the same folder

$> ls ../../../../.. Doesn't give me the same result as $> cd ../../../../.. $> ls Why? Something with links? What's going on? [ johanrj@jamin ] ...
0
votes
4answers
38 views

number of folders in a directory (recursive)

I would like to find the number of folders (recursive, excluding hidden folders) in a given root directory. What command, or series of commands can I use to ascertain this information?
3
votes
1answer
41 views

How to update directory size after file removal?

This is mostly theorethical question without real practical usage. As you may know, filenames are stored in directory inode. That means the more files we have and the longer filenames are the more ...
1
vote
1answer
22 views

du -sh on a new directory gives different results in different locations

Here's what happened when I created a new directory and immediately ran du on it. There are no contents in this directory. me@mybox[~]$ mkdir /scratch/test2 me@mybox[~]$ du -sh /scratch/test2 4.0K ...
9
votes
1answer
593 views

What is the difference between 'ls' and 'ls -l' when I don't have execute permission on that directory?

I created a directory called folder and took away execute permission. $ mkdir folder $ touch folder/innerFile $ mkdir folder/innerFolder $ chmod -x folder Now if I do $ ls folder it outputs a ...
2
votes
1answer
27 views

Problem with install command to copy a whole directory

So I have a repo with some of my config files and I'm trying to create a makefile to install them in the homedir. The problem I have is that when I run the following command straight in bash install ...
0
votes
1answer
39 views

Extracting tar.gz from distance

I would like to extract a single file from a tar.gz file, but its in another folder than I am currently in. Is it possible to extract from "distance"?
1
vote
1answer
26 views

Adding files to .tar from directory

Is there a way to add files to .tar file in one directory from an another directory? And at the same time list the content of the tar to see if its added. I only found ways to add files if its in the ...
0
votes
1answer
58 views

Why the size of an empty directory in Linux is 4KB? [duplicate]

I'm using Ubuntu 14.04 and I made an empty directory on /tmp with the mkdir command: cd /tmp mkdir foo and then I checked it's size using ls: ls -ldh foo and the result shows that the size of ...
1
vote
1answer
32 views

Help understanding and using Symlinks

I have a bit of a situation with a virtual server running some RHEL distro. The server is hosted on a Win2008 server via VMPlayer ( I'm going to smack the guy who set this up.) When it was created ...
2
votes
2answers
75 views

What filesystem mount point am I currently working on?

I would like to know in what filesystem mount point I am currently on, similarly to using pwd to know what directory I am in. I know you can use df . (or df $(pwd) or many variants), but I find it ...
1
vote
1answer
73 views

How to output the directory structure to Json format [duplicate]

I have been using 'find' to output the directory structure from the root down and I don’t mind that it takes a while. My problem is that I want to cut down on the redundant info of repeating every ...
0
votes
1answer
45 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
38 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
96 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
1answer
62 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
26 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
44 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
27 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
19 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
38 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
43 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
42 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
264 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
71 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
263 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
53 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
91 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
131 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
0answers
17 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
222 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
111 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
89 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
57 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
205 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
44 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
319 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
32 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
92 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 ...