A file system structure in which to store computer files.

learn more… | top users | synonyms

3
votes
2answers
93 views

Are there widespread filesystems which represent directories with structures optimized for fast lookup?

In "The Art of Unix Programming", on the topic of The Terminfo Database I read: If you look in the terminfo directory, you'll see subdirectories named by single printable characters. Under each ...
0
votes
1answer
9k views

enable apache mod rewrites to load clean-urls

In CentOS, a2enmod rewrite results in “command not found” but httpd -M lists rewrite module as listed and shared. I'm trying to enable it so can then have these rewrite rule apply so I can switch back ...
9
votes
4answers
36k views

How can I list subdirectories recursively?

The obvious ls -dR does not work. I am currently using find /path/ -type d -ls but the output is not what I need (plain listing of sub-folders) Is there a way out?
0
votes
1answer
12 views

Find out home directory of running Oracle instance

There are two oracle directories on our system: oracle oraclex How can I find out which of them is used by the running Oracle instance?
14
votes
5answers
1k views

How is a directory a “special type of file”?

I am reading this Unix tutorial and came across this quote... We should note here that a directory is merely a special type of file. ...but no explanation or details are provided. How is a ...
1
vote
2answers
22 views

Diff directories using modification time (mtime) and size instead of contents

Is there an option to have diff (-q) not look at file contents and instead just look at size and mtime? If not, is there a tool similar to this that has the option?
0
votes
3answers
35 views

How to count subdirectories in a directory in UNIX?

I have to count the total number of directories that are in the given directory (note that these are subdirectories). I know how to count for files but am having trouble counting the directories for ...
1
vote
1answer
53 views

Sticky bit and users with sudo permission

Let's say I chmod 1777 a folder /opt/test and all files inside it as user user1. Hence user2 is able to update and edit files inside the /opt/test directory. When user2 operates via sudo, he's able ...
1
vote
3answers
8k views

using root to mkdir in another users home directory

having a bit of a difficult time trying to create a folder under another user's /home/devuser1/pubic_html folder. I'm trying to avoid using sudo and looking for an alternative. The permissions on the ...
2
votes
1answer
44 views

How to scan a directory with a space in its name with maldet

I'm trying to scan some directories with Linux Malware Detect (command-line command maldet): maldet -a /SOMETHING\ 1/ But I get: maldet(13857): {scan} invalid path /SOMETHING 1/ I've tried ...
1
vote
1answer
73 views

Bash script won't work on current directory

I'm using Kali linux which is based on Debian and wrote an script to copy some files from where the script is based to a specified directory. But when I execute my script (called CopyFiles.sh), cp ...
8
votes
4answers
259 views

How do you check if a file exists within awk? [-d 'filename'] failing

I'm trying to generate a list of users who have a home directory set which does not exist. It seems I should be able to do this with awk, but something is wrong with my syntax. It keeps telling me ...
1
vote
0answers
13 views

Centos 7 FTP Hidden Directory Issue

After setting up Centos 7 with a web server standard install and LAMP stack. I installed vsftpd. Everything works fine and configured it to accept passive to enable gui ftp programs. However, when ...
0
votes
2answers
39 views

How do I run find, maxdepth and other commands on lcd while using ftp?

I have got the command working locally using normal commands. I now need it to run while using ftp. I understand I need to use '!' And instead of copy I will need to use put so it works on the lcd, ...
0
votes
1answer
31 views

Copy tree directory from specific point

I am now sure how to word this, but: I am copying all the newest .zip files each recursive sub directory inside this original folder: "/Users/Stu/Documents/Hoffi Work/FTP Backup Shell ...
4
votes
2answers
2k views

I want to tar X directory not including its parents

tar cvf /var/lib/backup/sample.tar /home/user/.project However, when I extract, I get its parents as well /backup/ - /home/ - /user/ - .project/ This tar commands does it job ...
1
vote
1answer
922 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 ...
5
votes
6answers
90 views

Exclude directories in locate search

A search with locate finds paths in the filesystem. Often, you know a priori you are interested in either files only, or directories only. A 'locate' search often returns many results. It would be ...
54
votes
6answers
9k 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 ...
9
votes
2answers
4k views

Why can't I have a folder and a file with the same name?

I've never had this problem before, but for some reason, I can't rename my folder to packages/. This is the structure: root - packages_old/ - packages When I try to rename the folder with ...
21
votes
7answers
1k views

`command .*` acts on the parent directory

Someone of our team wanted to recursively change the user permissions on all hidden directories in a users home directory. To do so he executed the following command: cd /home/username chown -R ...
2
votes
1answer
34 views

Why does chmod succeed on a file when the user does not have write permission on parent directory?

I am trying to understand file/dir permissions in Linux. A user can list the files in a directory using cd test ls -l Even if the user issuing above commands does not have read, write or execute ...
11
votes
10answers
8k views

How do I create a directory in all subdirectories?

Suppose I have a directory structure like this: $ [~/practice] ls a/ b/ c/ d/ Now I want to create a directory tmp1 in all sub directories of practice and I do this: $ [~/practice] mkdir */tmp1 ...
0
votes
2answers
48 views

selectively moving partially matched files to different directories

I am working in linux server where a parent directory I has 100s of partially numbered files, e.g GGG12345_abb.txt GGG12346_abc.txt GGG12347_cbx.txt . . GGG19045_jha.txt each of which is ...
2
votes
3answers
58 views

