ls - hide permissions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ls - hide permissions
# 1  
Old 12-03-2009
ls - hide permissions

I'm listing the files in a particular directory using the ls command...

Code:
$ ls -ogh
total 9.4G
-rw-r--r-- 1 1.9G Nov  4 02:29 file1.tar
-rw-r--r-- 1 1.9G Nov 11 03:11 file2.tar
-rw-r--r-- 1 1.9G Nov 18 02:55 file3.tar
-rw-r--r-- 1 1.9G Nov 25 03:11 file4.tar
-rw-r--r-- 1 1.9G Dec  2 02:46 file5.tar

I'd like to hide the permissions, and rather see this:

Code:
$ ls -????
total 9.4G
1.9G Nov  4 02:29 file1.tar
1.9G Nov 11 03:11 file2.tar
1.9G Nov 18 02:55 file3.tar
1.9G Nov 25 03:11 file4.tar
1.9G Dec  2 02:46 file5.tar

I searched the forum and found that it is pretty easy to do using awk. However, I'd prefer not to use awk and somehow do it from within the ls command.

Can this be done?
# 2  
Old 12-03-2009
try
Code:
ls -ogh | cut -d' ' f3-

# 3  
Old 12-03-2009
Not exactly what I was looking for. I should have been more specific, though. I'm looking for a solution that does not involve pipe (i.e. piping to awk, cut, etc.)

Last edited by cdunavent; 12-03-2009 at 10:54 AM..
# 4  
Old 12-03-2009
can't be done with ls options.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

How to hide from UNIX strings - obfuscate or hide a literal or constant?

Hi, I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Discussion started by: newbie_01
8 Replies

2. Cybersecurity

Hide User From Root

I'm tying to find out what my options are to hide a user from all other users, including root. Running in a VM (e.g. KVM, XEN) isn't an option at present. Users with root access can know the account exists, but that's it. In other words, root can create, disable or remove the user and other... (4 Replies)
Discussion started by: BostonDriver
4 Replies

3. Shell Programming and Scripting

Hide process

Hi friends, I want (a C++ code) to hide process in kernel 2.6, I don't want monitoring even in /proc. please help me. Regards, Eilya (3 Replies)
Discussion started by: Eilya
3 Replies

4. Shell Programming and Scripting

How to hide folders

hello everybody, i would like to hide visibility of the folders , i.e. not to giving any physically visibility to any users . Is there any way to do it other than changing the permission and adding "." post folder name . by changing the permission , we cann't do any activity , but have... (1 Reply)
Discussion started by: manas_ranjan
1 Replies

5. Shell Programming and Scripting

Hide my shell commands

I am writing a tool that connects using SSH to a remote server and perform some actions (through root) However - I would like to hide my operations so they will be hard to track. I tried STRACE on the SSHD process and saw all the traffic going there so I am quite transparent to STRACE ... (1 Reply)
Discussion started by: yamsin789
1 Replies

6. Shell Programming and Scripting

Want to hide password

All, In my script I am calling another script.. in that script I need to enter a password. Problem is that everyone is able to see the password when I enter that. Is there any way that when i enter that password it should not display or may look like *******. Or if there any other way that I... (1 Reply)
Discussion started by: arpitk
1 Replies

7. Shell Programming and Scripting

Hide a script ?

Hi all, i have a perl script for my users to run. My sys admin created an account for the users to log in and execute the script. They just type "perl myscript.pl" at the unix prompt to run it. Is there any way that i can hide my script? ,ie, do not allow my users to view the script. either... (5 Replies)
Discussion started by: new2ss
5 Replies

8. Shell Programming and Scripting

Hide Passwords

Is there a way not to display the password in the sys out when your korn shell script logs into sqlplus? (3 Replies)
Discussion started by: lesstjm
3 Replies

9. UNIX for Dummies Questions & Answers

Hide Directory name

Hello everyone, i am new to unix and still learning about different commands. Can some one tell me how can i hide my directory name. For instance someone is logged in a directory named $ . I've seen some people hiding their above path name by just one word or letter like $ in order to keep... (7 Replies)
Discussion started by: a25khan
7 Replies
Login or Register to Ask a Question