A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
0answers
5 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
44 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, ...
-3
votes
1answer
23 views

How do you copy a java file three directories above? [on hold]

I know that cp is for copy, and ../ is a directory above so would it cp (file name) ../../../? If so, is there a more efficient way to do this?
1
vote
1answer
21 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 ...
0
votes
0answers
27 views

Directory became UNIX binary (OS X)

I recently fixed the file permissions of my home directory using System Recovery mode. But after rebooting I found that one directory had become a single unix binary. I have tried everything from ...
1
vote
2answers
40 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
13 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. ...
2
votes
2answers
48 views

A folder with d?????????? in the ls -l

I am running the EDG-12.2.1-Trn (CentOS 6.6 64-bit) VM on Virtual Box. This is the Oracle Database VM. When I try sharing a folder, through VirtualBox, it shares successfully (automatically), and ...
0
votes
3answers
19 views

How to get second directory name in the perforce file path?

I need to get the directory in the second column after depot. For example given the below file(s) list, I need "Directory2" as the output. //depot/Directory2/Dir3/Dir4/Dir5/Dir6/Filename1 ...
-3
votes
1answer
24 views

How can get back to directory line from mysql line

So I'm not sure what exactly do but enter to mysql and now I cannot return to directory line. I show in picture what exacly I mean: My question is: How can from this directory go in: Here I ...
1
vote
1answer
22 views

How can I get a persistent dirstack with unique entries in zsh?

