A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
2answers
27 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 ...
5
votes
6answers
69 views

Exclude directories with 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 ...
20
votes
7answers
934 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
3answers
35 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
32 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
20 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, ...
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 ...
0
votes
1answer
20 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
1answer
31 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 ...
1
vote
0answers
64 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
1answer
79 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
22 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
163 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 ...
1
vote
2answers
128 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
35 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
31 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/ ...
2
votes
1answer
52 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
50 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
49 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
65 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
32 views

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

In linux, do file/directory rename/delete operations belong to write permission?
2
votes
4answers
114 views

Check in ksh if a directory is empty

How do I check if a directory is empty or not in ksh on AIX? If files exist I need to remove files only.
0
votes
2answers
41 views

Unable to view or change file permissions [duplicate]

I tried to view file permissions $ ll yaan/ ls: cannot access yaan/.: Permission denied ls: cannot access yaan/Nenje Nenje - TamilTunes.com.mp3: Permission denied ls: cannot access yaan/..: ...
1
vote
1answer
43 views

Make files in a directory not visible to anyone

So I am a newbie in Linux(Ubuntu) and want to make files in a directory invisible to everyone. Through invisible I mean that the file must not show up when I use the find * command. Any Help? My ...
3
votes
1answer
90 views

Triple dot wildcards

I have a very large directory structure of source code that is very difficult to work with. I would like to run a tool to transform it to a Maven like structure that works better for me. When I have ...
1
vote
0answers
41 views

Server Authorization directory incorrect ownership during linux mint installation

When installing linux mint 17.1 from a bootable usb onto a hard drive I get the following message: 'Server Authorization directory (daemon/servAuthDir) is set to /var/lib/mdm but is not owned by ...
0
votes
1answer
21 views

Permissions to see content

If the owner/group of a folder and/or is set to 0 0 (zero zero), can I see its content? I'm trying to access a directory with such permissions.
1
vote
1answer
34 views

Understanding directory symlinks traversals and the parent directory

Let's say you have directories /dir1 and /dir2/linked, where the later is a symlink to the former. When you cd to linked and pwd, you get the output /dir2/linked. If you then cd .., you'll be put on ...
2
votes
2answers
47 views

How to gunzip files present in multiple subdirectories in subdirectories

I am learning Linux and I was trying the gzip command. I tried it on a folder which has a hierarchy like Personal/Folder1/file1.amr Personal/Folder2/file2.amr Personal/Folder3/file3.amr ...
0
votes
3answers
42 views

/mnt directory is removed undesirable!

Accidentaly I have removed my /mnt directory... how can I restore it? with the exact permissions and etc??? This directory was empty.
2
votes
2answers
38 views

How to copy a folder by another, but NOT by merging/adding

I am doing backups of a directory with a simple: cp -R /production/directory /backups/location Sometimes I need to restore a backup, but doing: cp -R /backups/location/* /production/directory or ...
4
votes
2answers
708 views

Why does ls display a non-existing file?

I want to list all the files whose name begins with uppercase: [root@localhost /]# ls /usr/bin/[[:upper:]]* /usr/bin/AtoB /usr/bin/GenIssuerAltNameExt /usr/bin/PKCS12Export ...
0
votes
1answer
56 views

Hide directory listing? chmod 730 /home/share? [duplicate]

So I want to hide the listing of all files to a particular group, yet I want them to be able to create/read files in that same folder. The following permissions on the folder appears to work (write ...
1
vote
1answer
100 views

rsync recursively with a certain depth of subfolders

I want to rsync a folder recursively but want subfolders included only to a certain depth. For example I would want a depth of 1,2,3 or 4 subfolders like this: source/ ├── subfolder 1 │   ├── ...
1
vote
1answer
18 views

How to commit a directory in CVS?

I know CVS is pretty old but have to use it in company. Recently we have upgraded a library to the latest version. Now we want to replace the old library with new library. So basically we want to ...
0
votes
0answers
18 views

How can I set a folder undeletable but have R/W permissions to it's content [duplicate]

I have a directory which I'd like to mark as not deleteable, but have all the usual permissions of read/write/delete on all subdirectories and files. How can I achieve this? I tried setting the ...
0
votes
5answers
71 views

Difference between including / at the end of a directory path and and omitting it

I am just wondering is there a difference in what happens when I leave / at the end of a file path for example: root /var/www/website.com/ And omitting it like: root /var/www/website.com How is ...
1
vote
1answer
60 views

Tiny directory on ext4 file system taking up 2024 blocks? [closed]

I have an ext4 file system on my work computer and I came across a directory that is taking up >1 mb of space. There are 7 entries in the directory. The directory hasn't ever contained more than 20 ...
0
votes
1answer
11 views

Multiple users' access to directory

I'm running Arch Linux. My website's files are in /home/user/www/ directory. Another users also have their website's files in /home/foo/www/ directories. Now if I want to change something on their ...
-2
votes
2answers
68 views

Can I copy multiple directories into a single directory with a single command?

I have used photorec to recover data from a HDD and now have many directories /home/ray/recup_dir.1, to /home/ray/recup-dir.598 taking up valuable space in my Home directory. I want to copy them ...
1
vote
3answers
88 views

How can I determine if an NFS remote is exporting a directory?

In my script, I have several layers of statusing: remote is available (ping) remote NFS service is active remote NFS is exporting a certain directory remote NFS is mounted (mount) For (2) and (3), ...
3
votes
2answers
123 views

Symlink aliasing files in subdirectories without changing current directory

It seems like it should be simple to symlink one file to a new file in a subdirectory.... ....without moving subdirectories. But something about the syntax is perplexing and counter to what I would ...
0
votes
1answer
44 views

Is it a bad habit to move things to tmp?

Im not sure what type of issues this could cause (might be none, of course). But when I had a folder a few days ago that could not be deleted even after running: chflags nouchg -R and then sudo rm ...
1
vote
1answer
236 views

ls -lh vs du -sh * for file sizes within a directory

This might be a simple question to ask but I guess I am little confused in terms of 2 commands so I need help In a particular directory I have some files. If I want to check the size of the files, I ...
1
vote
2answers
144 views

How to change dir to the last directory?

I have very long directories list, like /dir/dir/dir/../../../../../../../../../.. ../../ ../../last dir Is it possible to change to the last dir immediately?
17
votes
3answers
500 views

Finding the correct tmp dir on multiple platforms

I have a script that needs to create temporary files for its work, and clean up after itself. My question is about finding the right base directory for the temporary files. The script needs to work ...
-1
votes
2answers
135 views

Cannot access a directory with permissions drw-rw-r— [duplicate]

I am having a very strange permission issue when trying to access any of the files in a certain directory as a specific user (adventho). This has been working fine for several months and I just ...
1
vote
2answers
37 views

May cp override subdirectories with the same name?

I downloaded an Adobe flash plugin, It includes a .so file and a directory called usr. In this folder, it has sub-folders like bin, lib, lib64, share. In the readme file, it says I need to do the ...
2
votes
1answer
160 views

How to count occurrences of all the words in all the files of a directory using grep? But with count incremented only once per word per file

I have already asked a similar question but people misunderstood what i was asking. I was asking how to generate a list of every word with a word count incremented only once per word per file. For ...