| Author |
basic 6 syntax |
txwooley
Member
Posts: 7
Location:
Joined: 04.02.11 Rank: Moderate |
|
|
Picky one here. I have the 2 file names including their parent directory, and I am familiar with basic bash commands. BUT, I can't seem to get it right. I assume the challenge doesn't want arguments like '-f' for the command to remove the files. I think my problem is probably in chmod. I am using alpha characters and the file to chmod is located in /(dir_name)/logs.txt and /(dir_name)/(other_file_name).php Can someone point me in the right direction please? |
|
| Author |
RE: basic 6 syntax |
j4m32
Member
Posts: 81
Location:
Joined: 01.05.10 Rank: God |
|
This challenge has tricky syntax no doubt,
it even took me a good 30 minutes to figure out how I did it - forgot to write down my solution...
There is not an easy way to say this, it is all about "spacing" and that initialiser "$"...
Play around with it is all I can say.
I'm fairly sure you know enough about the UNIX commands here, the challenge in itself is strait forward as you say it is just the syntax.
Hope that helps.
Jim, |
|
| Author |
RE: basic 6 syntax |
txwooley
Member
Posts: 7
Location:
Joined: 04.02.11 Rank: Moderate |
|
|
Got it. Thanks for the input. Turns out that it didn't like the '/' before the directory, so format for the files should be '(dir_name)/logs.txt' |
|
| Author |
RE: basic 6 syntax |
ADIGA
Member

Posts: 50
Location: Jordan - Middle East
Joined: 28.12.07 Rank: God |
|
|
txwooley wrote:
Got it. Thanks for the input. Turns out that it didn't like the '/' before the directory, so format for the files should be '(dir_name)/logs.txt'
when using / in the start of the path it will take as in absolute path.
as an example.
lets say your in /home/user1
and you want to read /home/user1/dir2/file1.txt
its either you enter 'cat /home/user1/dir2/file1.txt'
or
'cat dir2/file1.txt'
if you used 'cat /dir2/file1.txt' it will not read the '/home/user1/dir2/file1.txt'
it will ignore you current location and try to open the file 'file1' in dir named 'dir2' at the base of your system.
therefore keep in mind how linux acts with relative and absolute paths when trying to run any command. |
|
| Author |
RE: basic 6 syntax |
txwooley
Member
Posts: 7
Location:
Joined: 04.02.11 Rank: Moderate |
|
|
Great info! I learned something new. Thanks for the shared wisdom. |
|
| Author |
RE: basic 6 syntax |
erio
Member
Posts: 1
Location: 04106
Joined: 05.03.11 Rank: Newbie |
|
|
I am having issues with this. I am familiar with html and not much else. |
|
| Author |
RE: basic 6 syntax |
GTADarkDude
Member

Posts: 142
Location: The Netherlands
Joined: 23.02.08 Rank: God |
|
|
erio wrote:
I am having issues with this. I am familiar with html and not much else. Then the quite obvious advice would be to get familiar with other things, such as *nix commands, as the challenge so kindly suggests. ;-)
... |
|
| Author |
RE: basic 6 syntax |
HacKid
Member

Posts: 30
Location:
Joined: 02.03.09 Rank: Active User |
|
|
correct. and for this challenge, you might want to also look up "chmod" in google as it is mentioned on the challenge. |
|
| Author |
RE: basic 6 syntax |
staby
Member
Posts: 2
Location:
Joined: 07.07.11 Rank: Apprentice |
|
I don't mean to thread jack, but I don't want to make another thread for the same challenge.
I had all the syntax correct. I finished this challenge getting the directory name by guessing. There has to be a better way though. I was able to browse the directory after I completed the challenge, but I'm wondering if I didn't miss a step in getting the directory name.
Can anyone point me in the right direction? I don't want the answer, but a general hint so I can figure it out would be appreciated. PM is fine so it doesn't give it away to anyone else. TIA.
Edited by staby on 07-07-11 23:31 |
|
| Author |
RE: basic 6 syntax |
starofale
Member

Posts: 211
Location: England
Joined: 05.12.07 Rank: God |
|
I'm pretty sure I just guessed the directory name. Also, from the HBH bot:
...try a obvious directory name for the files to be in
Seems like guessing is what you are meant to do.
Try a new search engine |
|
| Author |
RE: basic 6 syntax |
staby
Member
Posts: 2
Location:
Joined: 07.07.11 Rank: Apprentice |
|
|
Fair enough. Thanks for the reply. |
|
| Author |
RE: basic 6 syntax |
_nephelim
Member
Posts: 1
Location:
Joined: 27.11.11 Rank: Active User |
|
I found a beginners guide since I am not familiar with *:nix >> http://vic.gedris.org/Manual-ShellIntro/1.2/ShellIntro.pdf
It said the common place for logs are in the directory "/var"
I am not done this challange yet, but does this help me?
and If so, it takes away your problems for guessing the directory.
|
|
| Author |
RE: basic 6 syntax |
Futility
Member

Posts: 715
Location: USA
Joined: 17.12.07 Rank: God |
|
|
_nephelim wrote:
It said the common place for logs are in the directory "/var"
I am not done this challange yet, but does this help me?
This may be true, however it's not what you're looking for in this challenge. You're overthinking it. Just a quick "Hmm... I wonder what directory would hold the logs" should get you by quite nicely.
The purpose of this one is more for you to learn some Unix commands than it is finding the files.
|
|