A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
1answer
37 views

Copying files from one sub directory to another

I think I must be missing something obvious. I am in a directory called AmHist, with 2 subdirectories, Assign and Resources. I want to move 2 files from Assign to Resources. I try cp LinuxHist ...
2
votes
4answers
64 views

Extract the directory path containing the file with matching string

I have multiple subdirectories at multiple levels containing a file results.out ./dir1/results.out ./dir2/dir21/results.out ./dir3/dir31/dir311/results.out Now i need to search for string1 in ...
1
vote
2answers
39 views

inaccessible directory

I git cloned into a directory "/source" before I mkdired it. It did not show up in its parent directory, but when I run the ls command, the output is indented like this: database static ...
1
vote
1answer
22 views

Rename all the folders by removing specific part of first digits or characters from it is name

I have a long list of folders as follows: 001_bat_3513 002_mon_3213 003_bat_3515 scd_btt_3540 s52_bat_4513 xx2_bpt_8523 056_bot_3513 058_bat_1513 . . From this list: How can I rename all the ...
0
votes
1answer
23 views

Copy folders has specific part of name and it is content

I have a long list of folder as follow: 001_bat_3513 002_mon_3213 003_bat_3515 004_btt_3540 005_bat_4513 055_bpt_8523 056_bot_3513 058_bat_1513 . . From this list: How can I copy the folders ( and ...
0
votes
1answer
33 views

Create folders from specific parts of lines in a text file

I have parent folder includes sub folders. In every sub folder I have folders as follow: Parent_folder folder1 folder_01_PAP_515151 folder_02_PAPA_554651 folder_03_PAPX_541313 ...
2
votes
3answers
41 views

Find a specific file in the nearest ancestor of the current working directory

I'd like to find a way to find a given file by looking upward in the directory structure, rather than recursively searching through child directories. There's a node module that appears to do ...
0
votes
1answer
19 views

Create directory from files and move files

I want to move files based on a specific pattern. I was working with this code, but it does not work well with the task. for file in *.fastq.gz do dir="${file%R*}" mkdir -- "$dir" mv -- "$file" "$...
1
vote
1answer
33 views

wget not downloading files recursively

I saw some of the posts on this website about how to download files from a directory recursively. So, I executed the following line: wget -r -nH --cut-dirs=3 -A '*.bz2' -np http://www.xfce.org/...
0
votes
0answers
28 views

File not createable in one directory having the same permission as another directory where it is

Trying to create a file in one directory works, whereas in a sibling directory with owners and permission copied, the same errors out with Permission denied. (touch as root works in both directories.) ...
1
vote
2answers
42 views

Get `scp path/` behave like `rsync path/`

I have local file structure: /tmp/24 /dir1 /file1 /file2 /dir2 /file3 /file4 and I want to upload it to remote compute. When I use rsync /tmp/24 host:/...
0
votes
1answer
35 views

Centos, uploaded files from application have different owner and group [duplicate]

I have an application that uploads a file via SFTP using sftpuser. Once the file is uploaded the owner and group is user1:user1. The owner of the parent directory is apache:apache. I can not figure ...
3
votes
3answers
44 views

Ignore specified absolute directories with tab completion?

I work on a cluster with many users. There are 50 users on the cluster with the same first letter as my username, and a user who has the same name up to the last letter. When I tab complete from /home/...
1
vote
2answers
47 views

How to display the contents that give rise to the sizes that `ls -l` reports for directories?

I understand that the sizes that ls -l reports for directories reflects the space taken up by the "metadata" for those directories. Also, I imagine that this metadata exists in binary/non-human-...
0
votes
1answer
36 views

Cannot change directory at /home as root user (Permission denied) [closed]

I am using GNUroot debian ( an android app ) and after many attempts to connect with ssh to my server I now have no access with cd at my /home folder as a root user. I can run ls /home but I cannot ...
3
votes
1answer
444 views

Print recursively all directories and subdirectories

I am trying to print all directories and sub directories with a recursive function but I get only the first directory. Any help? counter(){ list=`ls $1` if [ -z "$(ls $1)" ] then ...
1
vote
2answers
83 views

How to zip directory with encryption for file names?

Using command line, I know that I can encrypt a directory with the following command: zip -er Directory.zip /path/to/directory However, this does not encrypt the filenames themselves. If someone ...
34
votes
2answers
6k views

Why can't I remove the '.' directory?

I tried removing the '.' directory. I thought I could just delete my working directory without having to go into a parent directory. The point of my question is to look for some insight into how the ...
1
vote
0answers
37 views

How to set folder permission with + at the end?

I'm trying to mount a network shared device in a linux box. I get permission issue but it was mounted properly in another linux server. The only difference on the server it works has a + permission at ...
1
vote
0answers
25 views

Removing dirs with lots of tiny files on Lustre

I have a dir with a gigantic amount of very small files that I want to remove and simply removing the dir with "rm -rf /path/to/the/dir" is already taking multiple days. It might sound strange that ...
2
votes
2answers
35 views

Change Name of Mounted Hard Drive

I just mounted and formatted an extra hard drive to Xubuntu, and the name is way too long for access from the terminal: boy@boy:~$ cd /mnt/d1b2aa11-a3e4-434b-b71c-47a8ac23ac23/ boy@boy:/mnt/d1b2aa11-...
2
votes
1answer
33 views

Find and list duplicate directories

I have directory that has a number of sub-directories and would like to find any duplicates. The folder structure looks something like this: └── Top_Dir └── Level_1_Dir ├── standard_cat ...
1
vote
1answer
33 views

Can I replace a directory with a symlink without write permissions in parent?

I would like to replace a directory with a symlink. For the directory itself I have full permissions (rwx), but for the parent directory I don't have write permissions (r-x). Is this possible? The ...
-1
votes
1answer
19 views

On a OS X machine, how can remove a directory that has name “--crm”? [duplicate]

I am trying to remove a directory that has the name --crm. When I do rm -f -R '--crm' I get the following error: rm: illegal option -- - usage: rm [-f | -i] [-dPRrvW] file ... unlink file I ...
1
vote
1answer
27 views

Group or world writable directory

I'm trying to use a script but get the following error: Directory is group or world writeable. This is insecure, since any malicious user can trick you to write newly generated private key into his ...
2
votes
1answer
42 views

Can directories and file inherit same permissions as parent directory?

I want all directories and files to inherit same permissions as parent directory.
-1
votes
2answers
48 views

How to find Directories that updated last day in linux?

I have a problem, like I need to find the directories that got updated yesterday. I tried using find command but its listing all the files that got updated in the directories. But I need only the ...
0
votes
1answer
10 views

“find” doesn't list all files under specific directories

I'm attempting to get a list of all files under specific folders, recursively, with the "find" command. find / -path "/usr/sbin/*" -o -path "/usr/bin/*" -o -path "/usr/local/sbin/*"-o -path "/usr/...
2
votes
1answer
41 views

How to change name of “~” directory? Debian 8 [duplicate]

I was providing an install directory for SteamCMD to install a server to, but it created a "~" directory as the parent directory for the directory I wanted. Example: /home/steam/SteamCMD/~/...
2
votes
0answers
57 views

how to find duplicate folders inside main folder [closed]

I've moved a lot of files and folders from my old nas to my new smb share. The problem is that someone made entire copies of nearly every folder on that thing. And I need the space. I'm currently ...
-1
votes
1answer
50 views

Sub Directories in sub directory using loop

On my CentOS machine, I need to create a main directory inside which I will have a few sub directories and, inside them, some subsubdirectories. Something like: main_directory->sub1,sub2,sb3.. ...
-1
votes
1answer
29 views

Move all sub-directory content up one level

My top level directory contains a bunch of sub-directories: af ar ca cs da de el en ... (lots more) Each of these directories has the exact, same structure. They contain two directories: v2.3.0 ...
0
votes
1answer
32 views

Get parent directory in cshell script

Hi I'm trying to get parent directory in cshell script but the following code found not working in cshell script: #!/bin/csh -f set dir=$PWD set parentdir="$(dirname "$dir")" Error info: Illegal ...
0
votes
3answers
33 views

wget’s --output-document= option failed when contain ~ character

I wright a documentation so I prefer use long options because it’s self-descripting. --output-document= is more readable than his short equivalent -O. Then, I have to indicate a file in the home ...
3
votes
4answers
442 views

Bash script detecting change in files from a directory

I am a beginner in bash scripting and I am trying to make a script that detects if any of the files in a directory were changed within a 2 seconds interval. What I have so far is: #!/bin/bash for ...
2
votes
1answer
54 views

Prevent sudo user access to specific folder and files [duplicate]

How can I restrict sudo access to a specific user in the /var directory or its contents?
1
vote
2answers
44 views

How to use cloc to find lines of code in a debian package

cloc - statistics utility to count lines of code Now the manpage mentions that it can be used to count lines of code of a tarball cloc perl-5.10.0.tar.gz Now a debian package is just like a ...
1
vote
2answers
36 views

How to get all subfolder names consisting of uppercases only?

How to get the folders in a parent folder, the names of which are composed of A-Z, without lowercases, underscore, dot or any other things?
0
votes
2answers
33 views

Man directory layout — why the subdirectories?

Man expects the man directories listed in $MANPATH or $(manpath) to be split by section into directories named "man$section". This duplicates the section information that is already available in the ...
1
vote
1answer
45 views

Limited access to a directory's contents

There is a file in a directory that me and the other users want to be able to read. I want the other users not to be able to see the other files in the directory. They should be able to read a ...
2
votes
1answer
156 views

Why can I cd to // but not /// or //// or ///// or … [duplicate]

When I change directory to //, it seems to put me in a special directory that is very similar to but slightly different to /. However, trying to add any further slashes (///) simply drops me in /. $ ...
1
vote
2answers
54 views

expand wildcards “inside a command” instead of in the shell

(This is a simplest working example of something in a much messier context.) I have a directory d with files 1.txt 2.txt 3.txt 4.wav. My current directory is somewhere else. ls d reports 1.txt 2.txt ...
1
vote
2answers
76 views

How do I remove all files from wtihin a certain directory except for a child directory of that directory?

I’m using bash shell. I have this command to delete all JAR files within a particular directory find ~/.jenkins/jobs/subco/ -name '*.jar' -print0 | xargs -0 -r rm However, I want to modify the ...
1
vote
0answers
23 views

How do I set up user quota for /var/www?

I want to add quota per user in my Apache2 webroot. My /var/www directory is not a partition. I've found tutorials on how to set up quota for partitions, but how do I set up /etc/fstab without moving ...
1
vote
2answers
31 views

How to work with symbolic links to directories

I am experimenting with symbolic links and I'm encountering a couple issues. The first is how after following a symbolic link to a directory to display the actual working directory instead of the ...
0
votes
1answer
29 views

rsync wants to resend files after a recent run

I am using rsync to keep two directories in sync. Specifically I ran: rsync -avz /path/to/src /path/to/dest After this command finished, I ran: rsync --dry-run -avz /path/to/src /path/to/dest ...
2
votes
2answers
58 views

Delete directories that contain a certain file

I want to find all directories that contain a certain file and then delete those directories. With find . -name thatcertainfile -execdir pwd \; I get a list of all the directories I want to delete, ...
1
vote
1answer
58 views

How does 'Create New Folder' short-key work?

In many file managers there is a shortcut/key to create a new folder. In Nautilus, Thunar, Panthon-Files, this is Ctrl+Shift+N, in Dolphin it is F10. How does this shortcut work? I imagine that ...
1
vote
2answers
43 views

Detect and remove empty directories from list

A common problem game developers have with the Unity3D engine and Git is that Unity and Git fight for whether an empty directory should exist or not - Git doesn't care, Unity3D will keep making git ...
0
votes
2answers
23 views

Ubuntu: Installing programs into specific locations

I have software which is built using a makefile. This makefile also contains (relative) paths to different programs (such as gsoap, postgresql and others) which provide stuff that I need to include. ...