LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2009, 11:04 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
I'm having trouble accessing ntfs files...


I'm running Slackware 12.2 on Xfce 4.4.3 with kernel 2.6.27.7 smp. I just finished fine tuning my desktop and installing the modules for my network interfaces. Anyhow, I have a BT3 cd which contains several lzm files. I did

lzm2dir pentest.lzm /

everything works perfectly. I can go into each directory in that /pentest directory. However, the windows_binaries folder cannot be accessed. When I try

cd /pentest/windows_binaries

it returns

bash: cd: windows_binaries: No such file or directory

This directory includes several .exe files. Do I need to enable ntfs support somehow? Maybe edit my /boot/config-huge-smp-2.6.27.7-smp and edit the CONFIG_NTFS_FS CONFIG_NTFS_RW lines? If so, how would I rebuild the kernel right after that?

Or do I need to somehow use ntfs-3g?

Also, when I'm in a terminal, how do I make it where if I execute ls, it shows different colors for the files and the directories? I'm currently using a .bashrc file. I've already defined all the colors in that file. What else do I need to do?

Last edited by trist007; 03-11-2009 at 11:17 PM.
 
Old 03-12-2009, 12:17 AM   #2
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
What's the output of ls -l /pentest?

For colours with ls, use ls --color=auto or ls --color=always.
 
Old 03-12-2009, 12:54 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
output of ls -l /pentest

[trist007@darkstar:~/downloads/wireshark]$ ls -l /pentest
total 64
drwxr-xr-x 6 root root 4096 2008-06-16 15:36 bluetooth
drwxr-xr-x 11 root root 4096 2008-04-22 14:39 cisco
drwxr-xr-x 8 root root 4096 2008-06-01 13:12 database
drwxr-xr-x 14 root root 4096 2007-08-21 15:47 enumeration
drwxr-xr-x 5 root root 4096 2008-06-11 00:13 exploits
drwxr-xr-x 4 root root 4096 2008-04-16 20:53 fast-track
drwxr-xr-x 16 root root 4096 2008-06-03 11:13 fuzzers
drwxr-xr-x 10 root root 4096 2008-06-10 02:28 password
drwxr-xr-x 4 root root 4096 2008-04-16 20:37 re
drwxr-xr-x 6 root root 4096 2008-06-10 03:11 scanners
drwxr-xr-x 3 root root 4096 2007-08-20 12:47 svn
drwxr-xr-x 3 root root 4096 2007-12-06 10:30 tunneling
drwxr-xr-x 6 root root 4096 2008-06-10 19:41 voip
drwxr-xr-x 3 root root 4096 2007-12-06 10:43 vpn
drwxr-xr-x 8 root root 4096 2008-06-11 00:29 web
lrwxrwxrwx 1 root root 22 2009-03-11 23:25 windows_binaries -> /opt/windows_binaries/
drwxr-xr-x 13 root root 4096 2008-06-10 02:21 wireless


Do I put that ls --color=always in the .bashrc file? I tried it and now when I enter ls, nothing comes out. I have a black background in terminal so I'm thinking that something is wrong and that the output of ls is black. Here is my .bashrc file

[trist007@darkstar:~]$ cat .bashrc
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# Prompt konsol shell
PS1="[\u@\H:\w]\$ "
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

# Colors

Black="$(tput setaf 0)"
BlackBG="$(tput setab 0)"
DarkGrey="$(tput bold ; tput setaf 0)"
LightGrey="$(tput setaf 7)"
LightGreyBG="$(tput setab 7)"
White="$(tput bold ; tput setaf 7)"
Red="$(tput setaf 1)"
RedBG="$(tput setab 1)"
LightRed="$(tput bold ; tput setaf 1)"
Green="$(tput setaf 2)"
GreenBG="$(tput setab 2)"
LightGreen="$(tput bold ; tput setaf 2)"
Brown="$(tput setaf 3)"
BrownBG="$(tput setab 3)"
Yellow="$(tput bold ; tput setaf 3)"
Blue="$(tput setaf 4)"
BlueBG="$(tput setab 4)"
LightBlue="$(tput bold ; tput setaf 4)"
Purple="$(tput setaf 5)"
PurpleBG="$(tput setab 5)"
Pink="$(tput bold ; tput setaf 5)"
Cyan="$(tput setaf 6)"
CyanBG="$(tput setab 6)"
LightCyan="$(tput bold ; tput setaf 6)"


