A file system structure in which to store computer files.

learn more… | top users | synonyms

1
vote
2answers
14 views

Find and move directory to a new directory based on name

I would like to move all the folders contained in the folder "/example" named e.g. "*_jony" to a new directory call "/jony". I have try several way without success! It would be great to have some ...
2
votes
1answer
36 views

Output file generated by tar

tar can be used to gather a whole directory into a single file. I tried with the sample directory sampledir containing just some text files, with no subdirectories. Originally the directory occupies ...
1
vote
1answer
18 views

What happens to my files if I scp-ed to non existing directory

Here's what I did: copied some files from server to my local computer scp root@remotemachine:/var/log/nginx/* /home/me/logs deleted the files on the server The next moment I realized, that I ...
-1
votes
1answer
41 views

usr/bin appears empty

I'm trying to make a program (Thunderbird) run at startup, but when I go to usr/bin it seems empty. However, if I run $ which Thunderbird in terminal, it tells me /usr/bin/thunderbird. The usr/bin ...
4
votes
2answers
44 views

Can I store and work with a directory in compressed form?

I have to work with many large sized directories which are shipped around in the form of tarballs. However, in order to really do any operations these tarballs have to be untarred into directories and ...
1
vote
1answer
22 views

How to change default directory programs get installed

I have Debian wheezy chrooted in my Android. However all its directory is in my internal memory. So, if I apt-get install something it gets installed in /data/data/.../debian/usr/local/bin directory. ...
1
vote
3answers
51 views

script for copying directories with particular increment

I have directories which are named as 0.1, 0.15,0.2, 0.25, 0.3,0.35 and so on. Now I want to copy directories at particular increments say of 0.1 together to a separate directory. Say directories ...
0
votes
5answers
75 views

List only the count of all files/directories for the directory tree of present directory

I want to list the number of directories under each subdirectory tree of the present directory. As there are too many directories, I can't go into individual directory and check. Something like the ...
15
votes
3answers
939 views

Simple way to see the content of directories in Linux/UNIX file systems

In the past, I learned that in Linux/UNIX file systems, directories are just files, which contain the filenames and inode numbers of the files inside the directory. Is there a simple way to see the ...
0
votes
2answers
21 views

update-alternatives returns error about Java directory not available

I've been trying this tutorial: How To Manually Install Oracle Java on a Debian to install Java on Debian 8, but I'm getting the following error : update-alternatives: error: alternative path ...
1
vote
1answer
59 views

Listing directories and understanding ls

On ls man page, I saw this -d, --directory list directory entries instead of contents, and do not dereference symbolic links on my current folder: drwxr-xr-x 2 oracle oinstall 4.0K Jul ...
2
votes
1answer
38 views

What is a non-contiguous directory?

When I run fsck, I can see the following line: 182 non-contiguous directories (0.1%) What kind of directories are the non-contiguous ones? Is there a way to make them to be contiguous somehow. How ...
2
votes
0answers
20 views

How do I vmtouch a directory (not the files it contains)?

The vmtouch(8) tool allows locking a file or files in memory. It has recursive mode, but the directories are used just for discovering files and are not locked themselves. How do I lock a directory ...
0
votes
4answers
59 views

Copying Only Directories With Files

