Zane Posted November 29, 2007 Share Posted November 29, 2007 I finally got Ubuntu up on my laptop. The latest Gutsy Gibbon version. I seem to have forgotten nearly everything I learned in my classes about Linux..goes to show how much classes really help Now that I've got spare time...I'm just to going to emmerse myself in it until I figure enough of it out, asking whatever questions I have along the way.. so here I go. This probably sounds as basic as it can get to any of you Linux gurus, but I'm trying to play around with some stuff just to figure out what I can do.. Like for instance...I have on my Desktop three tar.gz files Instead of just dragging and dropping them into /usr/local/src like this tutorial tells me to http://www.linuxhelp.net/guides/lamp/ I want to do it in the terminal..I've already discoverd I have to be root to get in there. and I'm already aware that I'll have to use the grep function and the ls function, mv, whatever. I'm not 100% positive but I want to move any tar.gz file on my Desktop to that one folder I said earlier. the most I've found so far is something like this for i in $(seq 1 100); do echo -n "file${i} "; touch file${i} 2>&1; done to play with, but does anyone have something off the top of their head that maybe I could use to excel just a little bit faster in Linux Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/ Share on other sites More sharing options...
neylitalo Posted November 29, 2007 Share Posted November 29, 2007 If you're looking for a guide to bash scripting, I suggest http://tldp.org/LDP/abs/html/index.html. If you're hoping that script you typed will do anything useful, however, I'm afraid you're mistaken. All that's going to do is create (or update the mtime on) files called "file1" to "file100", and tell you the filename before it creates (updates) it. While I don't have any ideas for "guides to learn Linux", I can suggest tldp - The Linux Documentation Project - for general information on many, many Linux-related subjects. Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-401739 Share on other sites More sharing options...
trq Posted November 29, 2007 Share Posted November 29, 2007 Sorry, but your enire post is a little vague. For starters, there isn't really a concept of Desktop in Linux. Nothing that is default and can be refered to in such a way anyhow. You can simple mv all tar.gz files from one directory to another using something like.... mv dir1/*tar.gz dir2/ But quite often (depending on your window manager) there is no concept of a Desktop foler as there is in windows. I use fluxbox as a window manager and there aren't even any icons let alone a ADesktop directory. Personally, the only way to learn Linux is to drop your window manager (and all its related tools) all together, get familiar with shell, then come back to the 'drag and drop' later. Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-401759 Share on other sites More sharing options...
roopurt18 Posted November 29, 2007 Share Posted November 29, 2007 Your Desktop directory in Ubuntu is very likely: /home/<username>/Desktop move those *.tar.gz files to the other directory mv /home/<username>/*.tar.gz /usr/local/src/ uncompress those files gzip -d /usr/local/src/*.tar.gz untar those files tar -xvf /usr/local/src/*.tar However, if you are trying to set up a LAMP server, you can save yourself some trouble and just use synaptic. It's oodles easier. Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-401818 Share on other sites More sharing options...
trq Posted November 29, 2007 Share Posted November 29, 2007 You can also get the files uncompressed an untared in one single command. tar xvpf /usr/local/src/*.tar.gz Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-401998 Share on other sites More sharing options...
neylitalo Posted November 29, 2007 Share Posted November 29, 2007 You can also get the files uncompressed an untared in one single command. tar xvpf /usr/local/src/*.tar.gz You forgot the z. tar xzf extracts a gzip'ed tar file, the p just preserves permissions. Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-402055 Share on other sites More sharing options...
roopurt18 Posted November 29, 2007 Share Posted November 29, 2007 You can also get the files uncompressed an untared in one single command. tar xvpf /usr/local/src/*.tar.gz You forgot the z. tar xzf extracts a gzip'ed tar file, the p just preserves permissions. Show offs! Quote Link to comment https://forums.phpfreaks.com/topic/79358-drowning-in-linux/#findComment-402209 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.