A file system structure in which to store computer files.

learn more… | top users | synonyms

4
votes
3answers
467 views

How do I point certain directory to /dev/null?

I am running CentOS with cPanel, which creates a custom log directory and writes the logs there. The result is that the IO for the hard disk goes sky high. If I do lsof I got: hostsite.com httpd ...
4
votes
2answers
221 views

Dots in path name

I am receiving an error from an application I am running. The error looks like this: john@john-replacement:~/Desktop/yarbu-1.4.8/bin$ sudo yarbu-engine --VERBOSE /usr/local/bin/yarbu-engine: line ...
5
votes
3answers
249 views

What's the best way to list size of / in Terminal?

I want to see how much total space / is taking, but I don't know how to do that. I can use ls -hal and add up the subtotals, or I can use fdisk to tell me the size of that partition, but is there a ...
4
votes
2answers
256 views

How to lock a directory?

I want to block any kind of access to a certain directory unless a password is provided. It could be my root or account password. The directory is residing on an NTFS partition, and this method needs ...
1
vote
2answers
181 views

Dir diff and removal

Is there a simple way to (recursively) remove all files from a directory A that are identical (same name and same hash) to files in directory B while preserving the structure? e.g. A/file1 gets ...
0
votes
1answer
111 views

Create a File with Touch on a specific Directory

I want a create a file with a specific extension(.done). I am using the command touch. Something Like: touch `basename $UNZIPFILE`".done" It's creating the file but in current directory. I want to ...
3
votes
1answer
631 views

Find all folders in a directory with the same content

In Ubuntu, is there any to find duplicate folders in a directory (i. e., folders with the same content)? I think there are already some command-line tools available for finding duplicate files (such ...
0
votes
2answers
158 views

/: is a directory issue in bash

I'm quite new to bash scripting and have been going reasonably well but have run into an issue. I am trying to create a script that uses a forward slash (/), however, I keep getting the error message ...
0
votes
1answer
4k 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 ...
1
vote
1answer
755 views

How to unzip a directory inside a zip file

I want to unzip a certail directory inside a zip file using the following command: unzip -oq vqmodmanager.zip upload -d temp/ But the system gives the following error: caution: filename not ...
1
vote
1answer
121 views

How to change the current directory graphically using the keyboard only?

There was a program named NCD (Norton Change Directory) a few years ago that did a good job at helping me change directory back in the DOS days. This programs displayed a tree, and you could navigate ...
2
votes
2answers
234 views

I can not remove folder from server

Accidentall I created the folder on remotely server (Server OS is Linux) using php: mkdir("folder_name",0); Now I can not delete this folder from server. I think this is from permission, because 0 is ...
4
votes
4answers
1k views

How to visualize directory tree structures?

I know I can use tree to show the nested content of a directory. Alas, its output is hardly beautiful as I want to include it in a documentation. So eye-candy is a requirement. So I was wondering if ...
0
votes
2answers
112 views

Change/Create permissions for a folder

How can I create (if the folder is new) or change (if the folder was already existent) permissions for a folder? In particular, I want to create a subdirectory in /etc/bind/ where I can put the ...
4
votes
1answer
540 views

Does tar -x Extract to Current Directory or Does it Extract to the Source of the Archive?

Does tar -x by default just extract to the current directory or does it try to reproduce the original directory structure including overwriting the original source? I know I can specify a folder to ...
0
votes
1answer
179 views

pwd resolving symbolic links [duplicate]

Possible Duplicate: pwd without symlinks Imagine I have a directory /home/me/dir and a symbolic link to it called /home/me/dirlink now if I enter dirlink and use pwd, it of course ...
3
votes
1answer
3k views

rsync compare directories?

Is it possible to compare two directories with rsync and only print the differences? There's a dry-run option, but when I increase verbosity to a certain level, every file compared is shown. ls -alR ...
0
votes
2answers
432 views

Home directory vs Working directory

In unix like systems what is the difference between a home directory and working directory ?
1
vote
3answers
220 views

I want to run commands like make, make install, python setup install without changing directories

I have written a script which will download software from the internet to the current user's home directory and then untar it. And then I have to make and make install it and in some software I have ...
5
votes
1answer
456 views

Why could the size of the “dot file” /. exceed 4096?

Today I found an "empty" directory with a size of 4MB. It had no visible contents, so I tried ls -lah. This showed me some hidden files (not very large). Searching for the reason why the directory ...
7
votes
4answers
2k views

pv for directory copy

I need to copy a very large directory (talking in terabytes here) and want to monitor the progress. I found that pv is a nice utility, but how can I use it for copying directories recursively? (pv ...
1
vote
1answer
146 views

What does - mean with association to Linux files and directories [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? What does '--' (two dashes) mean with association to Linux files and directories. I've found something else but not too sure if it is ...
1
vote
1answer
523 views

Very basic question, ls a different directory and save file

I seriously can't understand where I'm going wrong with his question. The first part is. List all the file and directory names in /etc which have 1 or more numbers in their name. Remember to use ...
1
vote
4answers
214 views

Ghost directory in home directory

I am using following command to check the disk usage in my home direcory. du -sk * | sort -n I am getting the following output 273240 AQP 707720 oradiag 3176872 J2EEServer 23628720 var ...
2
votes
2answers
697 views

How to prevent users from deleting a directory?

I tried "chattr +i DIRNAME", it's great, but I cannot create files in the DIR after chattr. What else are there to prevent users from deleting a Directory? root@HOST ~] mkdir test [root@HOST ~] ...
2
votes
5answers
1k views

Get the newest file from directory structure year/month/date/time

I store backups of databases in a directory structure year/month/day/time/backup_name an example would be basics_mini/2012/11/05/012232/RATIONAL.0.db2inst1.NODE0000.20110505004037.001 ...
2
votes
1answer
263 views

Hide parent directory but allow to view dir

I would like the following result on my UNIX system: ls -l /users/test -> permission denied, or any other way so I can't see the content of it. ls -l /users/test/testdir/ -> shows all files in the ...
1
vote
1answer
144 views

Rename directory based on date of file in directory

I am looking for a smart way to bulk rename directories in my photo library based on the date the pictures were taken. My specific use case: Export the image library from iPhoto or Aperture on OS X ...
1
vote
1answer
917 views

cannot 'ls' /mnt directory

I have a CentOS-6 machine that I'm working on that is running a live database. It's having a problem with the /mnt directory. I cannot ls the directory for some reason. stat is working and shows ...
3
votes
2answers
484 views

Why is bash giving me (apparently) conflicting information about a file?

Background I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1 I asked Bob to give me permission to read all contents of inputs: [bob@server]$ ...
5
votes
3answers
735 views

How to set an alias on a per-directory basis?

Suppose you have an alias go, but want it to do different things in different directories? In one directory it should run cmd1, but in another directory it should run cmd2 By the way, I have an ...
1
vote
2answers
194 views

Get directory that script was called from

I have a script doSmth in /usr/bin. Is it possible to print the directory the script was called from is printed out by the script? So If I call doSmth from /home/me the output will be /home/me.
11
votes
3answers
2k views

Flattening a nested directory

This is probably very simple, but I can't figure it out. I have a directory structure like this (dir2 is inside dir1): /dir1 /dir2 | --- file1 | --- file2 What is ...
2
votes
2answers
568 views

Using wildcards to match a directory in bash

Lets say the folder structure is like so: /home/ --user1/asdf --user2/asdf1234 --user3/asdf325234 --cool/asdf How could I change to asdf1234 without specifying the user? For example: cd ...
5
votes
3answers
776 views

vim: How to switch to the directory listing from file view?

I have opened a dir vim some/dir. I can navigate within the tree, yet once I opened a file I wonder, how do I close the file view in order to go back to the directory listing to navigate to another ...
5
votes
2answers
431 views

How to go back n levels of directories from the command line?

For example, I do the following cds in succession- cd /tmp cd /home/admin cd /root/ cd /some_other/directory Now I am in /some_other/directory. Now, is there anyway to go back to /tmp, the ...
2
votes
1answer
244 views

How come I can append to files to a directory without write permissions?

I understand this first example: > mkdir foo > chmod u-w foo > touch foo/test touch: cannot touch `foo/test': Permission denied > echo "BAD" >> foo/test bash: foo/test: Permission ...
13
votes
3answers
2k views

When should I use a trailing slash on a directory? [duplicate]

Possible Duplicate: How linux handles multiple path separators (/home////username///file) Most commands I use in linux behave exactly the same whether I include the trailing slash / ...
3
votes
3answers
383 views

How can I automate the process of copying files from one folder to another in Centos

I have a statistical application which runs every minute and creates charts accordingly. In order to make these charts available to other users, I need to copy the whole folder containing the charts ...
1
vote
3answers
109 views

Restructuring directories into a hierarchy

I have the following type of folder structure containing thousands of folders. The folder names are as such with different names etc .test .test.subfolder .test.subfolder.subsubfolder .folder ...
0
votes
2answers
4k views

How to change the working directory of invoking shell using a script? [duplicate]

Possible Duplicate: changing current working dir with a script I am trying to create few scripts that would change the working directory of the main shell/terminal. Not able to do so. I ...
11
votes
1answer
204 views

How to log all the events performed on directory?

How can I log all the events performed on a particular directory? I want to log the entry of each directory modified within some time duration. I am using find . -type d -mmin -5 command. In ...
1
vote
6answers
2k views

ls: Do not show directories that match same pattern in wildcard searches, only files

Supposing I have something like the following, a typical business PC situation: drwxr-xr-x 1 whatever whoever 3 Oct 3 16:40 invoices2009 drwxr-xr-x 1 whatever whoever 4 Oct 3 16:40 ...
6
votes
0answers
97 views

What's the size of a folder entry? [duplicate]

Possible Duplicate: What does size of a directory mean in output of 'ls -l' command? user@~ > ll /tmp/foo drwxr-xr-x 2 user user 4,0K 1 oct. 15:15 bar What are those 4,0K ? ...
2
votes
1answer
73 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 ...
2
votes
4answers
6k views

How to permanently change the file/directory permission [closed]

How do I change the permission of file/directories such that I am able to create, edit, delete files/directories anywhere in my system? Currently I am using Ubuntu 12.04. I tried sudo chmod 777 -r ...
3
votes
2answers
3k views

undo rm -r, restore data

I was playing around with zip and accidentally deleted my /home/ folder (i wanted to delete home/ which got created by unzipping an archive). I used rm -r /home/instead of rm -r home/ as root... Is ...
1
vote
2answers
840 views

Create and move to a directory in one command - unix [duplicate]

Possible Duplicate: Is there a one-liner that allows me to create a directory and move into it at the same time? I know this is a very basic question but I can't seem to figure out what to ...
4
votes
2answers
95 views

Quicker Way to Reference a Directory?

This one is probably easy for all of you, but I have never had to deal with such a nested local set of directories. If I have a path like: /mnt/media2/Archived\ Files/_Transfer/ is there a way to ...
9
votes
5answers
3k views

Creating numerous directories using mkdir

I would like to create many directories using mkdir. Each directory name will consist of a prefix (a string) and an index (an integer). Suppose that I would like the prefix to be "s" and the indices ...