Questions tagged [directory]

A component of a Unix filesystem which contains other items, to organise the filesystem

Filter by
Sorted by
Tagged with
543
votes
7answers
2.7m views

Change folder permissions and ownership

I would like the user to have full rights on this folder (as well as all sub-directories and files in it): ~/.blabla currently owned by root. I have found numerous posts (in this forum and ...
419
votes
7answers
1.1m views

What does “cp: omitting directory” mean?

I've issued the following command: sudo cp ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/ When I do this, I start getting the following messages: cp: ...
307
votes
2answers
222k views

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin

I have six directories with command files. These are /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin. What are the differences between these? If I'm writing my own scripts, where ...
201
votes
8answers
876k views

Find a file by name using command-line

I would like to determine the location of a file using command-line. I have tried: find . -type f -name "postgis-2.0.0" and locate postgis-2.0.0 to no avail. What is the command to determine the ...
168
votes
5answers
334k views

mv: Directory not empty

I want to move content of a directory within another directory with the same folders. Here's an example: I have ./backup wich have the directories base and test. Now I want to move these directories ...
134
votes
4answers
184k views

Why are hard links not allowed for directories?

I am using Ubuntu 12.04. When I try to create a hard link for any directory, it fails. I can create hard links for files inside file system boundary. I know the reason why we cannot create hardlinks ...
132
votes
2answers
395k views

How to extract a zip file to a specific folder?

I have a zip file that I need to extract into another folder. When I set up extraction to said folder it says "permission denied". I've read here how to log into a terminal as root and superuser but ...
128
votes
4answers
629k views

How to Search for Files Recursively into Subdirectories

I am trying to look for all XML files in a particular directory and all sub-directories (recursively) inside it. ls -R *.xml is only listing files in the current directory. I am quite sure, the sub-...
121
votes
7answers
186k views

Is there a way to create multiple directories at once with mkdir?

If I wanted to create multiple directories (on the same level) and then feed it a comma seperated list of directory names (or something to that effect)?
92
votes
7answers
220k views

How to open a folder (with GUI) from terminal?

I want to place a link/shortcut/launcher in my unity panel (ubuntu 12.10). I followed this tutorial on handytutorial.com to create a custom launcher and drag it to the panel. I just need to know ...
89
votes
6answers
150k views

How to encrypt individual folders?

Let's say that I have a folder, within my Documents folder, that has files I want no one to access without a password. Is there a way to lock down that folder so that it's password protected / ...
84
votes
3answers
45k views

Dropbox error - 'echo 100000 | sudo tee / proc/sys/fs/inotify/max_user_watches'

Dropbox gives me an error that mentions echo tee 100000 but then it disappears. How to fix or remove msg?
80
votes
5answers
101k views

Is there a standard place for placing custom Linux scripts?

I am developing a set of scripts, which I want to be present for all users, when I set up a server. But I don't want them in the standard locations like /usr[/local]/[bin],[sbin] etc. Is there some ...
76
votes
5answers
71k views

Difference between 'dir' and 'ls' terminal commands?

I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional UNIX method of viewing the files in a directory, and that dir is the windows ...
74
votes
1answer
299k views

Copy folders (not one file) using SSH ubuntu? [duplicate]

I am trying to copy a folder to remote Ubuntu server using command line ssh connection, i understand it's doable to transfer a file using scp but i have many files in a folder iam trying to copy to ...
72
votes
2answers
183k views

How do I mount a folder from another partition?

Is there a command to mount a folder from one partition to my main partition? Example of what I'd like to do, which obviously doesn't work: mount /media/tc1/folder /home/dvad/home If not by using a ...
67
votes
3answers
73k views

Use of /opt and /usr/local directories in the context of a PC

What is the difference between /opt and /usr/local directories and what kind of programs should be installed to them? I referred to Linux File-system Hierarchy but the explanation is not that clear. ...
66
votes
7answers
71k views

Is there a tool to encrypt a file or directory?

What's the most popular way to encrypt individual files or folders?
65
votes
6answers
176k views

Move home folder to second drive

I have 2 HDD drives in my computer. At the moment second drive is mounted as /media/storage. How can I move my user data from /home to /media/storage/home? Can I just move the data over there and ...
62
votes
12answers
323k views

How to search for all the files starting with the name “ABC” in a directory?

I need to search for files starting with some particular name. There can be multiple files starting with a particular pattern and I want to list all such files present in the directory.
59
votes
5answers
68k views

How do I delete all empty directories in a directory from the command line?

Say I have a directory named foo/. This folder includes subdirectories. How can I delete all the empty directories in one command?
58
votes
6answers
51k views

How can I add a bookmark in my nautilus folder explorer

In Ubuntu 11 I just dragged the folder there. This seems to be not possible on my new Samsung ultrabook with Ubuntu 12.04 I've tried Ctrl+D and using the top menu but nothing happens and no error ...
57
votes
7answers
287k views

how do you copy a directory and its contents to a new location under a new directory name?

I'm new to the Linux command line and am trying to get to grips with the copy command at the moment. Can anyone please tell me if it's possible to copy a directory with its subdirectories and ...
55
votes
11answers
190k views

How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash?

Is there a command to remove all files and subdirectories in a directory without deleting the directory? For example if I have directory dontDeleteMe with subdirectories 1, 2, 3 and each subdirectory ...
55
votes
6answers
69k views

How to customize (add/remove folders/directories) the “Places” menu of Ubuntu 13.04 “Files” application?

I can't seem to find a way to customize (add/remove folders/directories) the "Places" menu in the most recent "Files" application of Ubuntu 13.04. The procedures used with "Nautilus" in the previous ...
54
votes
1answer
48k views

Where is KeePass2 plugins directory?

Where is the KeePass2 plugins directory? I'm using Ubuntu 12.04 LTS.
52
votes
4answers
210k views

How to find a folder on my server with a certain name?

I have a directory somewhere on my server wth the name "exampledocs". I tried to find it's location using: ls -d */ | grep -E 'exampledocs' and find * -regextype posix-extended \-regex '...
52
votes
6answers
14k views

How can I hide directories or files without changing their names?

The OCD in me wants directories I do not like the name of to be hidden since I do not interact with them directly. How can I hide directories without using the dot notation?
50
votes
3answers
227k views

Use chown to set the ownership of all a folder's subfolders and files?

How can I use the chown command to change the ownership of all a folder's subfolders and files?
48
votes
5answers
10k views

Accidentally created directory named “~” (tilde)

I managed to make a directory literally named ~. (Apparently, Python's os.mkdir('~/something') does this.) How do I remove it without nuking my home? Also, if it helps, I have my real /home on a ...
44
votes
2answers
164k views

How can I check the folder permissions in ubuntu server 12.04?

Right now, I know that I can change permissions for example with: sudo chmod 550 directory I wonder how I can check the actual folder permission.
42
votes
3answers
52k views

How can I assign custom icons to folders?

How do I assign custom icons to folders, as well as the default folders Desktop, Downloads, Music, etc.? I know that one way is to assign the properties of folders, but I want to assign icons in the ...
41
votes
5answers
38k views

Create a link to a folder on the left panel of Nautilus file manager?

I would like to create a link to some new folder that I have in my home. The left panel shows docs, images downloads etc. But I would like to add my other folders that I created myself like university ...
39
votes
4answers
534k views

How to write the path of a folder with space in its name? [duplicate]

I can't figure out how to write the path of a folder that includes spaces in its name (in Terminal). I tried: cd /path/path/path/"A Folder"/file cd /path/path/path/'A Folder/file cd /path/path/...
36
votes
3answers
65k views

Is it safe to delete a lost+found folder?

I have an empty seperate partition used for my vhd/virtualbox. mounted at /mount/win7. I've deleted everything now and there's a lost+found folder left over. It takes up about 5gigs Is it safe to ...
34
votes
4answers
151k views

how to find a word in text files from a directory [duplicate]

Suppose that I have a directory with name _file and includes two sub directory like _1 and _2 and on each one I have some text files. I want to search a word like foo in one of these text files. How I ...
33
votes
7answers
134k views

Folders showing lock icon

Whenever I open my documents, all the folders in it are displayed with a lock icon. Therefore, I cannot delete any file or folder in it. I tried changing the root access using sudo chmod user:...
32
votes
2answers
136k views

How do I give www-data user to a folder in my home folder?

I have a folder: /home/myuser/folderA I want to give the www-data user write access to the above, while 'myuser' continues to have normal access (as it is myuser's home folder anyway). Which ...
30
votes
6answers
155k views

Get a list of all files in folder and sub-folder in a file

How do I get a list of all files in a folder, including all the files within all the subfolders and put the output in a file?
29
votes
4answers
23k views

Where should I keep my personal files while keeping the pathname short?

I was a Windows user and am new in Linux environment. I just installed Ubuntu two days ago and I am confused about the directories such as lib, etc, var, tmp, mnt, etc. I've few questions. What is ...
29
votes
5answers
274k views

How to open a folder in linux via terminal? [closed]

How can I open a folder in a dir? say I change my current directory to: cd /root/dir/ then I list all the files there: ls folder1 folder2 folder3 Now I want to open folder1. If I try the "./" I ...
29
votes
8answers
23k views

Which Folders To Include In backup?

I'm quite new to Ubuntu and want to create a backup. I'm really not sure what files and folders to include so that if I restore my system it will be as it is now. I can't seem to find good details of ...
28
votes
5answers
48k views

Is it bad practice for folder name to contain dot (.)? How about file name with multiple dots?

Sometimes it makes practical sense for a folder name to contain a dot (.). For example, you are storing data for an experiment conducted at L=0.5. So the folder might be named: experiment_L0.5 A ...
28
votes
2answers
197k views

How can I give full permission to folder and subfolder

I'm new to Ubuntu and need to create a new folder in /var and need all users on the machine to have full permissions to this folder. How should I proceed?
27
votes
4answers
65k views

What does rm -rf do?

What does rm -rf do when used to remove files or directories? How do the -r and -f options work together?
27
votes
2answers
16k views

Why is my desktop the same as home folder?

My desktop (not the /home/user/Desktop folder) shows the contents of my /home/user folder. I don't know how I have done it and can I have some help on undoing it? The /home/user/Desktop folder just ...
27
votes
3answers
183k views

How to make a directory permanently writable?

I am using LAMP stack for development and I have a problem with making /var/www permanently writable. I use this command: sudo chmod -R a+rwX /var/www This works, but after putting a web app and ...
26
votes
4answers
331k views

How do I navigate between directories in terminal?

I am new to Linux and Ubuntu and have tried changing to folders/directories with some difficulty. Could someone explain why the following commands failed to change to the desired target folder/...
25
votes
3answers
43k views

How to get chmod (octal) permissions of the folder in the terminal?

I can look in properties of this folder but I want to get properties fast and in digits (octal, e.g. 755, etc.) What am I to type in terminal to know the chmod of the file or folder I want?
24
votes
6answers
3k views

Why is it possible to move a running program in Ubuntu?

I just realized I am able to move a running active program to a different directory. In my experience that was not possible in MacOs or Windows. How does it work in Ubuntu? Edit: I thought it was not ...

1 2 3 4 5 33