basic 6 syntax
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?
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,
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.
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.
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.
_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.