LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2024, 02:45 AM   #1
Tricia279
LQ Newbie
 
Registered: Sep 2023
Location: Munich
Distribution: RedHat RHEL 9.1
Posts: 3

Rep: Reputation: 0
Question How to show the content of an external drive in bash with ROOT permissions ?


early every linux system has a data manager. In my case, I have Nautilus because, I have a GNOME environment.

If I connect an external drive to my system, I can see the content in Nautilus with my users permissions.

My question is:

With which command as ROOT, I can see the content in a tree structure as 'ls -lh' in '\' ?

I did: findmnt -l to see if the device was mounted

TARGET /run/media/admin/cf7a4e4e-9f2f-4952-bca8-46ddce184885 [name of the device]

SOURCE /dev/sda1

FSTYPE ext4

OPTIONS rw, nosuid, nodev, relatime, secl

lsblk -l to see the size of the content

I really appreciate your help !!!


Solution:
It is easier as I thought:
As ROOT:
# cd /run/media/admin/cf7a4e4e-9f2f-4952-bca8-46ddce184885

Last edited by Tricia279; 02-13-2024 at 03:29 AM.
 
Old 02-13-2024, 04:21 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by Tricia279 View Post
Solution:
It is easier as I thought:
As ROOT:
# cd /run/media/admin/cf7a4e4e-9f2f-4952-bca8-46ddce184885
Yes, it is. You might want to mark the thread as solved.
 
Old 02-13-2024, 07:00 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
Quote:
With which command as ROOT, I can see the content in a tree structure as 'ls -lh' in '\' ?
Is that a type? Did you try: ls -lh /
 
Old 02-15-2024, 04:33 AM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
lsblk gives you the total size of a disk/partition device (/dev/sda1)
df gives you the total/usable and the actual/used size. df can work on the disk/partition device or on the mount point if mounted.
ls and other commands work on the mount point (/run/media/admin/cf7a4e4e-9f2f-4952-bca8-46ddce184885)

Last edited by MadeInGermany; 02-15-2024 at 04:34 AM.
 
  


Reply

Tags
externalharddrive, nautilus, root



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Linux Mint 19.1 cinnamon to an external hard drive & backing up to another external hard drive. bluelakecompany@yahoo.co Linux - Newbie 1 01-23-2019 06:30 PM
[SOLVED] Optical drive only sees disks as data. Music CDs don't even show up and movie DVDs show up as files. hikinrory Linux - Newbie 57 09-17-2018 12:29 AM
Evolution does not show content of inbox or sent but does show other folders manny_borges Linux - Newbie 1 05-07-2011 05:08 PM
ubuntu installed on external hard drive, can't startup without external hard drive. Vanostaajen Linux - Software 23 01-20-2009 09:59 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration