A file system structure in which to store computer files.

learn more… | top users | synonyms

2
votes
4answers
83 views

cd into last alphanumeric directory

I have this directory contents: As you can see, the directory names are just timestamps - in general when I am the top level directory I usually want to open the most recent directory which is the ...
2
votes
2answers
78 views

difference between /dir and /dir/ [duplicate]

Consider a symlink I am making to my Music directory named music. ln -s Music music now consider following sequence of commands: edward@ArchLinux:~$ readlink music Music edward@ArchLinux:~$ ...
1
vote
1answer
47 views

Ways to consolidate music folder

Having used iTunes for a long time, my iPod Classic finally started showing signs of dying. I bought a FiiO X5II and put all my music onto it's microSD XC card(s) using rsync to ensure the same folder ...
0
votes
1answer
31 views

How do I remove a . from the start of a Bash string and write the result to a variable? [duplicate]

I am presently writing a shell function and it would help me in writing it to be able to remove a . from the start of a folder name (changing the folder name from that of a hidden folder to that of a ...
3
votes
0answers
51 views

Reason for security software to not scan directories with more than 10,000 resources in them?

We have a security software on Linux which scans for exploits in files that exist in directories on the server (such as if websites had hack scripts uploaded to them). It defaults to a limit of 10,...
0
votes
1answer
17 views

Manipulate du's output to get a custom printout [duplicate]

I typically run the command below to check size on each directory. du -sBM /* | sort -nr | head -n20 However, specifying a block size of "M" here will give everything a value in "M". The problem ...
4
votes
2answers
366 views

Is there an inode for a directory?

Each file has an inode. Is there an inode for every directory ? If not, how does Linux manage directories.
1
vote
1answer
91 views

udev creates the right rules, but rights disappear as soon as I try to access files via C++

I'm facing a really strange problem using udev. As I already explained here I'm trying to access some folders/files as a no root user Here are my udev rules for the gpio folder: KERNEL=="gpio*", ...
-2
votes
2answers
65 views

Is this good in order to have an empty directory?

I would like to have a directory mydir with empty content, but I don't know in advance if it already exists, or when it does, if it is empty. So my way is mkdir -p mydir ...
0
votes
4answers
216 views

Flattening complex folder structures with duplicate file names

I have a folder with a complicated folder structure: ├── folder1 │ ├── 0001.jpg │ └── 0002.jpg ├── folder2 │ ├── 0001.jpg │ └── 0002.jpg ├── folder3 │ └── folder4 │ ├── 0001.jpg │ ...
0
votes
0answers
53 views

Flattening folder structure with duplicate file names [closed]

I have a folder with a complicated folder structure: ├── folder1 │ ├── 0001.jpg │ └── 0002.jpg ├── folder2 │ ├── 0001.jpg │ └── 0002.jpg ├── folder3 │ └── folder4 │ ├── 0001.jpg │ ...
0
votes
5answers
73 views

File permission issues

Is it possible to change the permissions of a particular directory containing some files from 640, with which it gets generated in that folder and change it to 644 once the files are generated for ...
1
vote
1answer
38 views

Is it possible to overwrite a directory with a file in linux

Can someone please help me with a possible case of accidental deletion on a linux box? I ran the following command: cp file1 /newdir1/folder1 What I intended to do was to copy file1 to the pre-...
2
votes
2answers
56 views

treating web page like directory

I'm a Mac user and I want to cd to a web page and then cp some files onto a local directory. Is there a way to do this? This is the page I'm referring to: http://www0.cs.ucl.ac.uk/staff/M.Herbster/...
2
votes
1answer
58 views

size of directory reported by ls [duplicate]

I understand the size reported by ls corresponds with number of inodes inside the directory, not their actual size. I have noticed peculiar behavior, when displaying directory size with ls. Here is ...
2
votes
2answers
39 views

popd pushd, does dirstack stores the accessed directorys as a textfile-list somewhere?

I would like to use the recently accessed directories list for logging purposes. Does directory stack stores somewhere the list of folders used by popd and pushd as a text file? If yes where?
1
vote
3answers
108 views

How to find empty directories in unix [duplicate]

I want to show all the empty directories under my home directory, using shell script, can you help me find the code? (without using find's -empty)
15
votes
6answers
1k views

File systems vs partitions vs directories

I am new to Linux so pardon me for the possible confusion you may encounter in this question. From what I understand, filesystem specifies how a partition stores/manages file, with standards such as ...
0
votes
1answer
44 views

Opening .txt file when you open directory

Is it possible to automatically open *.txt file as you open certain directory on Ubuntu? We have a school assignment to make a text file to pop up when you open certain directory. For example, when ...
5
votes
3answers
917 views

What means the dots on a path? [duplicate]

How is "/a/./b/../../c/" equal to /c? I saw this as a question on one of the Stack Exchange sites. Apparently .. means to pop the stack(?). Why is this the case?
10
votes
3answers
1k views

Why is it rm -rf and not rmdir -rf

I've always been curious why the command for deleting everything in a directory is rm -rf. Why aren't there flags to do the same thing with rmdir? Wouldn't it be more intuitive to use rmdir for ...
3
votes
1answer
130 views

Finding empty directories recursively

How can I find every empty directory, let's say, on the /home/.../Desktop. Because I am on Solaris, I can't use the find . -empty -type d command. Is there any other way?
1
vote
1answer
62 views

Linux bash script input without using “read” [closed]

I need to create a bash script where a single argument is passed by the user (without using the "read" input option) at the terminal command line that creates a directory with that name, or otherwise ...
0
votes
0answers
17 views

How are the sizes of Linux directories determined? [duplicate]

The results of ls -lh provides, among other things, a listing of subdirectories and their sizes. As the directories' sizes are not determined by the sum of the files within them, how are they ...
1
vote
2answers
79 views

Use “find” from a specific relative directory [closed]

Suppose I'm in the following directory: /A-dir/B-dir/mydir/… some directories …/x-dir I want find to search from mydir, but mydir is not specifically known in advance; it is defined by the current ...
-1
votes
3answers
170 views

cannot move Directory not empty

Edited due to people want to know more then me just wanting to know how to deal with two directories with same names in different places and move one into another when mv will not allow it if files ...
1
vote
3answers
382 views

Opening current directory from a terminal onto a file browser?

My current directory is buried deep in multiple subfolder layers from my home directory. If I want to open this directory in a gui-based file browser, I have to double click folder after folder to ...
1
vote
3answers
106 views

How to check for valid $PATH directories, and output them telling whether each one is valid or not?

Ok so I got this: check="${PATH//:/'\n'}" The above gets me each path in a simplified manner, and formats it nicely into a variable. Now how do I check each line for existence, and state that for ...
1
vote
2answers
276 views

Aircrack-ng: No /pentest/passwords/wordlists/darkc0de directories

this is my fist question on this forum. I'm currently using Linux Mint 17.2 Cinnamon and trying to run Aircrack-ng to show the password of my own Wi-Fi connection, I got the Handshake too. The problem ...
0
votes
3answers
81 views

Apply a command to all subdirectories/files

In a parent directory, I have several sub-directories, each of them contain one or more space-delimited text files. I have the following command that outputs what I want, but only for an individual ...
-1
votes
1answer
39 views

Unix directory for all users permissions

I'm trying to make a directory where all users can write, but no user can delete another users file in that directory.
2
votes
1answer
106 views

Running command on multiple files within multiple directories

I want to run the command python quast.py -o quast contigs.fasta but I want to do this for multiple contigs.fasta files in multiple directories. I'm running OSX.
-1
votes
1answer
230 views

Looping through files in directories, each matching a pattern [closed]

I want to loop over files matching *.pdf, in the directories matching [A-J]*? I don't understand what is unclear about this question that resulted in putting it on hold.
1
vote
1answer
90 views

sshfs: permission denied when trying to access specific folder

I can access to my specific folder like this: ssh -YX xxx@xxxxxx.xxx.xxxx.xx cd ../the/folder/I/want or with an absolute path ssh -YX xxx@xxxxxx.xxx.xxxx.xx cd /the/absolute/path/to/the/...
3
votes
3answers
614 views

How do I write a script to count the total number of files, and directories in my home directory then display it?

Question is in the title been trying to do this. I want to do it with a for loop. This is what I've come up with so far which does not work. for home in /home/ {.,/}*; do echo "$home"; done I would ...
0
votes
0answers
19 views

How to monitor system, Database Query Values, and the Existance of Files?

I was looking through an old system today, and it had this monitoring software that could send out email alerts. It's very old, but it still seems interesting and useful. It allowed for monitoring ...
-1
votes
1answer
356 views

How to take a directory or file backup using command?

I have uploaded my file there will be a daily changes in that file for safer side i want to take backup that directory,when i tried copy that folder to another it is showing whenever i have created ...
0
votes
2answers
39 views

Retain the ../../../ in wget command

../../../ is removed when i use it with the url in wget command. PLease see below: user $ wget http://n0t.meaning.anything:20000/../../../some/folder/file --2015-10-29 16:48:13-- http://n0t.meaning....
5
votes
2answers
656 views

How do I get the total size of everything in a directory in one line? [duplicate]

I know I can use du -h to output the total size of a directory. But when it contains other subdirectories, the output would be something like: du -h /root/test . . . . 24K /root/test/1 64K /root/...
0
votes
2answers
43 views

Does soft linking a directory hard link its subfiles?

Suppose I have the following configuration: Folder A file1 file2 I then create a soft link of Folder A as follows: ln -s A B so that we now have: Folder A file1 file2 Folder B ( symlink of ...
0
votes
0answers
86 views

why are directories which are empty not removed after rmdir?

foreach file (`find . | awk -F/ 'NF == 3'`) echo $file set olddir = `echo $file| cut -f 1-3 -d '/'` echo $olddir set newdir = `echo $olddir | cut -c 1-2,5-` echo $newdir mkdir -p $newdir ...
1
vote
1answer
36 views

Only color files according to file types? [duplicate]

When using ls to list files in a directory, the files are colored according to their access permissions. Is it possible to color the files only according to their file types (e.g. a regular file, a ...
2
votes
2answers
354 views

Input/Output Error when rm/mkdir

So I goofed when using sshfs and the folder I was using as a mountpoint for the server has been borked. The server wasn't unmounted correctly (I think due to a network drop out). consequently, when I ...
2
votes
3answers
53 views

need to move files with name into directories with corresponding names

I have files named patient_sample_L001_R1_001, patient_sample_L002_R1_001, patient_sample_L003_R1_001, patient_sample_L004_R1_001 another set named patient_sample_L001_R1_002, ...
1
vote
2answers
2k views

How to run Java program in Bash script and give it one argument?

I will add an item on a context menu, called "Open with ABC". This context menu appear when I right-clicked a folder. When the "Open with ABC" is selected, it will launch a Java program, "abc.class". ...
1
vote
2answers
56 views

How do i tell how many directories are in this path?

The path is as follows: /usr/lib64/qt3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/mj1210/.local/bin:/home/mj1210/bin
3
votes
1answer
417 views

mv: cannot remove directory: Directory not empty

Running the command /data/jritchie$ mv ~/jenkins_dev /data/jritchie/jenkins_dev I'm getting a bunch of errors like the following: mv: cannot remove `/home/jritchie/jenkins_dev/plugins/valgrind/WEB-...
1
vote
0answers
97 views

Allowing SFTP user to specific root directory only

I want to allow a SFTP limited user to access and change scripts in specific root directory called /root/scripts with SSH access disabled. I am having a hard time finding any solutions. The main ...
2
votes
2answers
6k views

Why do I get permission denied when using mv althrough directory rights are correct?

I get permission denied when trying to move folder Music via mv although directory owner is set to my user and user permissions are set to 7. What's going on? (I know that I could use sudo but I want ...
2
votes
1answer
162 views

Using rename command to rename first part of a file

I have three files in a directory (in mac-osx terminal) say INIT_Struc1 INIT_Struc2 INIT_Struc3 which I need to rename as FINAL_Struc1 FINAL_Struc2 FINAL_Struc3 When I use the rename command (...