I am trying to copy files and the directory it is in to another location. I can find the path like this: find ~/dim_import/* -type f ! -name xdir | cut -d '/' -f 5-10 which outputs ...
0
votes
4answers
81 views

given a file, find where within a subdirectory it was copied to

Given a file that I know has been copied into a given directory, I want to find the exact path where the file copy now resides. It is guaranteed the file has not been edited and will look exactly like ...
0
votes
0answers
17 views

New files in a mounted directory are being created with a different user and removing write permission for other users

I am running a python script that outputs files into a mounted directory on a different computer. The script can be run multiple times in a way that overwrites the contents of created files. However, ...
4
votes
2answers
81 views

sudo rm -rf returns “cannot remove directory” on empty directory owned by root

I have a directory on my Debian system. The directory is: root@debian:/3/20150626# stat 00 File: `00' Size: 6 Blocks: 0 IO Block: 4096 directory Device: fe00h/65024d Inode: ...
0
votes
1answer
26 views

Command to delete directories whose contents are less than a given size

I'm working in a directory ~/foo which has subdirectories ~/foo/alpha ~/foo/beta ~/foo/epsilon ~/foo/gamma I would like to issue a command that checks the total size under each "level 1" ...
4
votes
1answer
150 views

Making the current directory as if it were where an absolute path starts

I'm wondering if there is an application that makes it so that commands after it operate in an environment that treats the working directory as if it were the top-most one, and there is absolutely no ...
0
votes
1answer
31 views

Copying directories to directories with different names

How can I copy a number of directories: directory_01 directory_02 directory_03 to different directories tmp_directory_01 tmp_directory_02 tmp_directory_03 where each tmp_directory_* directory ...
0
votes
2answers
32 views

Why is there a minor number in /dev for directories such as pts?

This is a part of /dev in CentOS 6.6. What is the meaning of the minor number for directories like ., .. , bsg, block and ... ? drwxr-xr-x. 18 root root 3800 Jul 3 06:00 . dr-xr-xr-x. 21 ...
0
votes
2answers
36 views

Is it possible to create a virtual directory in Linux?

Like this way in Windows mklink /D Virtual_Folder_Here Real_Folder_Here. I was unable make work alias in Apache virtual sites in Windows so I made a virtual directory. Is this possible in Linux too?
1
vote
2answers
35 views

How to remove data in / directory [duplicate]

I would like to know what is contained in the "/" directory and is it capable of utilizing 50GB. My system all the 50GB allocated to "/" had been utilized. I want to know what to delete if want to ...
0
votes
1answer
27 views

Find directory names with N occurences of a set of characters

Sorry in advance, I know there are hundreds of posts about find, but I genuinely don't understand what's happening here and haven't been able to find a definitive answer to this question: how to match ...
1
vote
1answer
45 views

Bash script to detect a file modified yesterday and check if its size is above a certain threshold

I'm writing a script to stat all files in a directory, and then find specific files that were created yesterday and tell me if they are larger than a certain size or not. So basically I need this to ...
4
votes
1answer
32 views

Why can't another user access my file when it's a full path?

I have a program that runs a command that is something like this: /home/myuser/bin>> /usr/bin/sudo -u otheruser script.py /home/otheruser/file.txt This works, but now I need this to work when ...
1
vote
1answer
34 views

Creation of symlinks

I am following the tutorial http://www.olindata.com/blog/2013/12/building-ha-cluster-openvz-drbd-heartbeat-and-pacemaker. I got up to here: symlink folders in /var/lib/vz to /etc/vz The /etc/vz has ...
0
votes
1answer
39 views

Copying files containing specific text preserving directory structure

Using the code in this answer, I can easily copy a file containing specific text from one folder to another. With the -r option I can also search inside directories recursively. The result is that ...
3
votes
4answers
139 views

Touching issue: Creating a filename from 2 variables

I am trying to create a filename from 2 variables. This is the error msg: touch: cannot touch `/root/tinstalls/2--06/06/15': No such file or directory 2--06/06/15 19:54 This is the code: ...
1
vote
1answer
35 views

AUFS only changes permissions of the topmost directory

I have two writeable directories branch1 and branch2 tied together with AUFS on Debian 8 to the mount point union. Mount options: br=branch1=rw:branch2=rw branch1 and branch2 each contain a ...
2
votes
2answers
58 views

Copy certain files from specified subdirectories into a separate subdirectory

I want to copy all .fastq files from every subdirectory that ends in '_CSF' into another already created subdirectory, dir1_CSF. I understand how to copy certain files but not from certain ...
4
votes
3answers
92 views

Find largest files from each date in a directory

I have a directory similar to the following: -rw-r--r-- 1 root root 223K Apr 28 14:25 2015.04.28_14.25 -rw-r--r-- 1 root root 253K Apr 28 14:55 2015.04.28_14.55 -rw-r--r-- 1 root root 276K Apr 28 ...
1
vote
2answers
155 views

How to see if the directory exists?

How can I check if /bin/x86_64/bin/ls is a directory in a bash shell script Here is what I tried: #!/bin/bash if [ $# -eq 2 ]; then if [[ "$1" = /* ]] then cd ./bin/x86_64/bin/ls ...
1
vote
2answers
39 views

User cannot see directory permissions

I'm working in Ubuntu 3.13. The permissions on a drive are such that the owner can see directories and files with these permissions: drwxrwxr-x 2 michael atlas 4096 Feb 15 12:34 temp2 ...
5
votes
6answers
116 views

How to find out whether two directories point to the same location

Do the following paths point to the same disk location? /home/username /app/home/username
2
votes
2answers
47 views

Selecting a random sample from a directory tree

I've got a directory that contains directories that contain directories that contain files. I'd like to select two files at random from each leaf directory. I found this question about selecting ...
5
votes
7answers
316 views

Is there an equivalent way to remember directories on mounted volumes like DOS

A while ago, I moved from a purely Windows environment to using Windows and a Mac. Whilst I am slowly getting used to my Mac and loving it, there are a few things that frustrate me. One of them is ...
0
votes
3answers
42 views

Merge (combine) directories using rsync

I need to create deploy script to combine directories ├── LIB_COMMON │ ├── file1.php │ ├── file2.php │ ├── file3.php │ └── file4.php ├── LIB_CZ │ ├── file2.php │ ├── file3.php │ ├── ...
-2
votes
1answer
52 views

Move folder from root of Hard Disk to Current Directory [closed]

I'm trying to figure out how to move a folder that sits in the root of my disk (what do you call that, home?) to a subdirectory. I am not cd'd to the root (again not sure of the terminology). When I ...
0
votes
1answer
50 views

Hyphen/Dash “-” Symbol's use in Linux bash /dir + GRUB booting for newbs

I am attempting to complete this GitHub tutorial on creating a custom GRUB loader for a stubborn Asus Win8.1 laptop on which I am hoping to install Ubuntu: ...
4
votes
3answers
127 views

What is the difference between home$ and ~$?

I'm learning Linux, and I'm a little confused right now. In the below screenshot, I was not able to understand the third shortcut of Table 2-1. It says that cd ~user_name will change the working ...
-1
votes
3answers
54 views

How to access dot directory [closed]

I’ve been googling on how to access dot directory in unix like system, but everybody is just talking about dot directories for this and that reason. I haven’t found anything on how to get to directory ...
2
votes
3answers
44 views

tar compresses folder, but creates nested structure

I have the following folders on a linux machine ./myFolder ./tmp ./packages ./zips compress.sh I run tar -czf ./zips/someFile.tar.gz ./tmp/someFolder from compress.sh. The folder is ...
7
votes
2answers
148 views

Keeping history per working directory (cf. per shell session)

Is there a way to make a modern shell's history feature be scoped to a path? My working contexts are split up as paths on the file system, and the pattern of shell activity, such as repeatedly issued ...
1
vote
4answers
201 views

Is it possible to execute a binary without specifying the full path or the preceding './'?

Outside of a shell, such as running some other process, what does the term current directory mean, and is it possible to execute a binary without specifying the full path or the preceding './', ...
1
vote
1answer
25 views

Strangeness with Symlinks and Relative Paths

Could someone please explain this to me? I'm having trouble understanding how this is set up and why it behaves the way it does. I wanted to see where zsh is actually installed on a machine that I ...
6
votes
5answers
423 views

How to execute a bash command in all possible subdirectories?

Let's say my main directory is /home/test Under it i have lots of subdirectories and under subdirectories still a lots of them and so on. Example: /home/test /home/test/subdir1 ...
2
votes
4answers
105 views

Why . /home/Desktop is incorrect and ./Desktop is correct?

I'm learning about Linux, started yesterday. I have a question which I couldn't answer from my book or Google. What is the difference between ./ and / in the shell? I'm asking this because when I ...
5
votes
5answers
137 views

command which works like ~ (tilde) symbol to represent some directory

cd ~/scripts. This will go into scripts directory in my home. Similar to this, I want some "alias" kind of setting, which will allow me to enter some other directory so that, cd xxx/mywork -> will ...
1
vote
1answer
91 views

How to list all leaf files under a directory in reverse time order?

Given a directory, how can we list all its leaf files in time reverse order? ls -Rltr ist the content of a subdirectory in time reverse order, but groups files by subdirectory, which break the ...