A file system structure in which to store computer files.

learn more… | top users | synonyms

3
votes
1answer
146 views

Exit bash when find gets to a folder with permission denied

I'm trying to write my second Bash script. Where i go through folders recursively and make a list of and count files and folders. In a way it works but if "find" gets to a directory where it has ...
1
vote
3answers
190 views

How to identify if a direcory is created by System or a root user?

How to identify if a directory is created by Linux system and by user like root. Example: in /etc there is a directory named sys which is created by Linux. And I logged in using root and created the ...
0
votes
0answers
21 views

xfs directory quota doesn't work

now I have two tasks and I wanna run them in different directory and limit the directory's size. I use xfs's project quota to achieve this. I follow the steps from ...
0
votes
0answers
4 views

“[unixODBC][Driver Manager]Data source name not found, and no default driver specified” When using Teradata ODBC Drivers

I am running a PHP script on a RedHat server using Teradatas ODBC drivers. <?php $conn = odbc_connect("Teradata", "username", "password"); $result = odbc_exec($conn, 'SELECT count(*) FROM ...
4
votes
3answers
70 views

How to remove space in all sub directories in shell script?

I tried following shell script to remove all spaces with underscores: find $1 -depth -name "* *" -print0 | \ while read -d $'\0' f; do mv -v "$f" "${f// /_}"; done If I have a directory ...
5
votes
1answer
39 views

Why is mtime and ctime changing for a directory when a file is modified?

I am learning about atime, ctime, mtime with regards to files and directories. It seems to me that if I modify a file within a directory, I haven't changed the "directory file" itself in its idode or ...
1
vote
1answer
22 views

List folders greater than 10G and mail to respective owners about the usage

In our environment, we have an NFS mount which contains all users home directories. I want to find the users who's home directories sizes are greater than 10G and need to send a notification to them. ...
4
votes
2answers
67 views

Preventing the creation of a specific directory

I'd like to cover the basis on a vulnerability which tries to download itself and save the result in a newly created directory inside the /tmp/ directory. To be on the safe side, I wish to make it ...
1
vote
1answer
55 views

directory permissions [closed]

I'm currently working on a PHP server explorer, and I have to determine if a directory is empty or not readable because of insufficient permission. My web application is running under the user ...
15
votes
3answers
777 views

Can I make a public directory under a private directory?

I have a personal folder /a/b on the server with permission 700. I don't want others to list the contents in /a/b. The owner of /a is root. Now I need to open the full authorities of directory /a/b/c ...
1
vote
0answers
15 views

Using rsync with the verbose option and filtering the information displayed

I am using rsync with the -a -r and -v options to copy files and directories from one server to another. This all works fine. But when I make a change, for example, to a single file on the source ...
2
votes
1answer
25 views

Directory traversal cache eviction despite having plenty of memory?

I have a huge Mercurial repository (take a guess how many directories it has -- it's gonna be more than you guessed). The time taken to do basic repository operations is heavily dependent on whether ...
2
votes
1answer
267 views

How to do ls with a wildcard and see the directory name

I have a directory called selenium_IDE if I do ls sel* I get to see directories that are in it, e.g. $ ls sel* HAPPY HAPPY_PLUS_OPTIONS SAD SAD_PLUS_OPTIONS but ...
3
votes
3answers
101 views

Bulk remove a large directory on a ZFS without traversing it recursively

I want to remove a directory that has large amounts of data on it. This is my backup array, which is a ZFS filesystem, linear span, single pool. The data is in this pool called san, mounted on /san ...
0
votes
0answers
12 views

What permissions apply if specific user's permission on file or directory differ from user's group to which this user belong to in Linux? [duplicate]

Case 1: User has "rwx" permissions to certain file or directory. But has no permissions "---" in group it belongs to. Question: who wins - Does user have "rwx" or "---", effectively (not what's ...
1
vote
2answers
27 views

Find and move directory to a new directory based on name [duplicate]

I would like to move all the folders contained in the folder "/example" named e.g. "*_jony" to a new directory call "/jony". I have try several way without success! It would be great to have some ...
2
votes
1answer
39 views

Output file generated by tar

tar can be used to gather a whole directory into a single file. I tried with the sample directory sampledir containing just some text files, with no subdirectories. Originally the directory occupies ...
1
vote
1answer
21 views

What happens to my files if I scp-ed to non existing directory

Here's what I did: copied some files from server to my local computer scp root@remotemachine:/var/log/nginx/* /home/me/logs deleted the files on the server The next moment I realized, that I ...
0
votes
1answer
57 views

usr/bin appears empty

I'm trying to make a program (Thunderbird) run at startup, but when I go to usr/bin it seems empty. However, if I run $ which Thunderbird in terminal, it tells me /usr/bin/thunderbird. The usr/bin ...
4
votes
2answers
46 views

Can I store and work with a directory in compressed form?

I have to work with many large sized directories which are shipped around in the form of tarballs. However, in order to really do any operations these tarballs have to be untarred into directories and ...
1
vote
3answers
55 views

script for copying directories with particular increment

I have directories which are named as 0.1, 0.15,0.2, 0.25, 0.3,0.35 and so on. Now I want to copy directories at particular increments say of 0.1 together to a separate directory. Say directories ...
0
votes
5answers
93 views

List only the count of all files/directories for the directory tree of present directory

I want to list the number of directories under each subdirectory tree of the present directory. As there are too many directories, I can't go into individual directory and check. Something like the ...
16
votes
3answers
998 views

Simple way to see the content of directories in Linux/UNIX file systems

In the past, I learned that in Linux/UNIX file systems, directories are just files, which contain the filenames and inode numbers of the files inside the directory. Is there a simple way to see the ...
0
votes
2answers
31 views

update-alternatives returns error about Java directory not available

I've been trying this tutorial: How To Manually Install Oracle Java on a Debian to install Java on Debian 8, but I'm getting the following error : update-alternatives: error: alternative path ...
1
vote
1answer
69 views

Listing directories and understanding ls

On ls man page, I saw this -d, --directory list directory entries instead of contents, and do not dereference symbolic links on my current folder: drwxr-xr-x 2 oracle oinstall 4.0K Jul ...
2
votes
1answer
46 views

What is a non-contiguous directory?

When I run fsck, I can see the following line: 182 non-contiguous directories (0.1%) What kind of directories are the non-contiguous ones? Is there a way to make them to be contiguous somehow. How ...
2
votes
0answers
29 views

How do I vmtouch a directory (not the files it contains)?

The vmtouch(8) tool allows locking a file or files in memory. It has recursive mode, but the directories are used just for discovering files and are not locked themselves. How do I lock a directory ...
0
votes
4answers
62 views

Copying Only Directories With Files

I am trying to copy files and the directory it is in to another location. I can find the path like this: find ~/dim_import/* -type f ! -name xdir | cut -d '/' -f 5-10 which outputs ...
0
votes
4answers
86 views

given a file, find where within a subdirectory it was copied to

Given a file that I know has been copied into a given directory, I want to find the exact path where the file copy now resides. It is guaranteed the file has not been edited and will look exactly like ...
0
votes
0answers
17 views

New files in a mounted directory are being created with a different user and removing write permission for other users

I am running a python script that outputs files into a mounted directory on a different computer. The script can be run multiple times in a way that overwrites the contents of created files. However, ...
4
votes
2answers
94 views

sudo rm -rf returns “cannot remove directory” on empty directory owned by root

I have a directory on my Debian system. The directory is: root@debian:/3/20150626# stat 00 File: `00' Size: 6 Blocks: 0 IO Block: 4096 directory Device: fe00h/65024d Inode: ...
0
votes
1answer
30 views

Command to delete directories whose contents are less than a given size

I'm working in a directory ~/foo which has subdirectories ~/foo/alpha ~/foo/beta ~/foo/epsilon ~/foo/gamma I would like to issue a command that checks the total size under each "level 1" ...
4
votes
1answer
155 views

Making the current directory as if it were where an absolute path starts

I'm wondering if there is an application that makes it so that commands after it operate in an environment that treats the working directory as if it were the top-most one, and there is absolutely no ...
0
votes
1answer
35 views

Copying directories to directories with different names

How can I copy a number of directories: directory_01 directory_02 directory_03 to different directories tmp_directory_01 tmp_directory_02 tmp_directory_03 where each tmp_directory_* directory ...
0
votes
2answers
34 views

Why is there a minor number in /dev for directories such as pts?

This is a part of /dev in CentOS 6.6. What is the meaning of the minor number for directories like ., .. , bsg, block and ... ? drwxr-xr-x. 18 root root 3800 Jul 3 06:00 . dr-xr-xr-x. 21 ...
0
votes
2answers
78 views

Is it possible to create a virtual directory in Linux?

Like this way in Windows mklink /D Virtual_Folder_Here Real_Folder_Here. I was unable make work alias in Apache virtual sites in Windows so I made a virtual directory. Is this possible in Linux too?
1
vote
2answers
36 views

How to remove data in / directory [duplicate]

I would like to know what is contained in the "/" directory and is it capable of utilizing 50GB. My system all the 50GB allocated to "/" had been utilized. I want to know what to delete if want to ...
0
votes
1answer
31 views

Find directory names with N occurences of a set of characters

Sorry in advance, I know there are hundreds of posts about find, but I genuinely don't understand what's happening here and haven't been able to find a definitive answer to this question: how to match ...
1
vote
1answer
73 views

Bash script to detect a file modified yesterday and check if its size is above a certain threshold

I'm writing a script to stat all files in a directory, and then find specific files that were created yesterday and tell me if they are larger than a certain size or not. So basically I need this to ...
4
votes
1answer
35 views

Why can't another user access my file when it's a full path?

I have a program that runs a command that is something like this: /home/myuser/bin>> /usr/bin/sudo -u otheruser script.py /home/otheruser/file.txt This works, but now I need this to work when ...
1
vote
1answer
35 views

Creation of symlinks

I am following the tutorial http://www.olindata.com/blog/2013/12/building-ha-cluster-openvz-drbd-heartbeat-and-pacemaker. I got up to here: symlink folders in /var/lib/vz to /etc/vz The /etc/vz has ...
0
votes
1answer
52 views

Copying files containing specific text preserving directory structure

Using the code in this answer, I can easily copy a file containing specific text from one folder to another. With the -r option I can also search inside directories recursively. The result is that ...
3
votes
4answers
151 views

Touching issue: Creating a filename from 2 variables

I am trying to create a filename from 2 variables. This is the error msg: touch: cannot touch `/root/tinstalls/2--06/06/15': No such file or directory 2--06/06/15 19:54 This is the code: ...
1
vote
1answer
49 views

AUFS only changes permissions of the topmost directory

I have two writeable directories branch1 and branch2 tied together with AUFS on Debian 8 to the mount point union. Mount options: br=branch1=rw:branch2=rw branch1 and branch2 each contain a ...
2
votes
2answers
96 views

Copy certain files from specified subdirectories into a separate subdirectory

I want to copy all .fastq files from every subdirectory that ends in '_CSF' into another already created subdirectory, dir1_CSF. I understand how to copy certain files but not from certain ...
4
votes
3answers
105 views

Find largest files from each date in a directory

I have a directory similar to the following: -rw-r--r-- 1 root root 223K Apr 28 14:25 2015.04.28_14.25 -rw-r--r-- 1 root root 253K Apr 28 14:55 2015.04.28_14.55 -rw-r--r-- 1 root root 276K Apr 28 ...
1
vote
2answers
274 views

How to see if the directory exists?

How can I check if /bin/x86_64/bin/ls is a directory in a bash shell script Here is what I tried: #!/bin/bash if [ $# -eq 2 ]; then if [[ "$1" = /* ]] then cd ./bin/x86_64/bin/ls ...
1
vote
2answers
40 views

User cannot see directory permissions

I'm working in Ubuntu 3.13. The permissions on a drive are such that the owner can see directories and files with these permissions: drwxrwxr-x 2 michael atlas 4096 Feb 15 12:34 temp2 ...
5
votes
6answers
124 views

How to find out whether two directories point to the same location

Do the following paths point to the same disk location? /home/username /app/home/username
2
votes
2answers
50 views

Selecting a random sample from a directory tree

I've got a directory that contains directories that contain directories that contain files. I'd like to select two files at random from each leaf directory. I found this question about selecting ...