A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
1answer
26 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
30 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
27 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
33 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
25 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
34 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
31 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
24 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
136 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
31 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
40 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
79 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
103 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
38 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
110 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
44 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
302 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
36 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
43 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
43 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
124 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
52 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
40 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
132 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
194 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
22 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
284 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
101 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 ...
4
votes
5answers
108 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
82 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 ...
0
votes
2answers
30 views

Disable directory permissions change

I have a client whose website uses a plugin which creates a temp directory with 777 and I am being alerted by e-mail about it several times per minute. Since I do not want to add exception to the CXS, ...
9
votes
2answers
377 views

Is a directory removed when its number of hard links becomes 0?

Is a directory removed when its number of hard links becomes 0? A directory always has at least 2 as its number of hard links, because of .. When rm -r a directory, does it decrease the number of ...
3
votes
1answer
44 views

Timestamps of a directory?

About mtime of a directory, from Stéphane Chazelas's reply http://unix.stackexchange.com/a/187231/674 The modification time of a directory, like any other file (note how directories are called ...
2
votes
1answer
209 views

rm -rf: cannot remove `/opt/jetty': Directory not empty

I have a script using the following command to remove a folder: ssh -q root@hostname sh -c 'rm -rf /opt/jetty/' Most of the times it works fine, but occasionally I get this message: rm: cannot ...
2
votes
1answer
44 views

Shell Scripting: Deleting or moving files from one directory that match filenames from another directory

I have a very specific and odd problem to solve. I'm working as a research assistant and I've been producing a ton of figures. In one directory, I dump .pngs to view casually (limited space here) and ...
2
votes
3answers
149 views

tar unix not changing directory

I am executing a tar command to compress files which are present in another directory. I executed following command: tar -czf /backupmnt/abc.tar.gz -C /backupmnt/statusService/ * I want to create ...
4
votes
2answers
65 views

Prevent the Gtk file dialog from listing mount points

When I open the Gtk file dialog, there is a box called “Places” on the left-hand side which lists “Search”, “Recently Used”, a bunch of directories, and several things that appear to be volumes. I ...
1
vote
1answer
39 views

Mount host directory in a virtual machine

I have a directory on a system which is the host for a virtual machine. I want to make this directory accessible from the guest of the virtual machine. There are some way I can think of, packing the ...
2
votes
1answer
237 views

Why can't I remove the empty directory with username www-data? [duplicate]

The test is a directory which contains nothing, an empty directory. root@localhost:~# ls -l /home drwxrwxrwx 2 www-data www-data 4096 Apr 26 17:50 test root@localhost:~# ls -l /home/test ...
4
votes
2answers
96 views

Why does '/' have the inode 2?

On many *nix systems like OS X and Ubuntu, We can see the inode of root directory is 2. Then what is the inode 1 used for?
0
votes
1answer
39 views

Find out home directory of running Oracle instance

There are two oracle directories on our system: oracle oraclex How can I find out which of them is used by the running Oracle instance?
1
vote
2answers
27 views

Diff directories using modification time (mtime) and size instead of contents

Is there an option to have diff (-q) not look at file contents and instead just look at size and mtime? If not, is there a tool similar to this that has the option?
0
votes
3answers
46 views

How to count subdirectories in a directory in UNIX?

I have to count the total number of directories that are in the given directory (note that these are subdirectories). I know how to count for files but am having trouble counting the directories for ...
1
vote
1answer
79 views

Sticky bit and users with sudo permission

Let's say I chmod 1777 a folder /opt/test and all files inside it as user user1. Hence user2 is able to update and edit files inside the /opt/test directory. When user2 operates via sudo, he's able ...
14
votes
5answers
1k views

How is a directory a “special type of file”?

I am reading this Unix tutorial and came across this quote... We should note here that a directory is merely a special type of file. ...but no explanation or details are provided. How is a ...
2
votes
1answer
74 views

How to scan a directory with a space in its name with maldet

I'm trying to scan some directories with Linux Malware Detect (command-line command maldet): maldet -a /SOMETHING\ 1/ But I get: maldet(13857): {scan} invalid path /SOMETHING 1/ I've tried ...
1
vote
1answer
138 views

Bash script won't work on current directory

I'm using Kali linux which is based on Debian and wrote an script to copy some files from where the script is based to a specified directory. But when I execute my script (called CopyFiles.sh), cp ...
1
vote
0answers
24 views

Centos 7 FTP Hidden Directory Issue

After setting up Centos 7 with a web server standard install and LAMP stack. I installed vsftpd. Everything works fine and configured it to accept passive to enable gui ftp programs. However, when ...
0
votes
2answers
54 views

How do I run find, maxdepth and other commands on lcd while using ftp?

I have got the command working locally using normal commands. I now need it to run while using ftp. I understand I need to use '!' And instead of copy I will need to use put so it works on the lcd, ...