#alias ls= 'ls --color=auto'

Last edited by trist007; 03-12-2009 at 01:13 AM.
 
Old 03-12-2009, 01:31 AM   #4
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Your .bashrc looks fine except you've commented out the alias line! Remove the '#' from the beginning of the line.

/pentest/windows_binaries is not a directory, it's a symbolic link - a pointer to another file, in this case /opt/windows_binaries/. Apparently /opt/windows_binaries/ doesn't exist, so the link is broken. I'm not sure why the link's there or why you thought there would be files inside it - what's a BT3 CD and what's an lzm file? Is it a bootable cd?
 
Old 03-12-2009, 01:40 AM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
Ah, ok I got it. As for the ls --colors=always, yeah I had it uncommented and the output of ls was all black. Am I missing something on defining the colors?

Also another thing. I just got through installpkg laptop battery plugin for Xfce 4.4.3. Worked great. Then when I rebooted, the plugin had a null value, like the battery percentage and time was always at 0. Is there something I need to refresh?

Last edited by trist007; 03-12-2009 at 01:46 AM.
 
Old 03-12-2009, 01:52 AM   #6
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
BT3 is Backtrack 3 linux live distro from remote-exploit destined for penetration testing etc etc
 
Old 03-12-2009, 02:34 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by trist007 View Post
output of ls -l /pentest

.........
lrwxrwxrwx 1 root root 22 2009-03-11 23:25 windows_binaries -> /opt/windows_binaries/
/pentest/windows_binaries is a link to /opt/windows_binaries, look there and see what happens.

Code:
Black="$(tput setaf 0)"
BlackBG="$(tput setab 0)"
DarkGrey="$(tput bold ; tput setaf 0)"
LightGrey="$(tput setaf 7)"
LightGreyBG="$(tput setab 7)"
White="$(tput bold ; tput setaf 7)"
Red="$(tput setaf 1)"
RedBG="$(tput setab 1)"
LightRed="$(tput bold ; tput setaf 1)"
Green="$(tput setaf 2)"
GreenBG="$(tput setab 2)"
LightGreen="$(tput bold ; tput setaf 2)"
Brown="$(tput setaf 3)"
BrownBG="$(tput setab 3)"
Yellow="$(tput bold ; tput setaf 3)"
Blue="$(tput setaf 4)"
BlueBG="$(tput setab 4)"
LightBlue="$(tput bold ; tput setaf 4)"
Purple="$(tput setaf 5)"
PurpleBG="$(tput setab 5)"
Pink="$(tput bold ; tput setaf 5)"
Cyan="$(tput setaf 6)"
CyanBG="$(tput setab 6)"
LightCyan="$(tput bold ; tput setaf 6)"
I have no idea where did you take this from, but all this code does is to set a lot of variables which are never used in your bashrc by the way. So, we can assume that this code is useless as it is.

Code:
#alias ls= 'ls --color=auto'
Remove the space after =, and it might work then. Of course, remove the # as well, and open a new shell.

Also, you can use this command to see a list of defined aliases:

Code:
alias
If the ls line is not on that output and/or it's contents is incorrect then you have found your problem. Also, try ls --color=always on command line and see if it works.

Last edited by i92guboj; 03-12-2009 at 02:36 AM.
 
Old 03-12-2009, 03:29 AM   #8
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
got it to work with this line in the .bashrc

alias ls='ls --color=auto'

Still having trouble with the laptop battery plugin
 
  


Reply



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
having trouble copying files from ntfs partition Lord Xeb Linux - Newbie 3 01-27-2009 11:25 AM
trouble accessing other files on usb computerdude DamnSmallLinux 8 11-17-2006 12:55 PM
Samba configuration error when accessing NTFS files " Network path not found" leo_ieo Linux - General 2 10-09-2006 08:55 PM
accessing music files on windows NTFS hard drive moredhel Linux - Desktop 9 09-01-2006 01:00 AM
Accessing files from WindowsXP NTFS external firewire hdd... shmegegge Linux - Newbie 19 10-05-2004 06:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:00 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