Can a file be edited with the 'write' permission on it but not on its parent directory?

Suppose the owner/user doesn't have the write permission on a directory but he has it on a file under it. Can the file here be edited or not? If yes, is there any situation where the file cannot be ...
0
votes
0answers
35 views

rsync question about a directory

I went ahead and used rsync to back up a root directory called /files my exact commands werersync -avzh /files willc66@server.com:/backup, inside my /files directory I had 2 sub directories home and ...
2
votes
3answers
21 views

list all symbolic links to valid directories only with find

I can use find /search/location -type l to list all symbolic links inside /search/location. How do I limit the output of find to symbolic links that refer to a valid directory, and exclude both, ...
1
vote
1answer
63 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
1answer
21 views

. as a command line argument to a command running in background

I run grep some-string -r . &. While it is running in bkg, I cd to another directory. It seems that grep interprets the hard link . differently then. What happens before and after I change the ...
1
vote
1answer
37 views

How directory permissions remain same after mv command?

There are two user A & B. sharing same server. A has created a directory with permission 700 and both user and group are same i.e. user A e.g. drwx --- --- A A temp_dir/ Now user B has ...
0
votes
1answer
25 views

Rename and copy/move sets of similar named directories to another location

For a set of directories with similar names at different location, /foldX/dirA with sub-directories aa1 aa2 aa3 aa4 aa5 /foldZ/dirA with sub-directories aa1 aa2 aa3 /foldY/dirA with ...
1
vote
0answers
72 views

rm: Directory resources is not empty

I'm getting this kind of error when i'm deleting file on my AIX machine. Getting same error for rmdir. venky-19:[/hm/dev/application/backup/ear/] # rm -rf resources rm: Directory ...
2
votes
4answers
433 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 ...
2
votes
1answer
88 views

Uncompressing .tar.gz archive to specific directory

How does tar.gz file gets uncompressed with all contents to arbitrary directory, existing or not using tar using single line command? If it does not exists, then is created (directory). To clarify, ...
2
votes
1answer
23 views

Sandbox an account and prevent it from any system modifications

I am trying to sandbox a user account to the point where it cannot edit or view any files beyond a certain folder, namely /home/user/test. This account will be compiling and running a C++ program that ...
0
votes
2answers
48 views

Cut a string up to a certain character [closed]

I've searched the site and I've seen similar questions but I couldn't get them to work. I tried to follow: Splitting a string up to a specific location but it didn't work. I working with Korn. I ...
0
votes
5answers
197 views

How to get current working directory? [duplicate]

I want to have a script that takes the current working directory to a variable. The section that needs the directory is like this dir = pwd. It just prints pwd how do I get the current working ...
5
votes
2answers
4k 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? ...
9
votes
3answers
3k views

Stay at same working directory when changing to sudo

When working on the command line, I often change to sudo using sudo -i. However, my working directory changes automatically to /root. I never want to go there; I want to stay where I was! How can I ...
1
vote
2answers
133 views

Does change of a file in a directory not change the time of the directory?

I want to find a file which I created recently, but I don't remember anything and can only guess it is under a directory indirectly with any possible depth. I inspected the times of all the ...
2
votes
1answer
37 views

what is directory entry?

I have to use the dirent.h in some of my C projects. According to various different descriptions found online, I have come to a vague idea that directory entry is a data structure, which tells us ...
2
votes
1answer
32 views

When does adding `/` to a directory change its meaning?

When does adding / to a directory change its meaning? E.g. from Linux in a Nutshell: Transfer the entire directory proj to the /planning directory on remote host ourhub: $ rsync -r proj/ ...
15
votes
7answers
66k views

How to remove all the files in a directory?

I am trying to remove all files and subdirectories in a directory. I used rm -r to remove all files, but I want to remove all files and subdirectories, excluding the top directory itself. For ...
43
votes
6answers
9k views

The result of ls * , ls ** and ls ***

I know using the command ls will list all the directories. But what does the ls * command do ? I used it and it just lists the directories. Is the star in front of ls means how deep it can list the ...
2
votes
1answer
63 views

Why can't a group member create a file in a directory with 760 permissions? [duplicate]

I have an account with secondary group membership in a group that owns a directory. The directory is chmod 760, which should allow writing to the directory, but not listing it. However, this is not ...
1
vote
1answer
52 views

No such directory after creating it

I'm taking a basic Unix course and right now we're learning terminal. My directions are create a directory called company and subdirectories called sales, accounting and marketing. So I did that. ...
1
vote
1answer
50 views

Using the test command to create a directory if it doesn't exist

I was just wondering whether or not this script code would properly test for the existence of a dir2, and if it doesn't exist, then to create it. Dir1 already exists. [ ! -d /dir1/dir2 ] && ...
2
votes
1answer
67 views

Is it possible to access any file or dir within a non-accessible directory? [duplicate]

Say I set my home /home/john directory as not readable for any other user. But I've forgotten to do so with some files within that directory, say ./.bashrc or ./Downloads/Presentation.ppt. Now, if ...
0
votes
1answer
38 views

linux (general) file/directory rename/delete operations under os permission scheme

In linux, do file/directory rename/delete operations belong to write permission?
20
votes
7answers
14k views

Merging folders with mv?

If I move a folder with mv called "folder" to a directory that already contains "folder" will they merge or will it be replaced?