A file system structure in which to store computer files.

learn more… | top users | synonyms

0
votes
0answers
72 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
27 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 ...
1
vote
2answers
114 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
38 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
451 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
44 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
168 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 ...
1
vote
0answers
48 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
1k 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
111 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
41 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/ ...
5
votes
2answers
49 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
45 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
78 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
20 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
212 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
56 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
99 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
51 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
18 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
69 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 ...
0
votes
1answer
41 views

Folder research task

I have a folder with 3 subfolders containing 6 files each.There are 2 files in each subfolders with :NOPM in their file names. I need to create a shell script that checks all the folders and their ...
2
votes
2answers
47 views

Login via ssh to last used folder

I have simple question. Is there any chance to configure ssh in that way, when I login to my server via ssh I want be in last used directory?
-1
votes
4answers
69 views

how to move back from a current directory

Hi if suppose I am curently here: cd Desktop/kinectrobot/src/beginner_tutorials/src and after that working in src i want to move back one directory for example I want to go to beginner_tutorials. ...
1
vote
3answers
83 views

Get checksum of directory on bash

I was wondering: Is it possible to create a checksum of a directory (using something like md5sum) Is it possible to recursively create checksum for each file inside the dir (and then print it out)? ...
1
vote
1answer
25 views

Why do I have a `~/texmf` directory?

Shortly after setting up emacs with auctex I noticed that a directory ~/texmf on my system. Issuing $ tree ~/texmf returns ~/texmf |- web2c |- tlmgr.log I'm having trouble understanding why this ...
0
votes
0answers
52 views

Deleting of whole symbolic link folder when rpm -e is ran

I am currently building an rpm for RHEL 6.6. The installation of the rpm goes great the the command rpm -Uvh foo.rpm. However I run into a problem when I do the rpm -e foo command. The problem is ...
1
vote
1answer
54 views

what is the difference between mounting via command line and using GUI?

I am in great trouble as of now as if I have to mount my drive only using command line because if I mount my drive using GUI it gives me permission as read only for command line operations. See the ...
0
votes
1answer
38 views

Mkdir add number iteration

Lets say I have folder1 and I wanted to automatically make a folder2. Now lets say I ran this again and I wanted it to now make folder3, folder 4, and so on for each time I ran this. What would be the ...
0
votes
2answers
69 views

File System that supports duplicate directory names

Is there a file system that supports duplicate directory names. Ideally to distinguish between directory names you would use indexes(file directory order). This is related.
2
votes
3answers
180 views

Difference between files in directory

I have two directories with same files but with some difference in their contents. I want to list down those files which are differing. For example There are two folders Folder1 and Folder2 with ...
2
votes
3answers
89 views

How to delete that directory?

I have a directory, that I cannot delete with rmdir. I get always a permission denied error. But when list the directory (with ls -l) I get this: drwxrwxrwx 2 user user 4096 Aug 28 09:34 directory ...
3
votes
1answer
279 views

Exit bash when find gets to a folder with permission denied

I'm trying to write my second Bash script. Where i go through folders recursively and make a list of and count files and folders. In a way it works but if "find" gets to a directory where it has ...
1
vote
3answers
223 views

How to identify if a direcory is created by System or a root user?

How to identify if a directory is created by Linux system and by user like root. Example: in /etc there is a directory named sys which is created by Linux. And I logged in using root and created the ...
0
votes
0answers
87 views

xfs directory quota doesn't work

now I have two tasks and I wanna run them in different directory and limit the directory's size. I use xfs's project quota to achieve this. I follow the steps from ...
0
votes
0answers
49 views

“[unixODBC][Driver Manager]Data source name not found, and no default driver specified” When using Teradata ODBC Drivers

I am running a PHP script on a RedHat server using Teradatas ODBC drivers. <?php $conn = odbc_connect("Teradata", "username", "password"); $result = odbc_exec($conn, 'SELECT count(*) FROM ...
4
votes
3answers
107 views

How to remove space in all sub directories in shell script?

I tried following shell script to remove all spaces with underscores: find $1 -depth -name "* *" -print0 | \ while read -d $'\0' f; do mv -v "$f" "${f// /_}"; done If I have a directory ...
5
votes
1answer
182 views

Why are mtime and ctime changing for a directory when a file is modified?

I am learning about atime, ctime, mtime with regard to files and directories. It seems to me that if I modify a file within a directory, I haven't changed the "directory file" itself in its inode or ...
1
vote
1answer
30 views

List folders greater than 10G and mail to respective owners about the usage

In our environment, we have an NFS mount which contains all users home directories. I want to find the users whose home directories sizes are greater than 10G and send a notification to them. I ...
4
votes
2answers
93 views

Preventing the creation of a specific directory

I'd like to cover the bases on a vulnerability which tries to download itself and save the result in a newly created directory inside the /tmp/ directory. To be on the safe side, I wish to make it ...
1
vote
1answer
62 views

directory permissions [closed]

I'm currently working on a PHP server explorer, and I have to determine if a directory is empty or not readable because of insufficient permission. My web application is running under the user ...
15
votes
3answers
921 views

Can I make a public directory under a private directory?

I have a personal folder /a/b on the server with permission 700. I don't want others to list the contents in /a/b. The owner of /a is root. Now I need to open the full authorities of directory /a/b/c ...
1
vote
0answers
31 views

Using rsync with the verbose option and filtering the information displayed

I am using rsync with the -a -r and -v options to copy files and directories from one server to another. This all works fine. But when I make a change, for example, to a single file on the source ...
2
votes
1answer
40 views

Directory traversal cache eviction despite having plenty of memory?

I have a huge Mercurial repository (take a guess how many directories it has -- it's gonna be more than you guessed). The time taken to do basic repository operations is heavily dependent on whether ...
2
votes
1answer
295 views

How to do ls with a wildcard and see the directory name

I have a directory called selenium_IDE if I do ls sel* I get to see directories that are in it, e.g. $ ls sel* HAPPY HAPPY_PLUS_OPTIONS SAD SAD_PLUS_OPTIONS but ...
3
votes
3answers
261 views

Bulk remove a large directory on a ZFS without traversing it recursively

I want to remove a directory that has large amounts of data on it. This is my backup array, which is a ZFS filesystem, linear span, single pool. The data is in this pool called san, mounted on /san ...
0
votes
0answers
13 views

What permissions apply if specific user's permission on file or directory differ from user's group to which this user belong to in Linux? [duplicate]

Case 1: User has "rwx" permissions to certain file or directory. But has no permissions "---" in group it belongs to. Question: who wins - Does user have "rwx" or "---", effectively (not what's ...
1
vote
2answers
37 views

Find and move directory to a new directory based on name [duplicate]

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
61 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
27 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 ...