A file system structure in which to store computer files.

learn more… | top users | synonyms

2
votes
1answer
30 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
280 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
97 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
32 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
53 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
58 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
58 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
42 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
1answer
82 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
66 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 ...
0
votes
4answers
36 views

Find a directory created today

How can I find a directory whose name starts with cy and that was created today?
0
votes
1answer
54 views

Delete ghost files with special characters

I have read several ways to delete files with special characters, but none of them works for me in one special folder in my cache system. I have no idea how the files got there, and why they turned ...
3
votes
1answer
38 views

Fine-tune LS_COLORS for directory suffixes?

I’m fine customizing most settings in LS_COLORS. I don’t need help customizing the colors for different file suffixes. What I would like to do is configure special colors for certain directories, ...
4
votes
3answers
54 views

How to securely delete a directory without leaving a trace?

I already know that using shred will overwrite my files in such a way that leaves them unrecoverable. However shred can't be used to hide directories. Error Message: failed to open for writing: ...
9
votes
3answers
639 views

Why are some files and folders hidden?

I can understand the rationale of hiding files and folders in the /home/user directory to prevent users from messing around with things. However, I do not see how the same rationale can be applied to ...
6
votes
1answer
343 views

Expand ~, . and `..`

Since ~, . and .. are special directories, why are they handled differently in the following example? $ echo ~ /home/tim $ echo .. .. $ echo . . ~ is expanded into the dir, but the other two are ...
0
votes
3answers
59 views

How do pwd and . determine the current path differently?

Is it mainly because pwd is not a builtin, while . is builtin to the bash shell? For example, they differ in the following example: /tmp/ttt$ mv ../ttt ../tttt /tmp/ttt$ pwd /tmp/ttt /tmp/ttt$ cd . ...
3
votes
5answers
74 views

How to find and empty some directories

I'd like to find and delete the contents while leaving the directories themselves intact. The following find /data1 -name MyTargetDir -type d -exec rm -rv {} \; and find /data1 -name ...
27
votes
8answers
2k views

How to delete this undeletable directory?

I untarred a corrupt tar file, and managed to end up with some directory that I can not delete, If I try to delete it, it seems like it can not be found, but ls shows it's present, both with bash and ...
3
votes
2answers
70 views

Move every file that is not a directory

I have a directory that I am trying to clean out that contains both files and subdirectories. What I am trying to do is simple: move all the files into another directory, but leave all the ...
4
votes
2answers
39 views

Create new temporary directory

What's an effective way of creating a new /tmp directory, that behaves just like /tmp (purged on reboot, etc.), but in a different location? In my case, I want to create a ~/dev/tmp directory where I ...
2
votes
4answers
106 views

Change to the last modified subdirectory of the current directory

I have an application which generates a couple of files in different directories at a regular interval and I need to check the latest files generated, i.e. the file which is generated in the most ...
0
votes
0answers
15 views

What are differences between directory order and alphebetic order with `ls`? [duplicate]

What are differences between directory order (-U) and alphabetic order (by default) with ls? They return the same order of a dir's contents to me.
0
votes
1answer
39 views

“Links” to dirs that have features of both hard and soft links?

It is not allowed to create a hard link for a dir. But the soft like will not work, if I later change the name of the dir. How would you solve the dilemma? Are there applications which can ...
5
votes
4answers
234 views

Ways to organize and access frequently visited directories and files?

In my Ubuntu, I have added some frequented directories to the bookmarks of Nautilus, for visiting them quicker. Nautilus can consume a lot of memory, when it has been kept open for long and there ...
2
votes
3answers
52 views

copying parallel directories Why does cp -r work this way?

The following works correctly (ie does what I want) cd /var/www/release/ mkdir wiki cp -rp ../html/wiki ./ However if I do (what seems more intuitive) cp -r ../html/wiki ./wiki it will ...
3
votes
2answers
131 views

Valgrind /usr/lib files are not regular Linux files

The problem that I encountered today (on an embedded device with Linux) is that some files (specifically, the Valgrind /usr/lib files) are behaving very strange and they are not copy-able with scp ...
0
votes
0answers
13 views

In Ubuntu, what is the folder in which MySQL's UDF should be installed?

I am using Ubuntu 14.04. I wonder where should I install binary UDF for MySQL. Is there any way to discover the path of the UDF directory? Is there a standard for this in Ubuntu?
4
votes
5answers
320 views

Bash pattern to match all files but directories

In bash, how do I specify a pattern that matches everything but subdirectories in current directory. Given that the pattern */ matches all the subdirectories, I tried (with extglob turned on): $ echo ...
0
votes
3answers
38 views

