A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
5answers
69 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
51 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
50 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
37 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
100 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)
14
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
809 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
116 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
57 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
156 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
334 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
101 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
242 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
79 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
38 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.
1
vote
1answer
96 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
188 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
87 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
545 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
18 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
292 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
611 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
42 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
82 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
33 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
306 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
49 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, ...
0
votes
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
55 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
361 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
85 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
5k 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
156 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 (...
1
vote
1answer
50 views

how to set tilde + alias style?

I noticed there's default tilde + alias exist: [root@xiaobai ~]# cd ~[press Tab] ~abrt/ ~dbus/ ~lp/ ~openvpn/ ~root/ ~systemd-...
5
votes
2answers
54 views

Command Explanation: mkdir -p /root/.ssh

Disclaimer: Total Linux noob. I came across a Bash script with with the following command: $ mkdir -p /root/.ssh I know what mkdir -p does, but, what is "/root/"? I thought root was '/'?
-4
votes
2answers
46 views

A script that can check subdiractories for a file that contains 'hello' and gives back directory name

i need a script where you give a directory name as a parameter and the script check all the subdirectories .php files and if any file contains a string 'Hello' then the script list the matches files ...
0
votes
0answers
143 views

Cannot see files present on server when connecting via Filezilla / SFTP

I am not able to see the files present on the server using Filezilla ftp client. I am using SFTP connection. I am able to connect to the server. I can see only the directories but not the files. ...
3
votes
1answer
25 views

How can you group symlinks with directories in `ls` output but tell the difference?

In ls output, I'd like to group symlinks that point to directories along with the rest of the directories, but still have a way of telling that it's a symlink either with color or an appended symbol. ...
1
vote
2answers
350 views

How to copy directory structure from one server to another without root user?

I would like to know best way to copy directory structure from one server(Unix) to another (Linux): without root user servers are not connected (e.g. can't use SSH directly between them) I need to ...
2
votes
2answers
97 views

Identify sub-directories that do not contain a specific string in a specific file

I have a directory named dir1 which has about 800 sub-directories named disp-001, disp-002, ... disp-800. I need to find sub-directories that either do not contain a file stdout or if they do, that ...
1
vote
2answers
179 views

Comparing directories using diff

I'm trying to compare two directories that contain binary files, on AIX 6. I'm using diff in preference to dircmp, as I'm trying to maintain a consistent output format between this and my Linux ...
-2
votes
1answer
65 views

Find part of filename

Please help with my task: I have a folder with three sub-folders containing six files each. There are two files in each sub-folder with :nopm in their file names. I need to create a shell script ...
1
vote
1answer
21 views

copying sub-directories not containing a specific file into another directory

I have a directory named dir1 which has about 800 sub-directories named disp-001, disp-002, ... disp-800. I get the list of sub-directories that does not contain a file stdout based on solution given ...
0
votes
0answers
78 views

Directory research example

I have a folder with three sub-folders containing six files each. There are two files in each sub-folder with :nopm in their file names. I need to create a shell script that checks all the folders ...