A file system structure in which to store computer files.

learn more… | top users | synonyms

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 (...
1
vote
1answer
58 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
55 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
161 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
26 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
370 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
110 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
205 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
67 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
85 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
49 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 ...
3
votes
2answers
54 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
75 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
238 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
28 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
88 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
73 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
42 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
94 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
373 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
102 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
407 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
238 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
169 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 here:https://solidlinux.wordpress....
0
votes
0answers
86 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 table');...
5
votes
3answers
283 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 /home/user/...
5
votes
1answer
536 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
51 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 tried:...
4
votes
2answers
186 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
67 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 apache,...
17
votes
3answers
1k 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
46 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 ...
3
votes
1answer
51 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
341 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
578 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
50 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
90 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
31 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 ...
0
votes
1answer
259 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
62 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
3answers
77 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.1,...
0
votes
5answers
220 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 directories and check. I would like to ...
17
votes
3answers
1k 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
361 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 /opt/jdk/...
1
vote
1answer
170 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
236 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 ...
5
votes
0answers
151 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 ...