The Arch Wiki has this interesting bit of zsh configuration: DIRSTACKFILE="$HOME/.cache/zsh/dirs" if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then dirstack=( ${(f)"$(< ...
0
votes
1answer
27 views

(ls) command won't show exact size - Weird output [closed]

I am trying to find the size of the files on my hard drive in exact bytes, but whenever the size gets too big the number turns all weird (like 1.98329e+12). Can I stop it from doing this or convert ...
1
vote
3answers
167 views

tar excludes way too much

When running tar in /, how can i exclude e.g. "/sbin" while not also excluding "/usr/sbin"? Some details: It is widespread opinion that tar --exclude=dir only excludes "dir" and its subfolders seen ...
2
votes
2answers
36 views

List all the files in ending with several file extensions?

If I want files ending with .fas I know I can do the following with ls command : ls -l /users/jenna/bio/*.fas and this lists out all the files ending with .fas. But how can I get files ending with ...
1
vote
2answers
60 views

Why does Linux not allow `cat`ing a directory? [duplicate]

I read in The Design of the UNIX Operating System that directories are files containing the names of each file they contain. So I tried cating one on my Mac, and it resulted in an error: cat: ./: Is a ...
1
vote
1answer
28 views

Trying to get files into individual folders (1 folder for each file)

from the comments here: https://generateme.wordpress.com/2015/08/12/training-own-dnn-for-deep-dream/ I have around 15k images and each one needs its own folder. I ran this once, when I had fewer ...
1
vote
1answer
74 views

What is the number at the top for the results for ls -l? [duplicate]

When you type in ls -l, there is a number on the first line labeled "total 22037"? What does this number mean? I am attempting to write my own version of ls -l( in C), and how do I get this value or ...
1
vote
1answer
44 views

How to copy files from one directory to another so that only new files are copied? [duplicate]

How would it be possible to copy all new contents from one directory to another so that only new files are copied from the source directory (both directories have the same naming tree). For example, ...
3
votes
3answers
52 views

How do I create and automatically sync a “merged” directory from multiple other directories without duplicating files?

If I have some number of source directories, e.g. dir1, dir2... dir5, how can I create an automatically syncing "merged" destination directory that has all the files and directories of the source ...
1
vote
0answers
17 views

Denying access to multiple directories in vsftpd.conf

I am trying to use the deny_file directive to prevent users from accessing several directories inside a local root, using vsftpd. For example, I would like to forbid users from entering inside the ...
0
votes
0answers
18 views

Is this correct folder name `//` achieved via `cd //` [duplicate]

I never saw this before, nor I can track this via Google, and I thought interesting to share. If I set cd // and I pwd I get the output //. If I touch a.txt I checked this file belongs to / If I set ...
2
votes
1answer
28 views

What is the effect of “chattr +a” on a directory

The a Linux file attribute is often documented as applicable to files. chattr(1) manpage: A file with the 'a' attribute set can only be open in append mode for writing. ext4 wiki: 0x20 ...
1
vote
1answer
26 views

Moving non-writeable files vs moving non-writeable directories

I'm a bit puzzled about the following behavior (Linux, Debian 8.3, ext2 filesystem) test@linux:~$ ls -ld directory/ file drwxr-xr-x 2 root root 4096 Mar 10 18:51 directory/ -rw-r--r-- 1 root root ...
22
votes
8answers
1k views

Clipboard for copying and pasting files in command line?

In Bash, suppose I visit a directory, and then another directory. I would like to copy a file from the first directory to the second directory, but without specifying the long pathnames of them. Is it ...
1
vote
1answer
44 views

How to redirect file output to a different directory?

I have a program that regularly outputs files to a directory, let's say /a/b. I am utterly unable to change where these files are outputted. But for me to use them, I must first move them to, let's ...
-4
votes
1answer
39 views

how to move all files under one directory to home directory

I have the script files script1.ksh ...script10.ksh in the directory star2 PATH : home/aaa/star2 I need to move all the files under star2 to the home directory (home/aaa) NOTE : I do not want the ...
1
vote
1answer
42 views

What does @ in front of a directory name imply?

On my Synology NAS, when I do ls on my volume, I see that a few directories a leading @ in their names. A few also have a trailing @. What does this imply? Examples: @optware @autoupdate
2
votes
4answers
62 views

How can I tell my program to save in ~

I'm using a program which processes some data and then saves it to a file. It is possible to specify the directory in which the data is saved, however the program is badly written, so if I put ~ it is ...
0
votes
2answers
107 views

rmdir dir gives error 'Not a directory'

I have what looks to be a directory directory dir2, I once moved it from another directory dir1 to back it up and created a new dir1. Now I suddenly saw it again, realized I didn't need it and did rm ...
10
votes
2answers
155 views

Are there any filesystems for which `ln -d` succeeds?

From the manpage for ln: -d, -F, --directory allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the superuser) Are there any ...
0
votes
4answers
65 views

How to merge one directory into other?

May somebody tell me if there is there some way to "merge" one dir into another? I.e. let I have /some/directories/structure with subdirs/files. And now I want to "implantate" it into /etc for ...
1
vote
1answer
24 views

How do permissions on a directory affect files in it?

I just learned something that shocked me, because I did not have a clue it was a fact. If I have a directory with the following permissions: user@host:~$ ls -la testdir total 8 drwxrwxrwx 2 user ...
2
votes
2answers
57 views

Grep only in files that are in certain folders

I want to grep for interesting string, but only in specific folder/file combinations, such as myfolder/myfile.out. The directory I'm grepping from may have these combinations in subdirectories of ...
2
votes
4answers
110 views

Go through every subfolder, check for a folder and run script

I have a directory that contains subfolders of various depth. I want to go through all of them, check if they contain a folder with a certain name, and if that directory exists run a script (let's ...
1
vote
1answer
28 views

SUID has no effect on directories with Linux

Why does the SUID bit have no effect when applied to directories in Linux? I clearly see that I can set it with 'chmod u+s'. But why does it not have "any" effect. What is the reason for implementing ...
1
vote
2answers
33 views

Symbolic link ./././

So I was asked to create a link "..." like ../ but two go an extra level up in Linux. I understand that I must use ln -s to create a symbolic link, but I'm unsure where to go next. I am new to Linux ...
14
votes
7answers
593 views

Compact bash prompt when using a directory tree / filename

In a system with Ubuntu 14.04 and bash, I have the PS1 variable ending with the following contents: \u@\h:\w\$ so that the prompt appears as user@machinename:/home/mydirectory$ Sometimes, ...
1
vote
1answer
50 views

Access directory by modification date

Is there a way to refer to a directory by its modification date, like cd ~/$newest/subdirectory? I know that I could (and shouldn't?) parse ls, and I currently just use a hacky script that generates ...
4
votes
1answer
48 views

Is there a tool to create a hard link to an unlinked inode?

Assume you have a filename/directory name, whatever, which is hard linked to inode 6400. Alas, the file/directory actually exists (completely intact, and maybe it only lives in a single data block, ...
1
vote
2answers
129 views

How do get ls to list directories with a trailing forward-slash?

My shell is bash. How can I get the output of ls to show directories with a trailing forward-slash? When I do ls in tcsh it gives the desired output. How can I get this to occur in bash without ...
2
votes
1answer
63 views

Cd into the no name directory

I am in my flash directory # cd /media/Flash/ # ls -al drwxrwxr-x 10 root root 4096 Feb 22 14:35 . drwxrwxr-x 7 root root 4096 Feb 20 15:57 .. -rw-rw-r-- 1 root root 2024 Feb 17 09:17 file1 ...
4
votes
2answers
41 views

octal dump of directory

I got a copy of The Unix Programming Environment by Kernighan and Pike from a garage sale. I'm very interested in the chapter about the UNIX filesystem. Naturally, I also found this passage very ...
1
vote
1answer
26 views

DirectoryIndex not redirecting

I am fairly new to apache and was a SQL Server database admin in a former life so please forgive my ignorance. I am trying to set up an Apache web server (HP-UX flavor) to conform with the DOD STIGs ...
-2
votes
1answer
31 views

How to get files from broken directory? [closed]

I created some files and directories on external NTFS HDD using Ubuntu. Some folders displayed with cross sign, I changes permissions for them (777), now they just as a files. Copying of directory ...
1
vote
1answer
83 views

Directory permissions “r-s”, chmod 655 does not change to “r-x”, why?

I created a directory in my home directory. and I set its permission as follows: uhmwk.1.4$ chmod 655 dog uhmwk.1.4$ ls -l total 4 drw-r-sr-x 2 s9 s9 4096 Feb 14 21:57 dog why is the group ...
1
vote
1answer
25 views

Bourne Shell do while loop returns all the data but has two errors no such file or directory and repeats the shell name

The idea of my loop is to print the first digit of every line of a file. The file being this: 256-56-8411 Bob 3.61 Junior CS 471-44-7458 Tim 3.45 Senior CE ...
1
vote
1answer
56 views

Get the real, apparent size of a folder

I am using the du command in order to get the size of the folder. As I am interested in the actual size I ended up with the following command: du –sh --apparent-size <someFolder>/ In this ...
3
votes
2answers
47 views

When can I omit the dot character that indicate the current directory

Should I use dot to indicate the current directory for accessing directories or should I use it for files only? For example, if the current directory is foo and it contains bar directory and baz.txt ...
4
votes
3answers
155 views

How can I rename a directory with name made of non-printable characters only

On SunOS I have directories with names containing only non-printable characters. The command ls -ldb * returns the following (some spaces deleted) drwxr-xr-x 3 user1 group1 3 Feb 4 18:10 ...
0
votes
0answers
45 views

Script file that lists contents of current folder

I have OS X, but I'm guessing it should be the same as in other Unix OSes. I know the command is: #!/bin/bash ls > contents.txt Then you put it into a file called: script.command then you ...