Questions tagged [directory]

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

1969 questions
510
votes
2 answers

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 should I add them? Related: How to…
user125111
480
votes
7 answers

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: omitting directory `Tag' cp: omitting directory `Test' cp:…
MEM
  • 11,305
345
votes
10 answers

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 file's directory, provided its name?
Sam007
  • 4,803
321
votes
3 answers

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 can't find anything to help me. I need to extract…
Tj Cooke
  • 3,319
311
votes
8 answers

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 which has the directories base and test . Now, I want to move these directories to ./backupArchives . I use this: mv ./backup/*…
UdK
  • 3,113
232
votes
7 answers

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)?
BGroat
  • 2,495
222
votes
6 answers

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 for files beyond file system. I tried these…
Nischay
  • 3,831
214
votes
5 answers

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-folders themselves have several .xml files, but…
Shamim Hafiz
  • 2,484
166
votes
7 answers

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 which command do I have to input. Is this possible?
Tiago
  • 1,811
140
votes
7 answers

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 associated files to a new directory with a new name, e.g.…
Edmuntu
  • 1,413
126
votes
12 answers

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.
R11G
  • 1,603
122
votes
6 answers

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?
TellMeWhy
  • 18,154
  • 44
  • 102
  • 143
120
votes
1 answer

Copy folders (not one file) using SSH ubuntu?

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 that remote server, how is that done? anyone? Thank…
aero
  • 1,335
120
votes
2 answers

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 command, is there another way I can do this?
user100541
  • 1,303
116
votes
5 answers

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 existing convention for where such scripts should…
vfclists
  • 1,979
1
2 3
…
99 100