A file system structure in which to store computer files.

learn more… | top users | synonyms

3
votes
2answers
2k views

Encode directory with GnuPG

Is there any way to encrypt the whole directory using gpg? It accepts only file as input argument. But I need to encrypt a lot of files on external HDD.
43
votes
5answers
26k views

Difference between /bin and /usr/bin

I read this up on this website and it doesn't make sense. http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/basic/node32.html When UNIX was first written, /bin and /usr/bin physically resided ...
1
vote
2answers
341 views

How are directories managed in the filesystem?

On behalf of this particular question I would like to know how directories are managed in the file system. What does the author of the above question mean by telling each directory has n+2 ...
55
votes
3answers
2k views

Why does '/' have an '..' entry?

This just baffles me. Why does the root directory contain a reference to a parent directory? bob@bob:/$ ls -a . build home lib32 mnt .rpmdb sys vmlinuz .. cdrom ...
10
votes
3answers
1k views

Lowercasing all directories under a directory

I want to lowercase every directories' name under a directory. With which commands can I do that?
12
votes
4answers
4k views

How does one atomically change a symlink to a directory in busybox?

I am trying to (as close as possibly) atomically change a symlink. I've tried: ln -sf other_dir existing_symlink That just put the new symlink in the directory that existing_symlink pointed to. ln ...
4
votes
1answer
427 views

How to use diff tool to take a diff between directories with libraries and source?

I would like to know if i can use the diff tool to take the difference between two folders which contain sources as well as libraries and executable. Right now i gave diff -Naur dir1/ dir2/ ...
5
votes
1answer
3k views

Recursively compare directory contents by name, ignoring file extensions

I have a directory containing about 7,000 music files. I used lame to recursively re-encode all files in it to a separate directory, outputting all files with the same relative path and file name. ...
43
votes
7answers
13k views

What does the .d stand for in directory names?

I know many directories with .d in their name: init.d yum.repos.d conf.d Does it mean directory? If yes, from what does this disambiguate? UPDATE: I've had many interesting answers about what the ...
5
votes
2answers
4k views

How do I delete all files with a given name in all subdirectories?

I want to delete all files with a given name in all the subdirectories of my home directory. I tried: rm -r file in my home directory, but it didn't work because that file doesn't exist in that ...
1
vote
0answers
144 views

How can I list only the directories present in a directory using ls? [duplicate]

Possible Duplicate: Is there any option with 'ls' command that I see only the directories? I have a directory with a lot of files but only a few directories. To get a list of only ...
52
votes
4answers
54k views

How can I calculate the size of a directory?

How to know the size of a directory? Including subdirectories and files.
4
votes
2answers
4k views

Is there a way to empty the trash/wastebasket from the command line?

This would be great especially considering the latest version of Ubuntu is very slow when displaying directories on my PC...
2
votes
1answer
3k views

Why can I not copy a direcotry from *nix to a mounted smbfs share on Windows 7?

I've mounted a Windows 7 directory on my FreeBSD box via smbfs: mount ... //ROOT@BARYONYX/GVKV on /usr/home/gvkv/win (smbfs) but for some reason when I try to copy a directory: cp .vim /win I ...
6
votes
1answer
3k views

how to view a directory's permission

What is the command with which you can directly view the permission bits of a directory?
4
votes
2answers
2k views

ls'ing through an entire directory tree to produce one pipeable list of files

This might have been answered already. But I wasn't able to find it. I have: directory directory/subdirectory/subdirectoryofsubdirectory ...
61
votes
6answers
10k views

How does Linux handle multiple consecutive path separators (/home////username///file)?

I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...
14
votes
2answers
3k views

games directory?

On a standard filesystem, we have: /usr/games /usr/lib/games /usr/local/games /usr/share/games /var/games /var/lib/games Is this a joke, or is there some history behind this? What is it for? Why do ...
11
votes
3answers
12k views

How can I move files by type recursively from a directory and its sub-directories to another directory?

What would be a good way to move a file type from a directory and all of its sub-directories? Like "move all *.ogg in /thisdir recursively to /somedir". I tried a couple of things; my best effort was ...
1
vote
3answers
260 views

Directory filenames with sed with whitespaces

I'm working on a script and I'm stuck, even with the help of the google. Here's my code: for FOLDER in `find . -type d | sed "s#^.#$(pwd)#" | sed 's/ /\ /g'` do echo "$FOLDER" done This will ...
7
votes
3answers
9k views

How do I change folder timestamps recursively to the newest file?

I was wondering if anyone knows how to change the timestamps of folders recursively based on the latest timestamp found of the files in that folder. So for example: ...
103
votes
1answer
126k views

How to set default file permissions for all folders/files in a directory?

I want to set a folder such that anything created within it (directories, files) inherit default permissions and group. Lets call the group "media". And also, the folders/files created within the ...
2
votes
1answer
1k views

How to zip individual files from different directories in one line?

I want to zip numerous files from different directories(paths) in one line. How can I do that?
8
votes
2answers
967 views

the slash (/) after a directory name on shell commands

I have a little question here. If I have two files, say filea and fileb, mv filea fileb would delete fileb rename filea to fileb Then if I have two directories, say dira and dirb, mv dira dirb ...
8
votes
6answers
1k views

Best way run a command on each file in a directory tree

There appear be a number of ways to do this including loops in shell script, find and xargs. Which of these is best, and which is most portable?
37
votes
3answers
7k views

What does size of a directory mean in output of 'ls -l' command?

What does size of a directory mean in output of ls -l command?