Solved

file or directory

Posted on 2013-06-03
7
240 Views
Last Modified: 2013-06-07
-rwxr-x--- 1 root root    72932 Jan 16  2007 useradd

How will we find user add is a file or directory..
0
Comment
Question by:walkerdba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39215471
See the first column.

A dash ( "-") indicates a regular file.

A directory is indicated by "d" in the first colum.

Likewise, "l" indicates a soft (symbolic) link, "s" a socket, "b" a block special file, "c" a character special file and "p" indicates a FIFO named pipe.

ls -l | grep ^-

lists all regular files,

ls -l | grep ^d

lists all directories etc.
0
 
LVL 4

Expert Comment

by:AshutoshKumar
ID: 39215483
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 250 total points
ID: 39215768
you can always use the command file , e.g.

file useradd
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 21

Accepted Solution

by:
Mazdajai earned 250 total points
ID: 39216572
You can use file (man file) to tell if it is a file or directory, example -

file abc.pem 
abc.pem: ASCII text, with CRLF line terminators
file ec/
ec/: directory

Open in new window


Edited: looks like omarfarid mentioned already.
0
 

Author Comment

by:walkerdba
ID: 39224439
ok
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 39224935
If you feel that you need to change the accepted answer, you can request attention of an administrator who can reopen the question for you.

You can always choose / split points among multiple answers
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unix process listing into CSV format 3 87
LogmeIn using Linux Ubuntu 16.04 6 185
SSH setup on ASA 5505 17 126
Unbreakable Oracle Linux 6.8 installation problem 9 66
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question