cd to the most recently created directory [duplicate]

I have a directory in which a number of directories are created daily. I want to enter into the directory which is created recently whose name starts with cy. How can I find this directory? Could ...
1
vote
3answers
152 views

Removing a directory that has no files in it

I recently created a username and a group called gamesForAdmin. Since then I deleted it and the folder I made for it is still there: drwxr-xr-x 5 root root 4096 Jul 4 11:28 . drwxr-xr-x ...
0
votes
1answer
33 views

remove special character from files in directory

I need to remove special characters from all .htm files in a directory. Ideally I need to keep the file name but if I have to I can copy each file to 1 or something like that. Here is the command I ...
2
votes
1answer
64 views

Create directory using filenames and move the files to its repective folder

I have a folder with around 150 text files. I would like to create folders in the name of the 150 files. After that I would like the text file to be moved to its respective folder. Example names of ...
1
vote
2answers
53 views

Do Links to /tmp files get deleted?

I have a script that creates a temp directory using mktemp -d. A folder generated in the temp directory is the output of the script that will be copied to another part of the machine. I was ...
9
votes
4answers
369 views

Recursively iterate through files in a directory

Recursively iterating through files in a directory can easily be done by: find . -type f -exec bar {} \; However, the above does not work for more complex things, where a lot of conditional ...
1
vote
1answer
132 views

Trouble installing lxml with custom install location for libxml2/libxslt

I am attempting to install a python module called lxml to my account on a supercomputer running RHEL. I do NOT have root access or super user status. lxml requires the dev/devel versions of libxml2 ...
3
votes
2answers
108 views

Find files in directory with paired names

I'm running tests of a variable-size-and-contents test set. Data files are added and removed frequently. I'm looking for an automated way of gathering a file list. All files are in subdirectories of ...
1
vote
1answer
62 views

Only write permission for a directory doesn't allow to rename (move) files inside?

In fact, I would like to ask more general question -- "what does write permission for a directory allow you to do exactly?" -- but let's approach it with a concrete example. It is a long question, if ...
1
vote
2answers
64 views

tar compression without directory structure

Under my current directory, I have two sub-directories: dir_1/ - file1.png - file2.png ... - fileN.png dir_2/ - fileA.txt - ... - fileZ.txt When I tar compress the two ...
0
votes
1answer
27 views

Moved folder into other has now disappeared

Two folders in same directory and I wanted to move one into other with command mv foo /foo2 but now foo has vanished.
9
votes
3answers
351 views

How to spoof/mock a directory used by a binary application as another directory?

Suppose there's a binary application that always writes its data to /tmp. How could I spoof/mock /tmp for the sake of this binary as some other directory (e.g. home/tmp)? Let's assume I have no ...
3
votes
3answers
180 views

Return to directory location prior to cd-ing to home directory

As is well known, cd without an argument changes one's current directory to their home directory. I am wondering if there is any way, after using the cd command like this, to return to the directory ...
2
votes
2answers
111 views

inotifywait different action on file or dir

I'm trying to make a inotifywait script take different actions for files vs folders if it sees a close_write flag being raised in the watched directory, but cannot seem to get the checks working. In ...
4
votes
4answers
828 views

Can the /home folder in Linux contain anything else but user folders?

Can the /home folder contain anything else but user folders? I have a folder I want to share between Windows and Arch - can it go in the home folder under a name not belonging to any existing user? ...
2
votes
3answers
128 views

What is the difference between path and directory?

I don't understand the difference between path and directory. Could someone explain to me with examples?
2
votes
0answers
42 views

One way diff between 2 directories

I am looking to perform a diff between 2 directories, both of which contain may files and subdirectories. I am hoping to perform a one-way diff between a source and target directory that will return ...
1
vote
1answer
55 views

lost directory cannot find it with testdisk

I was moving a directory on my parents computer using a teamviewer session. The session responds slow and somehow, when I was moving the directory (location: /sdb/synchronisatie/nel/) something went ...
4
votes
2answers
76 views

setting default permissions with setfacl

I am trying to set default permissions on my directory structure using acl. I would like to have following default permissions for directories and for files respectively: drwx--x--- -rw-r----- but ...
1
vote
1answer
92 views

untar specific directory

tar tvf filename.tar gives me: -rwxrwxrwx 0/0 544795 2010-03-15 12:49 35 WOO WORDPRESS THEMES/bloggingstream.zip -rwxrwxrwx 0/0 1659095 2010-03-15 12:51 35 WOO WORDPRESS ...